我正在使用 tmpfs 和 /tmp
目录。但是,当我添加文件时,free -h
的输出显示 cached
列值也会增加。
但是,我想知道 页面缓存 使用信息也被添加到 cached
中。 /tmp
目录下的文件所占用的内存,是否可以像page cache一样,在内存不足时回收。
最佳答案
如 kernel tmpfs 中所述:
size: The limit of allocated bytes for this tmpfs instance. The default is half of your physical RAM without swap. If you oversize your tmpfs instances the machine will deadlock since the OOM handler will not be able to free that memory.
明确表示tmpfs内存不能回收
关于linux - tmpfs使用的内存是否可以像page cache一样被回收?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40259920/