Trying to find performance bottleneck...

nothsa

Well-Known Member
Nov 30, 2004
69
0
156
First, my server specs:
OS: CentOS 3.6
CPU: P4 2.4GHz
RAM: 1GB
HD: 2x80GB EIDE

This is a CPanel web server that has a fair amount of traffic going through it (300-600GB/month). I'm not exactly sure what the bottleneck is, but I'm willing to try anything and any help would be appreciated :(. The server runs OK until I try to run something like a CPanel update, or a backup of the sites. Sometimes (when I do those things) the server will lock up and I won't be able to SSH into it. It connects but I don't get a login prompt (it just hangs), almost like a process is consuming all of the CPU cycles or something. The only thing that fixes it is contacting the DC and asking them to reboot the server.

Below is the result of a vmstat 1 for 10 seconds
Code:
procs                      memory      swap          io     system         cpu
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 2  0  72564  25856 183376 544016    2    5    58   197   80   114 12  3 81  5
 0  2  72564  25368 183380 544024    0    0     0   628 1150   558 11  3 67 19
 0  0  72564  26384 183388 544040    0    0     0   520 1295   539  4  1 54 41
 0  0  72564  26816 183388 544048    0    0     0     0  953   449  8  3 89  0
 0  0  72564  29880 183388 544060    4    0     4   252 1151   517 15  2 82  1
 0  0  72564  30124 183388 544060    0    0     0     0 1158   764  7  2 91  0
 5  0  72564  27916 183404 544068    0    0     0   528 1037   489 13  2 85  0
 0  0  72564  24052 183404 544092    0    0     0     0 1349   979 27  1 72  0
 0  0  72564  23740 183408 544152    0    0    56   340 1295   661 21  7 69  2
 0  0  72564  24004 183408 544332    0    0     0     0 1523   744  4  6 90  0
Here's the result of a sar -W (I've only shown an hour, but it's all around these values):
Code:
09:10:00 AM  pswpin/s pswpout/s
09:10:00 AM      0.64      0.43
09:20:00 AM      0.03      0.87
09:30:00 AM      0.02      1.44
09:40:00 AM      0.46      1.49
09:50:00 AM      0.20      2.12
10:00:00 AM      4.51      4.74
10:10:00 AM      0.16      2.66
Here's the result of a sar -q for the same hour:
Code:
09:10:00 AM   runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
09:10:00 AM        10       140      0.64      0.64      0.74
09:20:00 AM         9       130      0.74      1.02      0.93
09:30:00 AM        11       129      0.99      0.54      0.68
09:40:00 AM         9       131      0.40      0.54      0.62
09:50:00 AM         9       121      0.14      0.29      0.47
10:00:00 AM         9       126      0.99      1.04      0.81
10:10:00 AM         8       119      0.61      0.78      0.76
Again, ANY help would be appreciated. I've been trying to track this down for ages :(
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
34
473
Go on, have a guess
A few common issue you could check for:

1. Make sure you're running the latest CentOS v3 kernel (2.4.21-37.EL)

2. Make sure that you don't have the laus rpm installed:

rpm -q laus

If you do, remove it:

rpm -ev laus
echo alias "char-major-10-224 off" >> /etc/modules.conf
service crond stop
rmmod audit
service crond start
rm -Rfv /var/log/audit.d/


3. If you use IDE disks, make sure that DMA is enabled:

hdparm /dev/hda

If not, run:

/scripts/hdparmon


Those are the most common issues I find that impede performance. Beyond that it's probably something specific to your configuration.
 

nothsa

Well-Known Member
Nov 30, 2004
69
0
156
Thanks for the help, Chirpy! Here's what I've found:

1. I'm running 2.4.21-27.0.1.EL. Is that good enough, or should I upgrade it? Upgrading kernels always freaks me out 'cause I don't know if it's going to come back up :eek:. Can I just use up2date and remove 'kernel*' from the skiplist?

2. I did have laus installed and have removed it using your method below. I also have laus-libs installed. Should that be removed as well? If they're just libs then it shouldn't make a difference, right?

3. DMA is enabled on both.
 

nothsa

Well-Known Member
Nov 30, 2004
69
0
156
Don't worry about #1, I've found a tutorial on how to easily update it.

It also looks like the server is no longer locking up when I do updates and backups! This makes my life SO much easier. I also found this article which talks briefly about the problem with RHEL/CentOS and CPanel and gives the same solution that you did.

Thanks again, Chirpy :D
 
Last edited: