high load

webbyo

Verified User
Joined
Oct 11, 2011
Messages
9
I have high load, but cannot post the question here.. so a short version?
 
Now it is working:

I have a problem when i hit 100times f5 key on my website. Load is extremly high and server isn't reachable for other users for a long time..

Below some information/specs:
When i visit the site made in cakephp, mysql did 69 queries took 4 ms.

I have a VPS, with debian 6 installed 64bit
Code:
VPS has:
4096 MB ram, 
100 GB diskspace
4 CPU Cores
Intel X5650, 2.67Ghz processor

I installed directadmin custom build: Apache/2.2.21 & PHP 5.2.17 (cli)

top command give me this when server is stable:
Code:
top - 09:19:27 up 48 min,  1 user,  load average: 0.00, 0.02, 0.09
Tasks: 155 total,   1 running, 154 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.3%us,  0.6%sy,  0.0%ni, 99.1%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4061528k total,   531684k used,  3529844k free,    13388k buffers
Swap:  4290552k total,        0k used,  4290552k free,   159524k cached

I have 1 website running now on this server, visitors under 100/day

When i press f5 key on my site 100times top command give me this:
Code:
top - 09:34:58 up  1:03,  1 user,  load average: [B]49.08[/B], 13.48, 4.61
Tasks: 249 total,  86 running, 163 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.6%us, 97.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   4061528k total,  1115364k used,  2946164k free,    15080k buffers
Swap:  4290552k total,        0k used,  4290552k free,   159792k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3505 apache    20   0  106m  10m 2852 R    6  0.3   0:02.13 httpd
 3520 apache    20   0  106m  10m 2852 R    6  0.3   0:02.07 httpd
 3522 apache    20   0  106m  10m 2848 R    6  0.3   0:02.01 httpd
 3440 apache    20   0  116m  21m 3344 R    5  0.5   0:03.30 httpd
 3445 apache    20   0  115m  19m 3352 R    5  0.5   0:02.92 httpd
 3451 apache    20   0  111m  16m 3304 R    5  0.4   0:02.65 httpd
 3456 apache    20   0  111m  16m 3304 R    5  0.4   0:02.67 httpd
 3467 apache    20   0  107m  11m 2856 R    5  0.3   0:02.45 httpd
 3478 apache    20   0  106m  10m 2852 R    5  0.3   0:02.36 httpd
 3479 apache    20   0  106m  10m 2852 R    5  0.3   0:02.32 httpd
 3481 apache    20   0  106m  10m 2852 R    5  0.3   0:02.24 httpd
 3482 apache    20   0  106m  10m 2852 R    5  0.3   0:02.35 httpd
....... allot more...
What causes the server to have so much load? And what can I do about it?
 
MODERATORS DO YOUR WORK!!! i want to post my question but i always get: waiting for moderator to blablabla, but i have problems!!!

this is my question:
git://gist.github.com/1393421.git
 
Hello,

I don't know how to read your link... but if you need an urgent help, feel free to send a request from my site (see my signature).
 
Here the copy of his question:

I have a problem when i hit 100times f5 key on my website. Load is extremly high and server isn't reachable for other users for a long time..

Below some information/specs:
When i visit the site made in cakephp, mysql did 69 queries took 4 ms.

I have a VPS, with debian 6 installed 64bit
Code:
VPS has:
4096 MB ram,
100 GB diskspace
4 CPU Cores
Intel X5650, 2.67Ghz processor

I installed directadmin custom build: Apache/2.2.21 & PHP 5.2.17 (cli)

top command give me this when server is stable:
Code:
top - 09:19:27 up 48 min, 1 user, load average: 0.00, 0.02, 0.09
Tasks: 155 total, 1 running, 154 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.6%sy, 0.0%ni, 99.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4061528k total, 531684k used, 3529844k free, 13388k buffers
Swap: 4290552k total, 0k used, 4290552k free, 159524k cached

I have 1 website running now on this server, visitors under 100/day

When i press f5 key on my site 100times top command give me this:
Code:
top - 09:34:58 up 1:03, 1 user, load average: [B]49.08[/B], 13.48, 4.61
Tasks: 249 total, 86 running, 163 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.6%us, 97.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.1%si, 0.0%st
Mem: 4061528k total, 1115364k used, 2946164k free, 15080k buffers
Swap: 4290552k total, 0k used, 4290552k free, 159792k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 3505 apache 20 0 106m 10m 2852 R 6 0.3 0:02.13 httpd
 3520 apache 20 0 106m 10m 2852 R 6 0.3 0:02.07 httpd
 3522 apache 20 0 106m 10m 2848 R 6 0.3 0:02.01 httpd
 3440 apache 20 0 116m 21m 3344 R 5 0.5 0:03.30 httpd
 3445 apache 20 0 115m 19m 3352 R 5 0.5 0:02.92 httpd
 3451 apache 20 0 111m 16m 3304 R 5 0.4 0:02.65 httpd
 3456 apache 20 0 111m 16m 3304 R 5 0.4 0:02.67 httpd
 3467 apache 20 0 107m 11m 2856 R 5 0.3 0:02.45 httpd
 3478 apache 20 0 106m 10m 2852 R 5 0.3 0:02.36 httpd
 3479 apache 20 0 106m 10m 2852 R 5 0.3 0:02.32 httpd
 3481 apache 20 0 106m 10m 2852 R 5 0.3 0:02.24 httpd
 3482 apache 20 0 106m 10m 2852 R 5 0.3 0:02.35 httpd
....... allot more...
What causes the server to have so much load? And what can I do about it?
to me it look like apache is taking lot of cpu, what those script should do? have you think about use eaccelerator or apc for cache php scripts? also, have you think about use mod_ruid2 for run the scripts under their own owner (not apache) so you can check which user/website is loading so much for furthere investigations?

Maybe the I/O of the server is not such good, or, maybe, the VPS performance are not enough for the scripts running on that box.

Zeiter prolly would have other suggestions.

Regards
 
Hi SeLLeRoNe's thanks for your answer.

I just installed a minute ago a clean wordpress blog, the latest version. If i press 100 times f5 key (refresh) on that blog I get the same high loads as what my own scripts do.
So it's not my script which causing any problems, because the clean wordpress installation is doing the same.

mod_ruid2 isn't nessesary right now because it only runs now 2 websites. But thanks for the tip!

How can i check if it is the I/O ?

I think it is apache that causing the high load, but i really dont know what to do.

I use the standard configuration mysql/apache that comes with the directadmin installation
 
Why and for what purposes you need to
press 100 times f5 key
And are you sure, you pressed 100 times, not 101? Maybe 101 times and 1 time makes the things differ?

What type of Virtualization is it? OpenVZ? XEN? KVM? Other? The node might be oversold.

I agree with Andrea, and mod_ruid together with APC or eAccelerator would be a good start.
 
Well, i press 100times (not exactly) because other visitors can do that too.. and a load +50 is not cool for visitors visiting my site.
They have to wait a couple minutes to view my site... thats not cool!!

The virtualization is KVM.
 
other visitors can do that too.. and a load +50 is not cool for visitors visiting my site

That's true, and that is why you'd better
1. limit number of requests per second with firewall from every single IP.
2. limit number of requests on per vhost bases with Apache or a light and quick front-end to it.
3. limit number of concurrent requests to MySQL from an user.
4. tune apache, ulimit
5. install mod_ruid2
6. install either APC or eAccelerator.
7. use pam_limit
 
That's true, and that is why you'd better
1. limit number of requests per second with firewall from every single IP.
2. limit number of requests on per vhost bases with Apache or a light and quick front-end to it.
3. limit number of concurrent requests to MySQL from an user.
4. tune apache, ulimit
5. install mod_ruid2
6. install either APC or eAccelerator.
7. use pam_limit

Thanks.

But my visitors of my server is a few so 1,2,3 is not my problem but i will do that.
Could you please give me links about 2-7 lists?
Thanks
 
is not my problem but i will do that.

I'd rather say that not... According to what I've seen in your thread you need it.

Could you please give me links about 2-7 lists?

Sorry, no. Please search the forums, most of these steps have been discussed here many times. Add site:directadmin.com/forum to your request on Google to search only on these forums.
 
please answer my questions:

1) why when my server load 6-15% my server software send me alert and mysql become down?

(i think a server must used 90% load without problem)

2) i have only 2 website in my server and i saw my web counter (javascript code that some website give us for tracking status of visitors) and i see only 3 page view i have to day and last day but i had several email about high load server and one of them was 67% load!!!
my server has 4GB RAM and Celeron DualCore with centos64bit.

Why with only 3 user my site had high load and mysql was downed?

Thanks
 
Last edited:
why when my server load 6-15% my server software send me alert and mysql become down?

Nobody knows but you. I'll be able to answer your question, if I get logged in into your server with root privileges via SSH.

i have only 2 website in my server and i saw my web counter (javascript code that some website give us for tracking status of visitors)

Javascript counters are not 100%-reliable. They won't show you (D)DoS attacks or other bots, which does not support JS.

Why with only 3 user my site had hig load and mysql was downed?

If you need an answer on this question, you should post extracts of logs, and do some investigation work. It's really hard to help you without any actual information, so if you need a quick help, you should either ask your provider or hire somebody from these forums, who offers such a service. Sen me a PM for a quote, if you need my assistance.
 
Nobody knows but you. I'll be able to answer your question, if I get logged in into your server with root privileges via SSH.



Javascript counters are not 100%-reliable. They won't show you (D)DoS attacks or other bots, which does not support JS.



If you need an answer on this question, you should post extracts of logs, and do some investigation work. It's really hard to help you without any actual information, so if you need a quick help, you should either ask your provider or hire somebody from these forums, who offers such a service. Sen me a PM for a quote, if you need my assistance.

Thanks.
I chanched my httpd.conf and my.cnf to optimize them.
I must wait for see these change affect or not.
 
While you can't expect all moderators to be available all the time, I thought I did actually approve and respond to one of your posts. However you made a lot, and the new forum layout makes it very hard to follow whether a post is moderated or not, so I could have missed all of them. I've not approved your post today because since it was copied into the forum there's no need.

In general, while you can do lots of things to mitigate a DOS attack, there's really no substitute for plenty of resources to throw at a problem. An optimzed my.cnf file can go a long way to helping.

Did I read somewhere above that you're using a VPS? If so you may need to get your provider involved in getting you the resources you really need.

Jeff
 
While you can't expect all moderators to be available all the time, I thought I did actually approve and respond to one of your posts. However you made a lot, and the new forum layout makes it very hard to follow whether a post is moderated or not, so I could have missed all of them. I've not approved your post today because since it was copied into the forum there's no need.

In general, while you can do lots of things to mitigate a DOS attack, there's really no substitute for plenty of resources to throw at a problem. An optimzed my.cnf file can go a long way to helping.

Did I read somewhere above that you're using a VPS? If so you may need to get your provider involved in getting you the resources you really need.

Jeff

Ok. Thanks.
No i have not VPS i have dedicted with 4GB RAM and a Celeron Dual Core.
 
Back
Top