Help! Server is over load due to direct admin?

quanganh

New member
Joined
Apr 17, 2011
Messages
1
Everyday my server is overload and connect to database even only fews connection (abouts 200 connections).
Now I am using wordpress CMS and Intel ® Quad Core Xeon X3430 2.40GHz with 8gb ram. This is my information from direct admin:

top - 18:29:04 up 1 day, 16:10, 0 users, load average: 3.35, 2.66, 2.38
Tasks: 249 total, 3 running, 245 sleeping, 0 stopped, 1 zombie
Cpu(s): 27.3%us, 8.9%sy, 0.0%ni, 62.3%id, 0.6%wa, 0.2%hi, 0.6%si, 0.0%st
Mem: 8166552k total, 7552080k used, 614472k free, 373608k buffers
Swap: 6094840k total, 96k used, 6094744k free, 4366692k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13490 apache 16 0 122m 33m 4068 R 55.4 0.4 0:03.29 httpd
2724 mysql 15 0 1080m 51m 4780 S 25.7 0.6 675:25.10 mysqld
14867 apache 15 0 117m 28m 3776 S 5.9 0.4 0:00.83 httpd
12669 apache 15 0 177m 33m 4928 S 2.0 0.4 0:04.13 httpd
14196 apache 15 0 167m 25m 4308 S 2.0 0.3 0:01.35 httpd
14868 apache 15 0 177m 33m 4540 R 2.0 0.4 0:01.07 httpd
14872 apache 15 0 110m 21m 4048 S 2.0 0.3 0:00.35 httpd
14881 apache 15 0 119m 29m 4400 S 2.0 0.4 0:00.49 httpd
1 root 15 0 10352 688 580 S 0.0 0.0 0:00.84 init

Some network friends said this may caused by direct admin.
So please anybody understand about this problem can give me some advice.
Thank you so much.
 

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,792
Location
A Coruña, Spain
well 3.xx seems not to be too much high load using a quad-core xeon with 8gb of ram.

Have you having trouble with what? Loading website? Should you provide it?

I would also suggest you to install mod_ruid2 for check which user is using apache mostly.

Regards
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Everyday my server is overload and connect to database even only fews connection (abouts 200 connections).
Now I am using wordpress CMS and Intel ® Quad Core Xeon X3430 2.40GHz with 8gb ram. This is my information from direct admin:
Actually it's information from your kernel, which is converted into machine-readable format by the top command.

In my experience I've found that WordPress can use a lot of system resources. How are you running PHP? suPHP, mod_ruid2 or mod_php? If suPHP, then you're using a lot more service resources than either mod_ruid2 or mod_php would use, and you should probably try mod_ruid2 (search these forums).
top - 18:29:04 up 1 day, 16:10, 0 users, load average: 3.35, 2.66, 2.38
Tasks: 249 total, 3 running, 245 sleeping, 0 stopped, 1 zombie
Cpu(s): 27.3%us, 8.9%sy, 0.0%ni, 62.3%id, 0.6%wa, 0.2%hi, 0.6%si, 0.0%st
Mem: 8166552k total, 7552080k used, 614472k free, 373608k buffers
Swap: 6094840k total, 96k used, 6094744k free, 4366692k cached
Look carefully and you'll see that you've got 249 processes in memory. Of those only 3 are running, and 246 are sleeping (waiting for something else to finish). Slow memory? Slow disk drives? Misconfigured MySQL? Hard to tell, So instead of trying to figure it out, I'd simply fix the easiest issues to fix first, and see if that solves the problem.
Start by switching to mod_ruid2 and optimizing your MySQL settings (lots of info searchable on these forums; no need for me to repeat it here).
Code:
PID 	USER 	PR 	NI 	VIRT 	RES 	SHR 	S 	%CPU 	%MEM 	TIME+ 	COMMAND
13490	apache	16	0	122m	33m	4068	R	55.4	0.4	0:03.29	httpd
2724	mysql	15	0	1080m	51m	4780	S	25.7	0.6	675:25.10	mysqld
14867	apache	15	0	117m	28m	3776	S	5.9	0.4	0:00.83	httpd
12669	apache	15	0	177m	33m	4928	S	2.0	0.4	0:04.13	httpd
14196	apache	15	0	167m	25m	4308	S	2.0	0.3	0:01.35	httpd
14868	apache	15	0	177m	33m	4540	R	2.0	0.4	0:01.07	httpd
14872	apache	15	0	110m	21m	4048	S	2.0	0.3	0:00.35	httpd
14881	apache	15	0	119m	29m	4400	S	2.0	0.4	0:00.49	httpd
1	root	15	0	10352	688	580	S	0.0	0.0	0:00.84	init
Look carefully and you'll see that it's your first httpd instance that's using the most of your CPU time. The rest is used by MySQLd.
Some network friends said this may caused by direct admin.
I'm not sure what you mean by network friends but I believe the evidence shows them to be wrong. DirectAdmin is using such a small amount of system resources it doesn't even show up in your list. It's using less resources than init[/] which is using 0.0% of cpu time and 0.0% of memory.
So please anybody understand about this problem can give me some advice.
Don't take responses from friends who really don't know :).

I've made specific suggestions and comments above. Based on my own experiences and your notes and process map, I'd guess that unless you've got a hardware or memory failure which doesn't show up in top, you're likely running mod_php and the problem is probably that your MySQL configuration is probably the biggest cause of the problem. I'd definitely look at your MySQL configuration, and if I'm wrong and you're running suPHP, then convert to mod_ruid2.

Jeff
 
Top