5 ms·
> According to benchmarks, writes to SSDB are slightly slower but reads are actually faster than Redis! How is this possible? Surely reads from RAM are faster
by 3pt14159 6y ago
> According to benchmarks, writes to SSDB are slightly slower but reads are actually faster than Redis!
How is this possible? Surely reads from RAM are faster than disk?
- welder 6y agoThe magic of Google's LevelDB? Seriously though, I don't know and I'm not sure if it's an accurate benchmark. I just know our statsd metrics show it performing just as fast as official Redis on much larger data sets, so that benchmark is probably correct.
- throwaway823882 6y agoI don't know Redis' design, but all sorts of things can slow down a program's reading from memory, from CPU cache misses to mutexes, garbage collection, CPU utilization, or something else (I don't know Redis' design). Whereas the page cache and disk cache can be very efficient, without anything but more reads/writes to get in your way. Or maybe the program reading from memory is single-threaded, and the program reading from disk isn't.
- avinassh 6y ago> How is this possible? Surely reads from RAM are faster than disk? even I am so surprised. I will try to run the benchmarks myself and see. but... can anyone really explain how can a disk based solution be faster than RAM