I saw a few threads here recently complaining about PHP + Redis
Of course, that didn't sound right. Those guys were using single-
threaded, non-pipelined benchmarks.
But I had some free time today so I whipped up a simple script to test
Source code: http://gist.github.com/427176
It's a PHP script that uses Predis 0.6.0.
1) It creates 100,000 keys with short values. SET commands are
pipelined in groups of 100 to speed things up.
2) It forks a bunch of children. Default is 10.
3) Each child makes 10,000 GET requests. Again, the commands are
pipelined in groups of 100.
4) The parent times the whole thing. The measurement method is rather
primitive, but it does the job.
The test was run on an Ubuntu machine, running inside VirtualBox with
4 CPU cores.
Redis 2.0 RC1 was used. Of course it was running on only one core.
20,000 SET/s (single-threaded, pipelined in groups of 100)
65,000 GET/s (multi-threaded, pipelined in groups of 100)
So there you go. PHP + Redis ain't slow.