Buffer and Cache

Source: Internet
Author: User

Buffer and Cache

  • Buffer: To solve the efficiency of writing disk

  • Cache: To solve the efficiency of read disk

In order to improve the efficiency of reading and writing disks, the Linux system will first put the data in a buffer. Writing a disk does not immediately write the data to disk, but instead writes it to the buffer first. This can result in data loss if the system is restarted.

The sync command is used to flush the file system buffer so that the data is actually written to the disk and buffer is released, flush is used to empty the buffer. The sync command forces the data to be written to disk and releases the buffer corresponding to the data, so it is common to enter the sync command after the disk is written to actually write the data to disk.

If you do not manually enter the sync command to actually write to the disk, the Linux system will periodically go to sync data.

This article is from "Xiao Bao Bao" blog, please be sure to keep this source http://gongxiaoyi.blog.51cto.com/7325139/1682570

Buffer and 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.