3 ms·
"The entire dataset is in RAM." How can they guarantee that, when RAM is little more than a disk cache on modern operating systems? Is there a syscall that pr
by adamtj 16y ago
"The entire dataset is in RAM."
How can they guarantee that, when RAM is little more than a disk cache on modern operating systems? Is there a syscall that prevents specified pages of virtual memory from being paged out to disk? Or is Redis implemented as a kernel module?
- wingo 16y agoYour swap should be off, and there is mlockall(2). The kernel does let userspace have a /little/ fun on its own.
- antirez 16y agoRedis uses a memory layout that, unless the instance is completely idle, will make it very easy to touch every page even if there are just a few queries per second. So fare in two years we never saw an instance where there was a latency problem because part of the dataset was swapped on disk by the OS. This is why we currently don't use mlockall().