VPS has:
4096 MB ram,
100 GB diskspace
4 CPU Cores
Intel X5650, 2.67Ghz processor
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
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...
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?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:
What causes the server to have so much load? And what can I do about it?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...
And are you sure, you pressed 100 times, not 101? Maybe 101 times and 1 time makes the things differ?press 100 times f5 key
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
is not my problem but i will do that.
Could you please give me links about 2-7 lists?
why when my server load 6-15% my server software send me alert and mysql become down?
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)
Why with only 3 user my site had hig load and mysql was downed?
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.
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
I chanched my httpd.conf and my.cnf to optimize them.
I must wait for see these change affect or not.
Problem solved.And how does work for now?