Archive for the 'technology related' Category

Redis vs Filesystem as Page Cache for WordPress

I’ve been curious about how Redis compares to plain filesystem as page cache for WordPress running behind Nginx. Bottom line: the filesystem along with Linux file cache is way faster.

Benchmarks have been conducted on a random KVM and WordPress. The latter’s plugins do not matter, because pages are only generated once and then cached.

The first blog, the one using a plain filesystem as cache, has been run with WP Super Cache plus on EXT4.
The second one utilized my plugin CDN Linker; see the caching branch for its source code. Nginx has been 1.1.12-r2 with HttpRedis 0.3.5; Redis 2.4.5.

Tests have been conducted by:

/usr/sbin/ab2 -n 50000 -c 5 -H 'Accept-Encoding: gzip' -k [url]

Results:

  • filesystem – 17000 – 19000 requests per second, about 50-60 ns per request
  • Redis – 5000 – 5200 requests per second, about 194 ns per request
  • Redis w/o keepalive connection from Nginx – 1700-1900 rps, ~500 ns per request

I suspect that even if I connected Redis to Nginx through unix sockets (and not the usual TCP sockets) requests per second would only double, still significantly falling behind filesystem as cache. Nanoseconds per request would drop, though, but I do not believe that I will see anything near a three- or five-fold increase.

how to set up a linux box as IPv6 router


It doesn´t matter whether your ISP provides IPv6 or you are behind an antediluvian router. As long as you have a spare box running Linux – or better yet, a SheevaPlug – you can welcome your LAN to the future in less than five minutes. And here is how: Read more »

Did you know fcron?

One of the first things I replaced years ago, when I have started with Gentoo, was the cron daemon. Now I use Thibault Godouet’s fcron – which understands that vintage cron syntax and more – and since then have never looked back. Read more »

tips for http request minimizations

Clicking on the front page of my blog resulted in about 13 http requests. Unnecessarily, has been my opinion. By some trivial steps which you can repeat, I have reduced that to three. A reduction of 77%. But, see it yourself on following waterfall charts.

Here’s how I have done that and what you can do to optimize your blog: Read more »

Next Page »