3 ms·
I don't really see the value in this. Note that a tmpfs can still be swapped, so unless you disable swap it's certainly not a "pure in-memory DB". You're not
by ajross 14y ago
I don't really see the value in this. Note that a tmpfs can still be swapped, so unless you disable swap it's certainly not a "pure in-memory DB". You're not really changing the performance uncharacteristics here, just the way the backing store is managed. It really shouldn't be any faster or slower to run in tmpfs vs. a real filesystem for a typical case. There are edge cases like what kind of VM pressure can eject a clean page, but really nothing that would change the architecture. This is really just a different way of tuning the installation.
- cpleppert 14y agoI think this idea is kind of pointless on an architectural level anyway. If you are going to use an in-memory database you might as well use one that is tuned to that kind of use case. MongoDB organizes its data assuming everything will be flushed to disk at some point and doesn't make any of the optimizations available to an main memory database. Not to mention the hoops you have to go through to administer this setup. Mongodb is already essentially tuned for working sets that fit in memory. If your disk is a bottleneck after turning after data durability(journaling,fsync etc) you are doing something wrong. Redis at the very least would be far better for this use case.