Apache Benchmarking (ab) on CentOS

I kept forgetting the Apache Benchmark location on CentOS servers, so for my own reference:

# /usr/local/apache/bin/ab

Apache Benchmarking is a great tool for testing Apache performance on web servers, for example running the following bash command:

# /usr/local/apache/bin/ab -n 100 -c 5 http://google.com/ 

This will test 100 connections (-n), limited to 5 concurrent connections (-c) on the website google.com

You can also run Apache Benchmarking straight from Mac terminal using:

# ab -n 100 -c 5 http://google.com/ 

Tip: make sure you end the url to test with a trailing slash or filename or the command won’t work

WP Super Cache Not Working After Server Move

I moved the server I host this site on recently, and it got noticeably slower (despite better hardware), it turned out my caching plugin (WP Super Cache) had stopped working, which caused a double performance hit (no caching & the failing script).

My site used to be stored in /home2 but now it’s in /home , but WP Super Cache had hardcoded this in a file it produces (wp-content/advanced-cache.php).

You can either:

  • edit lines 8 & 9 of advanced-cache.php with the new path (for example I changed /home2 to /home)
  • deactivate / reactivate the plugin which seems to cause these files to be regenerated

My WordPress site is now blistering fast again!

If you’re not using WP Super Cache on your WordPress site, shame on you, oh and get it here – http://wordpress.org/extend/plugins/wp-super-cache/