Linux free commands The difference between the meaning of each digit and the cache, buffer

Source: Internet
Author: User

Linux free commands The difference between the meaning of each digit and the cache, buffer

We take a careful study of the figure (number and figure)
1,total: Physical Memory Actual total
2,used: This is a very important note, this is not actually used memory Oh, here is the total allocated to the cache (including buffers and cache) use of the amount, but perhaps some of the cache is not actually used.
3,free: Unallocated memory
4,shared: Shared Memory
5,buffers: The amount of buffer remaining that is allocated by the system but not used. Note that this is not a total amount, but an unallocated amount
6,cached: The amount of cache remaining that is allocated by the system but not used. The difference between buffer and cache is shown later.
7,buffers/cache used: This is the use of buffers and cache, that is, the actual memory usage, this is very important, here is the actual use of memory oh
8, Buffers/cache free: unused buffers and the sum of the cache and unallocated memory, this is the current actual available memory of the system. Note that this is the sum of the three, that is, the first row of the free+buffers+cached, but not only the unused buffers and the cache and Oh, plus free (unassigned and)
9,swap, I think we all understand that the amount of swap partition, the amount of use, the amount of surplus
I think I made it very clear.

The difference between cache and buffer:
Cache: Caching is a small but high-speed memory that sits between the CPU and the main memory. Because the CPU speed is much higher than the main memory, the CPU accesses the data directly from the memory to wait for a certain period of time, the cache holds the CPU just used or recycled part of the data, when the CPU re-use the part of the data can be directly called from the cache, which reduces the CPU waiting time, Improve the efficiency of the system. The cache is also divided into one-level cache (L1 cache) and level two cache (L2 cache), L1 cache is integrated within the CPU, L2 cache is usually soldered to the motherboard, and is now integrated into the CPU, with a common capacity of 256KB or 512KB L2 Cache.
Buffer: An area where data is transferred between devices that are not synchronized or that have different priority levels. Through buffers, you can reduce the number of waits between processes, so that when you read data from a slow device, the operating process of a fast device is uninterrupted.
Buffer and cache in free: (They are all memory-intensive):
Buffer: Memory as buffer cache, which is the read and write buffer of the block device
Cache: As the page cache memory, the file system cache
If the cache has a large value, it indicates that the cache has a high number of files. If frequently accessed files can be cache, then the disk read IO must be very small.

Reference Link: http://www.cnblogs.com/kgdxpr/archive/2012/04/14/2446900.html

Linux free commands The difference between the meaning of each digit and the cache, buffer

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.