Michal Čihař - Archive for May 22, 2007

Xcache opcode cacher

As I wrote in previous post, memcached didn't help as expected with wiki performace, so it was time to look for something else.

Since I'm using lighttpd, I still considered using of XCache, but the Debian package is not really up to date (now it even does not install with current php), so it was too much effort.

But today I decided it's time to try it. I built package from current version (you can get it on debian.cihar.com), installed and it seems to increase performance a lot. Most visible it is on wiki pages, which now take about quarter of time to process. I only hope it won't have any stability impacts, but it survived fine stress tests I did so far.

Caching slows things down?

I've been using memcached for some time on phpMyAdmin wiki and it seemed to help. But recently the performance went down. I didn't have time to investigate it till today and it turns out to be caused by memcached. When I switch it off, page load time goes from 16 seconds to 0.25 seconds.

I tried to search for some similar problems on the net, but I didn't succeed. So for now wiki runs without memcached and I will look at other possibilities of caching later.

Update: If you're interested about versions, it is MediaWiki: 1.7.1, PHP: 5.2.3-1 (cgi-fcgi), MySQL: 5.0.41-Debian_2-log and I have enabled persistent connections to MySQL.