Buffer Cache

What is the "Buffer Cache" used for?

In most cases, data being transferred between disk and memory goes through the buffer cache. When your program reads a file, the system transfers a large chunck of data into the buffer cache. Then the data is copied into your program. The next read may just need a few more bytes from the same buffer. The kernel tries to predict what buffers you may need and reads them in ahead of time. Write also transfer data to the buffer cache. Some tests show that about 90% of explicit reads and writes are satisfied by the buffer cache. This helps performance a lot.