Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a big problem, My Apache server use 50% of CPU when I have many visits, my website have only 30 000 pages viewed/day and many static content, but the server load is between 10% and 50%, I am on Windows. My current MPM settings are :

<IfModule mpm_winnt_module>
ThreadsPerChild       750
MaxRequestsPerChild 10000
</IfModule>

My server is : Intel® Core™2 Duo T5500 (2*1,66Ghz), 2GB RAM

How can I solve this problem ?

share|improve this question
1  
For starters, get a real server. It'll make a big difference. Xeons are optimized for this workload, your CPU is not. –  MikeyB Sep 20 '11 at 14:37

1 Answer 1

up vote 2 down vote accepted

I would guess you are just running into the limits of your server although it depends on what you are serving. Serving 30k/day small static files shouldn't cause this load but 30k/day of an optimized CMS like Drupal/Wordpress sounds about right. Your CPU is also on the low end of dedicated servers...I have some Intel i3 540 servers that I consider "low end" that benchmark at about 3x your CPU. On top of all that you have the overhead of Windows into the mix.

There are a few things you can do to confirm and narrow down the issue: - Use Apache's mod_status to look at what requests it is serving. This will give you an idea of what the server is doing when the load is high and may point towards a slowing page. - Benchmark your site using ApacheBench/Siege (I don't know what some good Windows benchmark programs are). This will tell you your site's capacity limit and will also tell you what effect any optimizations you perform have on its performance.

Anything beyond this really depends on your specific application and server architecture.

share|improve this answer
    
It's 30k/day only for my CMS, because I have many static content, I will tell you the number with mod_status. –  Kamiil Apr 28 '11 at 6:36
    
Some stats : Server uptime: 2 hours 29 minutes 26 seconds Total accesses: 521919 - Total Traffic: 7.0 GB 58.2 requests/sec - 0.8 MB/second - 14.0 kB/request 252 requests currently being processed, 498 idle workers –  Kamiil Apr 28 '11 at 9:39
    
Now: Total accesses: 2554925 - Total Traffic: 38.8 GB 74.6 requests/sec - 1.2 MB/second - 15.9 kB/request 280 requests currently being processed, 470 idle workers –  Kamiil Apr 28 '11 at 16:40
    
With that many requests on that low end a server it is no wonder you are seeing a high load. Its a pretty good chance you're just hitting the serving limits of your hardware, be it CPU, memory, IO, or a combination thereof. You can either move to better hardware (better server or more servers), optimize your current configuration, or change the application setup (i.e., add caching where needed). –  uesp Apr 28 '11 at 22:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.