From owner-freebsd-hackers Tue Mar 13 10: 8:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sdmail0.sd.bmarts.com (sdmail0.sd.bmarts.com [209.247.77.155]) by hub.freebsd.org (Postfix) with ESMTP id 03E3537B719 for ; Tue, 13 Mar 2001 10:08:16 -0800 (PST) (envelope-from gordont@bluemtn.net) Received: from localhost (gordont@localhost) by sdmail0.sd.bmarts.com (8.11.3/8.11.2/BMA1.1) with ESMTP id f2DI80094698; Tue, 13 Mar 2001 10:08:00 -0800 (PST) Date: Tue, 13 Mar 2001 10:08:00 -0800 (PST) From: Gordon Tetlow X-X-Sender: To: Cc: Dan Phoenix Subject: Re: optimizing apache with php and nfs mounts In-Reply-To: <20010313074140.B75117@dragon.nuxi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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