Fine tune GCC parameters to boost APACHE 2.2
19/05/2007 14:10First get CPU infomation from /prco/cpuinfo
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 1
cpu MHz : 3000.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 3
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
bogomips : 6029.46
Change CFLAGS to
-O3: The higher value, the smaller binnary file. But in practical, I did not feel and speed boost. I prefer 3 rather than 6 now, as it can save much time on compiling
-msse2 : enable SSE2 CPU instrcution
-mmmx : enable MMX CPU instrcution
-mfpmath=sse : Generate floating point arithmetics for SSE unit
-mtune=pentium4 : Special optimized for P4
-fomit-frame-pointer” : Removes the frame pointer for all functions, as it is a production server
After changing those parameters, my apache server boost around 10%
Tags: apache server, Computing, floating point, mmx cpu, Networking, o3, OS, p4, pentium4, speed boost, sse, sse2
Categories: Computing, OS, Networking
No Comments »

