[wp-hackers] 5 minutes to a faster blog

Matt Mullenweg m at mullenweg.com
Fri Dec 1 18:44:48 GMT 2006

Sebastian Herp wrote:
> - enabling the mysql query cache helped a lot, but only if the $now in 
> the posts-query gets frozen 
> (http://comox.textdrive.com/pipermail/wp-hackers/2006-January/003885.html), 
> otherwise the frontpage doesn't benefit too much from it

This sort of hack isn't needed anymore in 2.1.

> - switching to innodb actually decreased performance (nearly not 
> measureable) on my install, but maybe my blog is too small with its 1500 
> posts

It's probably a configuration issue. InnoDB is almost always faster, but 
it has to be properly configured. Honestly with 1500 posts your DB is 
small enough that it should be in-memory all the time.

> - enabling the built in cache decreased performance by 10%. So I guess 
> my HD is simply too slow :-)

You may want to try one of the alternate cache backends, like APC or 

> - deactivating the gzip compression in the wp options panel increased 
> performance a little bit

I would always recommend doing gzip on the web server level, not the PHP 
level. You can also set it to the lowest possible compression setting 
and still get size gains of 20-30% with no perceptible CPU hit on a 
modern server.

> - activating wp-cache (the plugin) increased performance by a factor of 
> 6 (on my blog from 5 request per second to 30 request per second)

30 * 86400 = 2,592,000 PHP pageviews a day on a singe server. Digg + 
Reddit usually only send 50-100k. Properly done caching can have 
benefits many times the effect of higher-level changes. Make sure you 
focus your attention in the right place.

On WordPress.com, unless something is broken, SQL usually only accounts 
for 5-15% of page generation time.

Bonus tip: Perceived speed is more important than real speed. Make sure 
there isn't too much Javascript, ad crap, and external widgets on your 
blog slowing down the loading time for clients.

Matt Mullenweg
  http://photomatt.net | http://wordpress.org
http://automattic.com | http://akismet.com

More information about the wp-hackers mailing list