Adventures with WordPress

I set up a blog for Iambe and decided to play a bit with the WordPress blogging engine and thought it was pretty slick compared to Movable Type and started looking at using it for this Blog.

The install of the latest version, WordPress 2.1 was super-easy, unzip, put in the database login information, go to a page and it’s pretty much done. Very slick. The Admin UI is a bit complex looking at first, but it’s got things nicely set up, fully WYSIWYG editing, some sexy AJAX effects, etc. It can even import movable type importer.

Couple of major gotchas though. First of all is performance. Unlike Movable Type, WordPress uses dynamically generated pages. MT creates static HTML pages and has to “rebuild” the site when new content is posted. Dynamically generated pages of course are easier because it’s, well, dynamic of course, but static HTML has a huge speed advantage.

On my webserver (dual CPU 1.13ghz P3 with 2G of ram, Apache2 and MySQL 5.0.26) my default WordPress 2.1 install gave me approximately 2.5 requests/second, which is a far cry from MT’s 1700 requests/sec, though not surprising due to the dynamic vs static. It also pumps the load up to 29 and keeps both CPUs pinned. This is tested with “ab2 -n 100 -c 10 http://testsite/blog/index.php”.

A couple of tweaks to MySQL as described here I got the speed up to 4.14 requests/second. The next thing was to install wp-cache 2.0. This didn’t seem to do anything. In fact, I’m not even sure that it’s working as none of the comments that are supposed to be appended to cached pages show up.

Some other tips I found on this page and this one didn’t seem to do much, or were impractical or not valid in this situation. I had high hopes for the persistant object cache, but enabling it didn’t do anything either.

I finally fixed this…. turns out that you have to add the WP_CACHE line into the middle of the file or it won’t work (but the plugin will still load and be enabled. I was finally able to get 60 (cold) to 200 (hot) requests/sec with this.

The other (minor, kinda) issue is that it manged some of my older posts, translating carriage returns into <BR> tags. Probably fixable with a plug-in or configuration change, still, a bit of a PITA that I’ll have to dig into.

Scroll to Top