linux - tmpfs使用的内存是否可以像page cache一样被回收?

标签 linux tmpfs

我正在使用 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/

相关文章:

linux - 如何从终端重新加载 Google Chrome 选项卡?

linux - 我可以使用 Google Earth Server 作为 openLayers 的 basemap 吗?

c++ - Eclipse调试器: ".settings does not exist" error

django - docker tmpfs 似乎对 postgresql 没有影响

docker - 使用 ramdisk 更快地构建 Dockerfile

linux - 比较目录和压缩目录(有没有新变化)

linux - ASLR 是否启用 libc 随机化函数地址?

c - 将命令的输出重定向到/proc