If you are running CentOS 4.3 with Cpanel - speed up your server

Echelon17

Well-Known Member
May 21, 2006
73
0
156
Just thought I'd share this information with you.

CentOS 4.3's latest Kernel (as far as I'm aware - pre 2.6.9-37) is very buggy when it comes to RAM usage and swap memory usage. It swaps needlessly and doesn't utilise all of the RAM before using the swap file. Because of this you may get quite high IO/waits. Stuff like updatedb running or cpbackup will utterly destroy your box - it happened to me.

* USE AT YOUR OWN RISK - THIS IS A BETA KERNEL *
I've been testing this Kernel for the last couple of weeks and so far so good, haven't had a single problem with it at all and the performance increase has been VERY worthwhile.

To fix this bad memory management 'bug', try this beta kernel:

http://people.redhat.com/~jbaron/rhel4/RPMS.kernel/

On a high load 4GB RAM box we've never even used the swap file since applying it - MUCH better performance all round.

Download the relevant RPM for your setup, then:

rpm -Uvh <filename>

Reboot, job done.
 

Echelon17

Well-Known Member
May 21, 2006
73
0
156
I believe it's going to be a permanent feature. One of the RedHat guys is responsible for releasing that, more of a preview towards things to come.
 

jester.ro

Well-Known Member
PartnerNOC
Feb 6, 2004
303
0
166
Bucharest, Romania
cPanel Access Level
DataCenter Provider
i've noticed one server slowing after an update to 2.6.9-34.107.plus.c4smp

is this also affected?

funny thing, i upgraded the kernel and the processor on that server(from dualcore 2.8 2x1 mb cache to 3.0 2x2 mb cache) and it was slower :)
 

Echelon17

Well-Known Member
May 21, 2006
73
0
156
Yes, I believe the Kernel you're using is also affected.

Full info on the 'bug' can be found here:

http://bugs.centos.org/view.php?id=1174

There's a link at the bottom to a newly released development Kernel. I can't verify if the issue is solved with this one, as we currently use 2.6.9-37. In 2.6.9-37 the problem is definitely fixed.
 
Last edited:

jester.ro

Well-Known Member
PartnerNOC
Feb 6, 2004
303
0
166
Bucharest, Romania
cPanel Access Level
DataCenter Provider
Yes, i saw the updated kernel on the bug page.
I'm waiting to see if the beta kernel you recommended has any issues tomorrow, under heavy load.

All i can say is that with the beta kernel, right after boot, server uses 760 MB ram, and no swap, with the old one it was using 1.5 GB with some megs of swap too.

Most of the memory was used by apache.
 

Echelon17

Well-Known Member
May 21, 2006
73
0
156
I just spoke to the guys who developed the latest Kernel in the previous link and they say that it *also* has the memory fix as my version, so it should be fine.

Glad you're seeing a difference already, it does make a huge difference in general.