Knowledgebase

Portal Home > Knowledgebase > Articles Database > huge load on our server


huge load on our server




Posted by mixmox, 09-11-2010, 03:16 AM
hello every one. we have a dedicate server which host 1 music website. this week we have huge load 21 15 29 and ... . How to reduce load? we use cent os + directadmin + apache

Posted by mugo, 09-11-2010, 04:35 AM
That very much depends on where the bottleneck is. Why don't you dump the outputs of top free -m to begin with. If you have substantial visitors, or even a few, hitting streamed or downloaded music files, that alone can drive up at least your bandwidth usage. What is your port speed? If you are capped at, say, 10M, just a few cable-modem / DSL users could bring you to a stand-still while streaming or downloading large files. The more info you give, the better quality answer you will receive.

Posted by mixmox, 09-11-2010, 09:06 AM
root@da ~]# free -m total used free shared buffers cached Mem: 2017 1785 232 0 163 1089 -/+ buffers/cache: 532 1485 Swap: 2047 0 2047

Posted by mixmox, 09-11-2010, 09:08 AM
top - 09:06:45 up 2 days, 3:49, 2 users, load average: 0.00, 0.29, 0.66 Tasks: 119 total, 2 running, 112 sleeping, 5 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.2%hi, 0.0%si, 0.0%st Mem: 2065948k total, 1828336k used, 237612k free, 167032k buffers Swap: 2096472k total, 116k used, 2096356k free, 1116016k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1 root 15 0 2156 640 552 S 0.0 0.0 0:00.46 init 2 root RT -5 0 0 0 S 0.0 0.0 0:04.11 migration/0 3 root 34 19 0 0 0 S 0.0 0.0 0:00.03 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:03.74 migration/1 6 root 34 19 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/1 7 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1 8 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/0 9 root 10 -5 0 0 0 S 0.0 0.0 0:00.02 events/1 10 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 11 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread 15 root 10 -5 0 0 0 S 0.0 0.0 0:00.64 kblockd/0 16 root 10 -5 0 0 0 S 0.0 0.0 0:06.47 kblockd/1 17 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid 122 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0 123 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/1 126 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd 128 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod 195 root 24 0 0 0 0 S 0.0 0.0 0:00.00 khungtaskd 197 root 15 0 0 0 0 S 0.0 0.0 0:25.60 pdflush 198 root 10 -5 0 0 0 S 0.0 0.0 0:48.18 kswapd0 199 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0 200 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 aio/1 351 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused 382 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0 383 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 ata/1 384 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 ata_aux 384 root 14 -5 0 0 0 S 0.0 0.0 0:00.00

Posted by Hillockhosting, 09-11-2010, 09:09 AM
give the top results when load is high. Right now I see the load of 0.00, 0.29, 0.66 which wont be of any help to check the issue.

Posted by M Bacon, 09-11-2010, 09:46 AM
What is your server specifications and are you running any kind of service that may spike the load?

Posted by mugo, 09-11-2010, 11:26 AM
you may also want to consider installing sysstat. That will measure and keep a running historicals on all resources.

Posted by SunShellHosting, 09-11-2010, 11:43 AM
Switch to CloudLinux and you'll not see high load. They have 30 days trial as well

Posted by mixmox, 09-11-2010, 06:43 PM
top - 18:40:56 up 9 min, 3 users, load average: 6.24, 4.85, 2.90 Tasks: 152 total, 1 running, 151 sleeping, 0 stopped, 0 zombie Cpu(s): 5.7%us, 1.3%sy, 0.0%ni, 91.1%id, 1.9%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2065948k total, 698276k used, 1367672k free, 40436k buffers Swap: 2096472k total, 0k used, 2096472k free, 393516k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 6220 apache 15 0 50356 30m 1684 S 0.7 1.5 0:00.04 httpd 6249 apache 16 0 50356 30m 1700 S 0.7 1.5 0:00.02 httpd 6548 root 15 0 2424 1056 800 R 0.7 0.1 0:00.03 top 5636 apache 15 0 50492 30m 1824 S 0.3 1.5 0:00.37 httpd 6233 apache 16 0 50356 30m 1696 S 0.3 1.5 0:00.02 httpd 6280 apache 16 0 50356 30m 1696 S 0.3 1.5 0:00.04 httpd 6305 apache 15 0 50348 30m 1696 S 0.3 1.5 0:00.02 httpd 6347 apache 15 0 50356 30m 1748 S 0.3 1.5 0:00.03 httpd 6348 apache 17 0 50356 30m 1696 S 0.3 1.5 0:00.02 httpd 1 root 15 0 2156 644 552 S 0.0 0.0 0:00.38 init 2 root RT -5 0 0 0 S 0.0 0.0 0:00.00 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 10 -5 0 0 0 S 0.0 0.0 0:00.00 events/0

Posted by mugo, 09-11-2010, 06:56 PM
Yep, it looks like your httpd process is the culprit, memory is ok, I would bet this are some of your larger files that are being hit, probably by a few users or more at a time. There are a few ways to go here...one basic method to see which files (while the load is high), if, say, your web path is /var/www/html, do a lsof |grep /var/www/html That will show you the files opened right then, and how many are being hit at once. netstat -n |grep 80 will show you your connections and amounts there-of... you can grep out just established (netstat -n |grep ESTAB) You can dump any of these to files by just adding > /path/to/files/dump.txt at the end of the command (if you didn't already know that)

Posted by mixmox, 09-12-2010, 05:52 PM
One Minute - 38.91 Five Minutes - 12.16 Fifteen Minutes - 4.29 top - 16:56:03 up 2 min, 1 user, load average: 38.91, 12.16, 4.29 Tasks: 424 total, 6 running, 409 sleeping, 0 stopped, 9 zombie Cpu(s): 40.6%us, 8.2%sy, 0.0%ni, 25.4%id, 25.3%wa, 0.1%hi, 0.3%si, 0.0%st Mem: 2065948k total, 1166968k used, 898980k free, 33872k buffers Swap: 2096472k total, 0k used, 2096472k free, 392732k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4356 alex 15 0 21632 9288 4520 S 5.1 0.4 0:00.12 php-cgi 4374 alex 16 0 21628 9284 4520 S 5.1 0.4 0:00.12 php-cgi 4243 alex 15 0 22596 9.9m 4588 S 4.2 0.5 0:00.21 php-cgi 4345 alex 16 0 21632 9284 4516 S 4.2 0.4 0:00.11 php-cgi 4351 alex 15 0 22448 9500 4540 S 4.2 0.5 0:00.11 php-cgi 4354 alex 16 0 21628 9280 4520 S 4.2 0.4 0:00.11 php-cgi 4355 alex 16 0 21628 9284 4520 S 4.2 0.4 0:00.12 php-cgi 4357 alex 16 0 21628 9284 4520 S 4.2 0.4 0:00.11 php-cgi 4363 alex 16 0 21628 9284 4520 S 4.2 0.4 0:00.11 php-cgi 4367 alex 16 0 21628 9280 4516 S 4.2 0.4 0:00.11 php-cgi 4368 alex 16 0 21632 9284 4520 S 4.2 0.4 0:00.11 php-cgi 4372 alex 16 0 21632 9284 4516 S 4.2 0.4 0:00.11 php-cgi 4378 alex 16 0 21632 9284 4520 S 4.2 0.4 0:00.11 php-cgi 4379 alex 16 0 21628 9284 4520 S 4.2 0.4 0:00.11 php-cgi 4382 alex 16 0 21628 9284 4520 S 4.2 0.4 0:00.11 php-cgi 4385 alex 16 0 21628 9284 4520 S 4.2 0.4 0:00.11 php-cgi 4390 alex 16 0 21632 9284 4516 S 4.2 0.4 0:00.11 php-cgi 4278 alex 15 0 22600 9.9m 4588 S 3.4 0.5 0:00.22 php-cgi 4444 alex 16 0 21160 7976 4128 S 3.4 0.4 0:00.04 php-cgi 4449 alex 15 0 21160 7852 4028 S 3.4 0.4 0:00.04 php-cgi 4451 alex 15 0 21160 7852 4028 S 3.4 0.4 0:00.04 php-cgi 4273 alex 15 0 22592 9.9m 4588 S 2.5 0.5 0:00.22 php-cgi 4307 mysql 15 0 99.2m 26m 3000 S 2.5 1.3 0:00.05 mysqld

Posted by akasharya, 09-13-2010, 01:23 AM
As you can see in this line "Cpu(s): 40.6%us, 8.2%sy, 0.0%ni, 25.4%id, 25.3%wa, 0.1%hi, " cpu is used by 40% by users(not by any system user, as you can see in sy=8.2%) and later you can see user alex is running a process php-cgi, the culprit is user "alex" so you can stop this process for temporary period using skill and then monitor the server load...or if you are using cpanel/whm then you can suspend this account for a temporary period.

Posted by inspiron, 09-14-2010, 07:45 PM
Check the ownerships and the permission of the script is set correct.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

Contact us