Differences and relationships between page cache and buffer cache

Source: Internet
Author: User
Page cache and Buffer
Cache has always been a confusing concept. Many people on the Internet are arguing about the differences between the two caches, at the end of the discussion, there has never been a unified and correct conclusion. During the period of my work, page
Cache and Buffer
The concept of cache has plagued me, but after careful analysis, these two concepts are actually very clear. If we can understand the nature of these two caches, we may be more comfortable in analyzing Io problems.
Page
The cache is actually for the file system. It is the File Cache, and the data at the file level will be cached to the page.
Cache. The logic layer of the file needs to be mapped to the actual physical disk. This ing relationship is completed by the file system. When the page
When cache data needs to be refreshed, the data in the page cache is handed over to the buffer
Cache, but this kind of processing becomes very simple after the kernel version 2.6, and there is no real cache operation.
Buffer
The cache is the cache for disk blocks, that is, if no file system is available, data directly operated on the disk will be cached to the buffer.
Cache. For example, the metadata of the file system is cached in the buffer cache.
In short, page cache is used to cache file data, Buffer
Cache is used to cache disk data. If a file system is used to operate on a file, the data is cached on the page.
Cache. If you directly use dd and other tools to read and write the disk, the data will be cached in the buffer cache.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.