The difference between buffers and cache
Buffers are associated with a specific block device, and cover caching of filesystem metadata as well as tracking in-flight pages. The cache only contains parked file data. That is, the buffers remember what's in directories, what file permissions are, and keep track of what memory is being written from or read to for a particular block device. The cache only contains the contents of the files themselves.
Corrections and additions to this section welcome; I've done a bit of guesswork based on tracing how /proc/meminfo is produced to arrive at these conclusions.
本文详细解释了操作系统中缓存(cache)与缓冲(buffers)之间的区别。缓冲主要与特定块设备相关联,不仅缓存文件系统的元数据还跟踪正在处理的页面。而缓存仅包含已停放的文件数据,即文件的实际内容。
627

被折叠的 条评论
为什么被折叠?



