Results 1 to 3 of 3
Just a little tip for people running apache who really want to improve performance though reducing the size of your httpd binary.
You can set your CFLAGS environment variable to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-15-2004 #1Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
Tip: Reduce httpd binary size
Just a little tip for people running apache who really want to improve performance though reducing the size of your httpd binary.
You can set your CFLAGS environment variable to contain information passed to GCC when using "make" to build software. After much experimentation i have found that this deliver's the best results:
I thought i would share that, as i havent found anything else like it documented on the web (specifically for apache).Code:export CFLAGS="-O3 -fomit-frame-pointer -s"
Also to improve apache performance, explicitly disable modules you dont need. For my apache 1.3 installation, i used on my apache ./configure line:
From doing that, I was able to reduce the size of my httpd binary by about 18%.Code:--disable-module=userdir --disable-module=imap
J
- 09-15-2004 #2Linux User
- Join Date
- Jul 2004
- Location
- Poland
- Posts
- 368
When it comes to reducing binary files it migh help if you changed "-O3" to "-O2" or even "-Os". AFAIK, the O3 flag will inline many functions to their callers, which can increase performance in some cases and decrease in others, but certainly will increase code size. With O2 this is only true fot the functions marked "inline" by the programmer.
"I don't know what I'm running from
And I don't know where I'm running to
There's something deep and strange inside of me I see"
- 09-18-2004 #3Just Joined!
- Join Date
- Sep 2004
- Location
- UMR
- Posts
- 14
in theory, -Os should give the smallest binary, and -O3 should give the largest (but fastest) binary. not always the case, but nothing is "always"


Reply With Quote
