[英]How to check if files are served from tmpfs memory cache or disk cache
[英]Is there a way to check how much of a file is present in the disk page cache?
我想看看在内核的磁盘页面缓存中存储了多少块文件。 我可以查看任何界面来查看这个吗? /proc
某些东西?
据我所知, /proc
没有类似的东西。 跟踪该信息并通过/proc
暴露它的开销可能会令人望而却步。
达蒙建议你最好的选择是mmap()
“荷兰国际集团的文件,并使用mincore()
更新 :我编写了mincore()
想法,它似乎按预期工作。
你可以使用fincore 。 非常好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.