buffer與cache的理解

2021-09-20 13:55:26 字數 252 閱讀 4074

也就是說buffer是用於存放要輸出到disk(塊裝置)的資料的,而cache是存放從disk上讀出的資料。這二者是為了提高io效能的,並由os管理。

釋放掉被系統cache占用的資料;

echo 

3 > /proc/sys/vm/drop_caches

可以通過讀取乙個大檔案來測試cache。

free命令的所有輸出值都是從/proc/meminfo中讀出的。

更多介紹參考:

buffer 與cache 的理解

buffer 與cache 通過 man free buffers memory used by kernel buffers buffers in proc meminfo cache memory used by the page cache and slabs cached and srecl...

buffer 與cache 的區別

有句原文解釋的很好。a buffer is something that has yet to be written to disk.a cache is something that has been read from the disk and stored for later use.cach...

buffer 與cache 的區別

buffer 與cache 的區別 a buffer is something that has yet to be written to disk.a cache is something that has been read from the disk and stored for later ...