
The first thing I did was to install a fresh copy of Textpattern on a little used server. This particular server is a dual Xeon with 3 gigs of RAM. It doesn’t get much use and has only had some basic Apache and MySQL tweaking. Once I had Textpattern installed, I loaded up some sample data and comments. It doesn’t do much good to performance test an installation without data in it. The only other tweak I made was to change the Production Status to Live.
After everything was installed and loaded up, I ran my first benchmark. I used ApacheBench to find out the Requests per second. On this fresh install, the Requests per a second was an average of 34.25 over three runs (Note, I use ApacheBench with -kc 10 -t 30 -H “Accept-Encoding: gzip,deflate�). Not bad performance out of the box!
The next thing I did was to put the tag on the page so that we could imitate the ‘real world’ a little bit more. Upon benchmarking, there was a dip in the average Requests per second down to 29.47. You can very easily come to the conclusion that utilizing tags that hit the database in any way is going to drop performance. To prove that conclusion, I went ahead and added a tag as well. Sure enough, the Request per a second dropped to an average of 27.91.
Once I had an installation with data in it and some commonly used tags, I decided to see what would boost performance. The first thing I did was to turn off all logging (admin->preferences->Logging->none). I ran the benchmark and did see an improvement up to an average Requests per a second of 29.05. Nothing to write home about, but it did gain back some performance loss from the additional tags.
Next, I decided to try what has been touted as a good performance gain. I topped using the tag and instead hard coded a file name and copied the CSS information into the specified file. After running the benchmark, I found that it really wasn’t even worth my time. On average I was now serving 29.41 Requests per second.
There really isn’t much other tweaking to do within the Textpattern preferences, so I moved along to what I knew would be a huge performance gain. I install asy_jpcache. I didn’t change any configuration settings, but just followed the installation instructions to the letter. The result? I stellar 252.45 Requests per a second! Hats off to this plug-in/mod.
The moral of the story? Use caching if you need great performance from your Textpattern installation.