buffer與cache的理解
html
A buffer is something that has yet to be "written" to disk.
ide
A cache is something that has been "read" from the disk and stored for later use.性能
也就是說buffer是用於存放要輸出到disk(塊設備)的數據的,而cache是存放從disk上讀出的數據。這兩者是爲了提升IO性能的,並由OS管理。測試
釋放掉被系統cache佔用的數據;spa
echo 3 > /proc/sys/vm/drop_cachesrest
能夠經過讀取一個大文件來測試cache。orm
free命令的全部輸出值都是從/proc/meminfo中讀出的。htm
更多介紹參考:http://www.cnblogs.com/coldplayerest/archive/2010/02/20/1669949.htmlblog