문제

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