Benchmark Early and Often
Out Of Date Warning
Languages change. Perspectives are different. Ideas move on. This article was published on October 3, 2008 which is more than two years ago. It may be out of date. You should verify that technical information in this article is still current before relying upon it for your own purposes.
This past week I had to deal with a new concept: a client site that failed due to excessive load. Most of the week was spent optimizing the site by doing the critical components: installing APC, ensuring that our caching (Akamai) was satisfactory and properly configured, and making performance improvements.
But one thing that became very important was the benchmark test. Using ApacheBench, we identified the blind spots, weak spots, and bottlenecks in our web server (WordPress…duh) and worked to address them.
Running ApacheBench is so absolutely easy. Everyone should do it. The command is simple:
ab -n 1000 http://www.example.com/
That’s it. This calls ApacheBench to do 1,000 hits to your website. It produces a report, showing you important stats like the number of hits per second processed by the web server. It’s also fun to do things like disable APC and re-enable it, and see the difference – here on BrandonSavage.net there is a 480% improvement with APC turned on.
And the best part about ApacheBench is that it comes standard with Apache. No need to install a separate package. It’s fun, fast, easy, and important. If there are bottlenecks in your website, you need to know it…before the load takes it down.
Write better object
oriented PHP today.
A brand new book on object oriented PHP that will leave you an object oriented master.Learn more about the book »