Cache and buffer (buffered)

Source: Internet
Author: User

What is cache, buffer?

Cache is an optimization technique that is in memory when "read" Data .

A buffer is an area of memory that takes up a process's data cache, such as a Web service, when the user first requests it, the process takes the data (the result)from the disk (the drive) , stores the result in the cache, and when the user initiates the same request the second time, The process will match the cached results in the buffer and return the data directly. Memory read and write efficiency is more than 10 times times the disk. Therefore, this technology increases the efficiency of process processing data and reduces the use of disk IO.


What is buffer, buffer?

Buffer (buffered) is an optimization technique in memory when "write" Data .

Buffer is to occupy an area in memory to do the process of data buffering, such as uploading a data (file), the data is processed by the process, the process calls the memory persistence of the data written to disk, the data in memory will be divided into an uneven size of information data block Persistent write disks, which are written to disk in a slow and inefficient manner, and because of uneven size can result in disk fragmentation. Buffer is a technique for data-block traffic shaping of these uneven sizes, which are first stored in buffers, waiting for the accumulated number of blocks to fill the entire buffer size, and then written from the buffer to disk. So , in general, a buffer size is equal to the paging size of the system.

The paging size of the system is the storage block size of the disk's file system. If it is a Windows system, we can usually see it in the format, that is, "allocation unit size". If it is Linux, it can be viewed with the " getconf page_size" command.


Cache and buffer (buffered)

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.