Date: Mon, 12 Mar 2001 22:34:32 -0800 (PST) From: Gordon Tetlow <gordont@bluemtn.net> To: Dan Phoenix <dphoenix@bravenet.com> Cc: <freebsd-hackers@FreeBSD.ORG> Subject: Re: optimizing apache with php and nfs mounts Message-ID: <Pine.BSF.4.33.0103122226150.60221-100000@sdmail0.sd.bmarts.com> In-Reply-To: <Pine.BSO.4.21.0103121542460.23058-100000@gandalf.bravenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 Mar 2001, Dan Phoenix wrote: > CC="gcc -O6 -fomit-frame-pointer" OPTIM="-O2 -DBUFFERED_LOGS" > > could some c guru tell me if this would be bad to use to an apache > optimization? I need to compile apache on my own not with ports.... > looking at makefile > in apache13 in ports collection i see these optimization flags. > along with --mmap-static module. > > > can you use both -06 and -02 for optmization at the same time? > -fomit-frame-pointer as well? -O6 and -O2 do seem a bit contradictory. I'm guessing it just uses -O6. -fomit-frame-pointer is not enabled per the -O flags so that does do something, but it does make it rather difficult to track down problems without a frame pointer. > this is my full config line so far > CC="gcc -O6 -fomit-frame-pointer" OPTIM="-O2 -DBUFFERED_LOGS" ./configure > --prefix=/usr/local/apache --enable-module=rewrite > --activate-module=src/modules/php4/libphp4.a > > alot of other crap modules get thrown into httpd.conf as well i have > noticed....slowly researching each and disabling what i don;t need. Unless you really need mod_rewrite, I suggest you don't use it. It's rather black-magicish, difficult to get working, and as I recall, I think it's had some security issues about it. > INterested in talking with some c experts and apache experts on this > issue. 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, 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). Again, I don't like living on the bleeding edge when it comes to revenue streams. Hope this helps, -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.0103122226150.60221-100000>