对我来说,Linux内存概念中的buffer
和cache
之间的区别不是很清楚。我阅读了这篇文章,我认为它们之间的区别是到期策略:
buffer
的策略是先进先出cache
的策略是最近最少使用。
我理解的对吗?
特别地,我正在研究两个命令:free
和 vmstat
james@utopia:~$ vmstat -S M
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
5 0 0 173 67 912 0 0 19 59 75 1087 24 4 71 1
james@utopia:~$ free -m
total used free shared buffers cached
Mem: 2007 1834 172 0 67 914
-/+ buffers/cache: 853 1153
Swap: 2859 0 2859