Results 1 to 18 of 18
Thread: Load Average Problem
Hybrid View
-
04-16-2011, 02:40 PM #1WHT Addict
- Join Date
- Jul 2006
- Posts
- 166
Load Average Problem
Hello friends, l need help to solve this problem.
top - 18:34:32 up 1 day, 8:35, 1 user, load average: 16.78, 10.47, 6.53
Tasks: 215 total, 1 running, 212 sleeping, 0 stopped, 2 zombie
Cpu(s): 0.4%us, 1.1%sy, 0.0%ni, 0.0%id, 98.0%wa, 0.2%hi, 0.3%si, 0.0%st
Mem: 16615788k total, 8661792k used, 7953996k free, 395928k buffers
Swap: 2104496k total, 0k used, 2104496k free, 6589264k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3004 mysql 15 0 2924m 856m 3388 S 6.3 5.3 377:38.37 mysqld
13991 nobody 18 0 63988 28m 3892 S 4.0 0.2 0:00.12 httpd
608 root 10 -5 0 0 0 D 1.3 0.0 2:08.12 md1_raid1
13970 nobody 16 0 65668 38m 10m D 0.7 0.2 0:00.73 httpd
1047 root 15 0 2540 1172 804 R 0.3 0.0 1:14.26 top
1 root 15 0 2160 600 520 S 0.0 0.0 0:01.02 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.16 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/1
6 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
7 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
8 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/2
9 root 39 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/2
10 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/2
11 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/3
12 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/3
13 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/3
14 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/4
15 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/4
16 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/4
17 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/5
18 root 39 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/5
19 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/5
20 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/6
21 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/6
22 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/6
23 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/7
24 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/7
25 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/7
26 root 10 -5 0 0 0 S 0.0 0.0 0:58.71 events/0
27 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/1
28 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/2
29 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/3
30 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/4
31 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/5
32 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/6
33 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/7
34 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
35 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
45 root 10 -5 0 0 0 S 0.0 0.0 0:00.17 kblockd/0
46 root 10 -5 0 0 0 S 0.0 0.0 0:00.05 kblockd/1
47 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 kblockd/2
-
04-16-2011, 02:46 PM #2WHT Addict
- Join Date
- Oct 2008
- Posts
- 102
It sounds to be mysql and apache causing load on your server after looking at top command statistics. You need to get both of the services optimized.
-
04-16-2011, 02:49 PM #3WHT Addict
- Join Date
- Jul 2006
- Posts
- 166
omg, my server going to bomp!
top - 18:49:26 up 1 day, 8:50, 1 user, load average: 36.16, 22.51, 13.68
Tasks: 235 total, 1 running, 234 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.1%us, 5.4%sy, 0.0%ni, 3.1%id, 88.8%wa, 0.2%hi, 0.4%si, 0.0%st
Mem: 16615788k total, 12664300k used, 3951488k free, 370384k buffers
Swap: 2104496k total, 0k used, 2104496k free, 10522624k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14690 mysql 15 0 3061m 331m 3068 S 44.8 2.0 3:44.75 mysqld
15148 nobody 16 0 72408 39m 6256 S 4.3 0.2 0:00.31 httpd
2010 root 0 -20 0 0 0 S 4.0 0.0 3:18.21 loop0
612 root 10 -5 0 0 0 D 2.0 0.0 3:28.51 kjournald
608 root 10 -5 0 0 0 S 1.3 0.0 2:14.26 md1_raid1
323 root 15 0 0 0 0 S 1.0 0.0 1:01.34 pdflush
14699 root 15 0 2428 1104 788 R 0.7 0.0 0:01.90 top
15164 nobody 16 0 73100 42m 9232 S 0.7 0.3 0:00.24 httpd
322 root 15 0 0 0 0 S 0.3 0.0 1:02.22 pdflush
2581 root 16 0 1816 568 480 D 0.3 0.0 1:26.19 syslogd
15146 nobody 15 0 69452 42m 10m S 0.3 0.3 0:01.28 httpd
1 root 15 0 2160 600 520 S 0.0 0.0 0:01.02 init
2 root RT -5 0 0 0 S 0.0 0.0 0:00.16 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/1
6 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
7 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
8 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/2
9 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/2
10 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/2
11 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/3
12 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/3
13 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/3
14 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/4
15 root 34 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/4
16 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/4
17 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/5
18 root 34 19 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/5
19 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/5
20 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/6
21 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/6
22 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/6
23 root RT -5 0 0 0 S 0.0 0.0 0:00.01 migration/7
24 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/7
25 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/7
26 root 10 -5 0 0 0 S 0.0 0.0 0:59.16 events/0
27 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/1
28 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/2
29 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/3
30 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/4
31 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/5
32 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/6
-
04-18-2011, 06:47 PM #4Tom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons
-
04-16-2011, 02:54 PM #5WHT Addict
- Join Date
- Mar 2011
- Location
- Italy
- Posts
- 109
Use a mysql tunner to tune your server a good example is mysqltuner.pl
-
04-18-2011, 12:34 AM #6Disabled
- Join Date
- Jan 2011
- Location
- India
- Posts
- 1,453
-
04-18-2011, 01:07 AM #7Junior Guru Wannabe
- Join Date
- Mar 2011
- Location
- Las Vegas Nevada
- Posts
- 33
one thing i did on my server that stops the problem from getting worse. In php.ini there is by default a 60 SECONDS max connection time for php to wait for mysql. If mysql is running on the same box you can safely drop this to 1 even most lans you can drop it to 1. So when mysql get over loaded it dosen't cause a chain reaction with apache repeatedly asking.
Had this issuse with a large database backup 1.5gb eating up tones of ram from apache waiting on mysql to finish and unlock the tables.My personal Blog:
http://website-design-pricing.info
-
04-18-2011, 01:59 AM #8WHT Addict
- Join Date
- Aug 2004
- Posts
- 172
-
04-18-2011, 02:00 AM #9Junior Guru Wannabe
- Join Date
- Mar 2011
- Location
- Las Vegas Nevada
- Posts
- 33
Yeah thats exactly the problem Multiple servers. Dosen't matter too mutch as that works for me. only about 3 min of downtime.
Last edited by kingofkya; 04-18-2011 at 02:03 AM.
My personal Blog:
http://website-design-pricing.info
-
04-16-2011, 03:37 PM #10WHT Addict
- Join Date
- Aug 2004
- Posts
- 172
You wait time is very high, which suggest the bottleneck is harddrive.
I could suggest increasing the cache size for mysql since you have so much ram left.
May be some sort of php accelerator for your apache.
Perhaps also look at your storage subsystem and see if there is anyway you can reduce the load, such as disabling apache log (if you don't need it)
Or something is causing the slowness of your server, for example degraded raid5/6 array, incorrectly set harddrive parameters. Note that messing around with harddrive settings can cause data corruption.
-
04-16-2011, 04:01 PM #11WHT Addict
- Join Date
- Jul 2006
- Posts
- 166
l am having ded from server4you. do they offer these kind of support issues? this server is optimized by a populer system admin in this forums.
l am still searching a solution.
-
04-16-2011, 04:06 PM #12WHT Addict
- Join Date
- Mar 2011
- Location
- Italy
- Posts
- 109
in this case paste here your etc/my.cnf to see your optimization
-
04-16-2011, 06:00 PM #13WHT Addict
- Join Date
- Jul 2009
- Posts
- 134
Disk i/o.....
You need to get MySQL using more RAM sd you have plenty available and should get Memcached going to cache some queries.<< Please review signature guidelines >>
-
04-16-2011, 06:09 PM #14WHT Addict
- Join Date
- Jul 2006
- Posts
- 166
is there a possibility to write a script to reboot apache and mysql services when load average become over 10 in my server?
-
04-17-2011, 07:44 PM #15Temporarily Suspended
- Join Date
- Jun 2009
- Location
- Inside WHT !
- Posts
- 67
Try this:
#!/bin/bash
loadavg=$(uptime | awk -F "." '{ print $1 }' | awk -F ":" '{ print $5 }')
if [ "$loadavg" -ge "10" ]; then
pkill -9 httpd
sleep 3
/etc/init.d/httpd restart
/etc/init.d/mysqld restart
fi
-
04-17-2011, 10:49 PM #16Web Hosting Master
- Join Date
- Sep 2004
- Location
- Miami, FL
- Posts
- 2,762
Not really a wise idea to restart MySQL and Apache each time it goes over 10. You are not looking into the root of the problem but rather superficially trying to resolve the problem and restarting it.
The root is your optimization of your MySQL, so you should have a look at that before even considering the restart.Aaron Ong
Dedicated Servers - 100TB Servers - 100Mbps Unmetered Servers - Web Hosting - CDN Network
Servers in Central, East/West Coast USA, EUROPE and ASIA
Welltodo Century - www.welltodocentury.com
-
04-17-2011, 11:00 PM #17Temporarily Suspended
- Join Date
- Jun 2009
- Location
- Inside WHT !
- Posts
- 67
Yea.. I agree with aodat2.. Its not a good idea.. I just gave him the script.. thats all
-
04-18-2011, 10:21 PM #18Junior Guru Wannabe
- Join Date
- Apr 2011
- Posts
- 41
im having laggy server problems
Similar Threads
-
Server Load Average Problem
By indianboy in forum Hosting Security and TechnologyReplies: 35Last Post: 08-06-2010, 06:55 PM -
Need some help on a Hourly high 5 minute load average problem
By echenail in forum Hosting Security and TechnologyReplies: 20Last Post: 08-06-2009, 06:13 PM -
From shared to dedicated server (vbulletin forum) Problem with load average
By mf1983 in forum Systems Management RequestsReplies: 6Last Post: 05-19-2008, 06:07 PM -
Does load average on VPS is total system load ?
By taotoon in forum Hosting Security and TechnologyReplies: 2Last Post: 07-05-2005, 09:27 AM -
Get Load Average, Ping, CPU load, etc. by using PHP
By Milos in forum Hosting Software and Control PanelsReplies: 2Last Post: 03-03-2002, 10:36 PM