The free command in Centos shows the specific meaning of each value.

Source: Internet
Author: User
Compared with top, the free Command provides a more concise view of the system memory usage: [root @ castal ~] # Free-mtotalusedfreesharedbufferscachedMem: 502463390

Compared with top, the free Command provides a more concise view of the system memory usage:

[root@castal ~]# free -m             total       used       free     shared    buffers     cachedMem:           502        463         39          0        102        250-/+ buffers/cache:        110        392Swap:         1027          7       1020

Mem: physical memory statistics

-/+ Buffers/cached: indicates the cache statistics of physical memory.

Swap: indicates the usage of Swap partitions on the hard disk.

The total physical memory of the system is 255988Kb (256 MB), but the actual available memory of the system is not 24284Kb marked as free in the first line. it only indicates the unallocated memory.

Total: total physical memory.
Used: indicates the total quantity allocated to the cache (including buffers and cache), but some of the caches are not actually used.
Free: unallocated memory.
Shared: shared Memory, which is generally not used by the system and will not be discussed here.
Buffers: Number of buffers allocated by the system but not used.
Cached: number of cache allocated by the system but not used. The difference between buffer and cache is described later.

Used2: the total amount of actually used buffers and cache, which is also the total amount of actually used memory.
Free2: the sum of unused buffers, cache, and unallocated memory, which is the actual available memory of the system.

The following equations can be sorted out:

Total = used + free
Total = used2 + free2
Used = buffers + cached + used2
Free2 = buffers + cached + free

Difference between buffer and cache

A buffer is something that has yet to be "written" to disk.
A cache is something that has been "read" from the disk and stored for later use.

Related Article

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.