If /tmp is mounted with tmpfs, does this increase the speed of file I/O? Would file I/O to tmp in this way perform as well as something like redis? I'm wondering about all resources, not just speed.

有帮助吗?

解决方案

In general, increasing access speed (latency and throughput) is the idea of having tmpfs. Instead of flushing to hard disk all the time, the file system will try to keep all the content in RAM, which leads to very low latency compared to a normal disk-based file system. Obviously once you run out of RAM, it has to resort to using an on-disk swap file.

This blog post describes using tmpfs to improve the speed of serving websites, and goes into a lot of technical detail if you're interested: 30x Faster Cache and Site Speed with TMPFS

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top