The memory information displayed by the Linux free command

Source: Internet
Author: User

Linuxfree Command memory allocation information

[[Email protected]~]# free-m

Total used free shared buffers Cached

mem:32099 31909 189 1 100 28679

-/+ buffers/cache:3129 28969

swap:15999 0 15999

the output from the second line is the operating system memory usage.

The output from the third row is the memory usage of the application.

physical Memory = [mem:used] + [Mem:free]

physical Memory = [-/+ buffers/cache: used] + [-/+ buffers/cache Free]

[Mem:total] Total Physical Memory

[Mem:used] indicates the memory used

[Mem:free] indicates the remaining memory

[Mem:shared] memory shared between processes

[Mem:buffers] represents the memory used, no buffer used

[Mem:cached] represents the memory used, the cache is not used

[-/+buffers/cache: used] represents the memory used, the buffer and the cache that have been used

[-/+buffers/cache: used]= [mem:used] - [mem:buffers+ mem:cached]

[-/+buffers/cache: free] represents the remaining (usable) buffer and cache( which represents the memory used, no buffer used , and Cache + remaining available memory [Mem:free])

[-/+buffers/cache: free]=[mem:free] +[mem:buffers] + [mem:cached]

generally, if [ -/+ Buffers/cache:free] is large, it indicates that there is more memory left.

[Mem:buffers] and the [mem:cached] is also a reflection the remaining Buffer and the cache,.

a picture of the memory allocation shown by the free command

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/BA/wKiom1WD1bOSO6fUAAD9W9SgcJw530.jpg "title=" QQ picture 20150619163555.png "alt=" Wkiom1wd1boso6fuaad9w9sgcjw530.jpg "/>


How to determine the state of memory usage?

Note [Mem:free] size does not reflect the actual use of memory.

1. View -/+ buffers/cache:free , if the value is very small, and the swap is used more, that means the memory is not enough.

2. View mem:buffers mem:cached , ibid.

Bufers and cached can be quickly recycled.

all output values of the free command are read from the/proc/meminfo .



This article is from the "helo" blog, make sure to keep this source http://487510.blog.51cto.com/477510/1663596

The memory information displayed by the Linux free command

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.