Output of the free command on Linux

Source: Internet
Author: User

One. Clear concept

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

That is, buffer is used to store the data to be output to disk (block device), and the cache is to store the data read from disk. Both are designed to improve IO performance and are managed by the OS.

Two. Command output

       Total used       free     shared    buffers     cachedmem:      16436916   16285096     151820          0     243504    6831584-/+ buffers/cache:    9210008    7226908Swap:       8224760       4160    8220600

1. men:total = men:used + men:free

2. The third line indicates

    • -buffers/cache, which indicates how much memory an application thinks the system is using;
    • +buffers/cache, which indicates how much memory an application thinks the system has;

Equation:-buffers/cache = mem:used-men:buffers-men:cached

+buffers/cache = Men:free + men:buffers-men:cached

3. The memory that is shared by several processes is now deprecated and its value is always 0 (it may not be 0 on some systems, depending on how the free command is implemented).

What is Shared Memory?

Output of the free command on Linux

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.