Date: Tue, 13 Mar 2001 10:08:00 -0800 (PST) From: Gordon Tetlow <gordont@bluemtn.net> To: <freebsd-hackers@FreeBSD.ORG> Cc: Dan Phoenix <dphoenix@bravenet.com> Subject: Re: optimizing apache with php and nfs mounts Message-ID: <Pine.BSF.4.33.0103131000370.88593-100000@sdmail0.sd.bmarts.com> In-Reply-To: <20010313074140.B75117@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 13 Mar 2001, David O'Brien wrote: > On Mon, Mar 12, 2001 at 10:34:32PM -0800, Gordon Tetlow wrote: > _ _ > __/\__ ___ (_) __ _ | |__ __/\__ > \ / / __| | | / _` | | '_ \ \ / > /_ _\ \__ \ | | | (_| | | | | | /_ _\ > \/ |___/ |_| \__, | |_| |_| \/ > |___/ Woohoo! ASCII art! > > I probably qualify for the latter.... Optimizations are good and all, but > > I look at it this way: It's a mission critical webserver, I don't want it > > crashing. As a result, we compile ours with nothing higher that -O2 and no > > unusual optimizations. Sure, it might be a bit slower than it could have > > been, > > Do people ever actually test this? Or is there just the assumption that > the more "optimizations" on the `cc' command line is a Great Thing(tm)? > People do realize that for some code, -O2 is much worse than -O? Also > for much code there is no difference in performance. Rather than do what > you "think" will give the best results, why not actually benchmark it? I was just trying to illustrate that any gains (real or not) realized by using -O1000 -fomit-everything is generally a trade off between stability and speed. > > but we don't have to worry about chasing down compiler bugs that > > interact strangly with the webserver code. Also, I think anything higher > > than -O2 actually produces a larger binary (it inlines functions whenever > > possible). > > 1. You need to use -O if you don't want to chase bugs > 2. It is -O2 and above (ie, _includes_ -O2) that produces a larger > binary. See -Os if you want smaller. Actually, we did. Of course, our production stuff is still compiled with gcc 2.7.2.1. I think. Whatever the standard system compiler for FreeBSD-3.2 is. And that was at a time when the world was still compiled with -O2, wasn't it? -gordon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0103131000370.88593-100000>