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.

When I type ab -c 2 -n 100 (myurl.com)

and have top up... my cpus on apache average 10% an average of 15-20% load on top

My requests per a second is pretty low... or is it?

Requests per second: 3.47 [#/sec] (mean)

How should I go about optimizing this....?

Linode VPS 512MB ram Apache/Php5/Apc

share|improve this question
2  
-c2 -n100 is a small run. You should do large values of n to even out any anomalies. You're only asking for 100 requests at 2 per second. That's not very many in the web-scaling scheme of things. –  Tom O'Connor Feb 15 '10 at 7:37
    
How do I judge whether or not apache is performing well or not? What's an expected good request per second vs benchmark? –  Daniel Fischer Feb 15 '10 at 8:46
1  
DFischer, there isn't one. It depends on what content you're serving, what Apache modules you are using and what you're doing with PHP at the backend. There's a LOT to learn in terms of scale. Bad high is when things have to wait. That generally means 100% CPU usage, processes in iowait state, and for webserver and database servers, paging to disk (i.e. swapping) –  Philip Reynolds Feb 15 '10 at 9:10

2 Answers 2

up vote 2 down vote accepted

You may want to try jmeter instead, or at least try ab over various values of c at a large n. There really is no such thing as "bad high load" unless it affects your response time, and as Erik pointed it the slowness may be your database or other factor.

What you want is basically enough data to make a curve of load vs response time. Then you should match up your desired/planned amount of Web site load and see if you're able to get there.

Having said that, there's no reason a normal Apache setup on a normal Linux box can't spit out 800+ requests per second - heck, Apache on Windows on my work desktop PC does 500 - so you should also test a static page vs a php page vs a database-backed php page to narrow down where the problem is.

share|improve this answer

If your page is making connections to your database etc, the load your seeing may be related more to your database performance than Apache. Generally 3.4 requests per second isn't stellar but Apache Bench may be limited by the host it's running on.

share|improve this answer

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.