Linux free command explanation, linuxfree Interpretation

Source: Internet
Author: User

Linux free command explanation, linuxfree Interpretation

$ free -m              total       used       free     shared    buffers     cachedMem:         1002        769        232          0         62        421-/+ buffers/cache:        286        715Swap:         1153          0       1153
Part 1 Mem row:
  • Total memory: 1002 MB
  • Used memory used: 769 MB
  • Free idle memory: 232 MB
  • Shared is no longer used. It is always 0.
  • Buffers Buffer cache memory: 62 MB
  • Cached Page cache memory: 421 MB

Link: total (1002 M) = used (769 M) + free (232 M)

Part 2 (-/+ buffers/cache ):
  • (-Buffers/cache) used memory size: 286 MB (refers to used-buffers-cached in the first part of the Mem row)
  • (+ Buffers/cache) free memory: 715 MB (refers to the first part of the Mem row free + buffers + cached)

It can be seen that-buffers/cache reflects the memory actually eaten by the program, while + buffers/cache reflects the total number of memories that can be used.

I think you are still dizzy after reading the above. The first part (Mem) and the second part (-/+ buffers/cache) are so strange about used and free.

In fact, we can explain it in two ways.

  • For the operating system, it is the Mem parameter. buffers/cached are all used, so it is considered that free is only 232.
  • For applications (-/+ buffers/cach ). buffers/cached is equivalent to available, because buffer/cached is used to improve the performance of program execution. When the program uses memory, buffer/cached will be quickly used.

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.