Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance
by yaaminu on Sunday July 23, 2017 @05:47PM
(#14834588)
Redis can now be multi threaded in custom modules
[ Parent
| on HN ]
Re:Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance
by dvirsky on Sunday July 23, 2017 @05:52PM
(#14834608)
Sort of - the model it supports is not really multi-threaded. The modules can spawn threads, and acquire a "GIL" when they want to touch actual Redis data - thus only one thread at a time actually "owns" the entire Redis instance.
This allows long running queries to do primitive cooperative multi-tasking, releasing the GIL and letting other queries have a chance; But there is no real parallel data access. You will only gain real parallelism if you have actual work to do that does not touch the data directly when a thread is not touching the GIL. There aren't many cases that this applies to - usually copying the data aside to do work on it is not worth the gain of parallelism.