Message-ID: <026d01beccbd$15d8d650$1687eaa8@infovia.com.gt> From: =?iso-8859-1?Q?Rolando_L=F3pez?= To: Subject: Kernel Optimization and RH 6 Date: Mon, 12 Jul 1999 17:20:09 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id TAA00959 Reply-To: pgcc AT delorie DOT com Are the lines below the best option to compile a 2.2.x kernel with egcs/pgcc running on a Pentium II? -O6 -mpentiumpro -march=pentiumpro -malign-function=2 -malign-jumps=2 -malign-loops=2 -fomit-frame-pointer -fstrength-reduce Background We have recently installed RedHat 6 on a PowerEdge 4300, PII 350Mhz with 256MB of RAM. RedHat 6 determines the type of processor and installs the compiled kernel accordingly. This kernel has been compiled with the "best" performance optimizations depending on the hardware. As a non-scientific measure of this kernel performance, at boot time, the RAID 5 routines reached 850MB/s. This measure can be seen after booting in /var/log/messages After that, we updated the kernel to version 2.2.7, but we obtained only 835MB/s in the same measure. These are the options used and the compiler version: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) We modify /usr/src/linux/Makefile like this: HOSTCC = egcs HOSTCFLAGS = -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer CC = $(CROSS_COMPILE)egcs -D__KERNEL__ -I$(HPATH) And /usr/src/linux/arch/i386 as the following: CFLAGS_NSR := -fstrength-reduce ifdef CONFIG_M686 CFLAGS := $(CFLAGS) -mpentiumpro -march=pentiumpro -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 endif The machine is used as transparent proxy server with squid 2.2.stable3 (compiled with the same options) We didn't have any trouble at compilation time nor we had stability problems with egcs. Squid is reaching the 50% Hit Ratio but is using too much CPU time, around 27% with 17% of system time and 10% of user time. I understand that optimizing the kernel is not what best improves performance, but there is nothing else we could do to the PowerEdge 4300 with our current budget, and given that the options used to compile RedHat 6 achieved a better throughput (850 versus 835) and that squid is using too much system time, maybe there should be something that could be done to recompile the kernel and squid with egcs/pgcc and obtain some kind of improvement. I'll appreciate your advice on this. Regards, Rolando