linux cache與buffer的區別
The page cache caches pages of files to optimize file I/O. The buffer cache caches disk blocks to optimize block I/O.
Prior to Linux kernel version 2.4, the two caches were distinct: Files were in the page cache, disk blocks were in the buffer cache. Given that most files are represented by a filesystem on a disk, data was represented twice, once in each of the caches. Many Unix systems follow a similar pattern.
This is simple to implement, but with an obvious inelegance and inefficiency. Starting with Linux kernel version 2.4, the contents of the two caches were unified. The VM subsystem now drives I/O and it does so out of the page cache. If cached data has both a file and a block representation—as most data does—the buffer cache will simply point into the page cache; thus only one instance of the data is cached in memory. The page cache is what you picture when you think of a disk cache: It caches file data from a disk to make subsequent I/O faster.
The buffer cache remains, however, as the kernel still needs to perform block I/O in terms of blocks, not pages. As most blocks represent file data, most of the buffer cache is represented by the page cache. But a small amount of block data isn't file backed—metadata and raw block I/O for example—and thus is solely represented by the buffer cache.
Short answer: Cached is the size of the page cache. Buffers is the size of in-memory block I/O buffers.
cache快取檔案系統頁,而buffer快取塊IO;2.4兩者合併,現在buffer用途很窄,僅限於raw block
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15480802/viewspace-1168333/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- buffer與cache的區別
- Buffer 與 Cache 的區別
- Linux Buffer/Cache 的區別Linux
- Linux free中buffer與cache區別Linux
- buffer 與cache 的區別2
- Buffer和Cache的區別
- Cache 和 Buffer的區別
- Cache 和 Buffer 的區別在哪裡?
- 轉貼_大牛_tolywang_Buffer 與 Cache 的區別
- Cache 和 Buffer 有什麼區別?
- Cache和Buffer都是快取,有什麼區別?Linux快取Linux
- Ask Hoegh(5)——buffer cache和buffer有什麼區別?
- Linux記憶體管理機制中buffer和cache的區別Linux記憶體
- Linux作業系統中記憶體buffer和cache的區別Linux作業系統記憶體
- page cache與buffer cache的關係
- 計算機buffer和cache的區別?linux運維學習知識計算機Linux運維
- linux cache and buffer【轉】Linux
- Linux作業系統中記憶體buffer和cache的區別(轉載)Linux作業系統記憶體
- linux系統中的Cache和BufferLinux
- oracle buffer cache管理機制_buffer cache dump與lru機制小記Oracle
- Buffer Cache Size(資料緩衝區)
- Buffer cache 的調整與優化(二)優化
- Buffer cache 的調整與優化(一)優化
- buffer cache與相關的latch等待事件事件
- PostgreSQL DBA(89) - Linux(Buffer vs Cache)SQLLinux
- Linux記憶體、Swap、Cache、BufferLinux記憶體
- buffer busy waits, latch cache buffers chains, read by other session區別AISession
- Buffer Cache 原理
- cache buffer chainAI
- 記憶體中,cache與buffer的含義記憶體
- Service Worker Cache 和 HTTP Cache 的區別HTTP
- create table中的buffer pool 設定 KEEP 及CACHE 引數的聯絡及區別
- IO之核心buffer----"buffer cache"
- Buffer cache的執行原理
- Buffer Cache Hit Ratio
- Oracle Buffer Cache原理Oracle
- Oracle database buffer cacheOracleDatabase
- CACHE BUFFER CHAINSAI