High server load - where to start?

erick_paper

Well-Known Member
Apr 19, 2005
245
0
166
I'm on a CentOS 5 OS 64 bit, latest kernel and all of that.
PG version is 8.2.9, compiled as 64bit.
The memory is 4GB.
It's a 2 x Dual Core Intel 5310.
Hard disks are SATA II, 7200 rpm.

The server is running just one website. So there's Apache 2.2.11,
MySQL (for some small tasks, almost negligible).

And then there's PG, which in the "top" command shows up as an important contributor.

My server load is going to 64, 63, 65, and so on.

Where should I start debugging? What should I see? TOP command does
not yield anything meaningful. I mean, even if it shows that postgres
user for "postmaster" and nobody user for "httpd" (apache) are the
main resource hogs, what should I start with in terms of solving this problem? There is only one "virtualhost" definition in httpd.conf because of the one website!

Could it be mod_security's rules? How would I know?
 

serversignature

Well-Known Member
Nov 26, 2007
107
0
66
Bangalore
Check in WHM -> CPU/Memory/MySQL usage.

May be you also need to check in the Apache error logs to find out if anything
wrong there. The location is /usr/local/apache/logs/error_logs

More checks can be done using the following commands "dmesg" "ps auxwww" "free" "netstat -vap" " vmstat 2 5" "dstat -cd -f" "hdparm -tT"
 

erick_paper

Well-Known Member
Apr 19, 2005
245
0
166
Thanks for this!

The vmstat command shows me that there were many sleeping and zombie processes. My apache and postgresql are pretty okay, but it seems the "weekly cpbackup" is eating up resources.

Code:
??????cpbackup,3645
??? ??????cpuwatch,3649 5.0 /scripts/pkgacct MYSITE /home/cpbackuptmp/cpbackup/weekly backup
??? ??????cpuwatch,3650 5.0 /scripts/pkgacct MYSITE /home/cpbackuptmp/cpbackup/weekly backup
??????cpbackup,31081
??? ??????cpuwatch,31085 5.0 /scripts/pkgacct MYSITE /home/cpbackuptmp/cpbackup/weekly backup
??? ??????cpuwatch,31087 5.0 /scripts/pkgacct MYSITE /home/cpbackuptmp/cpbackup/weekly backup
What does the backup do that takes up so much time?? How can I improve this weekly backup, or kill it? I don't need to have the "/home" directories backed up, as I can do a small bash script that will take care of that. Anything else that the cpbackup backs up?