4 ms·
The code handles concurrency the same way that redis handles concurrency. It's single threaded.
by frognibble 16y ago
The code handles concurrency the same way that redis handles concurrency. It's single threaded.
- gecko 16y agoRedis 2 is multithreaded. The weird thing for me is that MiniRedis is 1/4th the speed of Redis 2 (using redis-bench, included with Redis 2, to measure), which means that being both single-threaded and written in a relatively slow scripting language didn't hurt performance that much. I haven't taken the time to figure out why; I thought Redis would be much faster.
- antirez 16y agoBecause Redis is in part I/O bound, this is why Redis 2.0, and even more Redis 2.2 (currently git master) are using the spare CPU in order to use less memory, with specially encoding for small lists, sets, hashes. Btw 25% the speed means a lot slower :) My guess was that the difference for small keys that the redis-benchmark is stressing would be smaller. I think that with big lists or using the SORT command the difference will be bigger. Cheers, Salvatore