Linux calculates real available memory

Source: Internet
Author: User

---restore content starts---

The free command shows the usage statistics for the physical memory and swap partitions in the Linux system.

Available memory = Free + buffers + Cached

First behavior physical memory usage statistics:

Title Description
Total Total Physical Memory Total=used+free
Used Amount of memory used, including reference usage +buffer+cached
Free Total Free Memory
Shared Total Shared memory
Buffers Cache consumed by block devices
Cached Cache for normal file data consumption
Available Current total available memory, without virtual memory

In the second row-/+ Buffers/cache only two columns used and free have values, which are the adjustment values of the physical memory

Title Description
Used Memory used (used) minus buffer and cached, that is, the total amount of memory that the app is using
Free Free memory plus buffer and cached memory, which is the total amount of available memory

Third act Exchange partition usage statistics

Title Description
Total Total Swap partition memory
Used Swap partition memory in use
Free Idle swap partition memory

In the above indicators, we need to note that under these circumstances, the system is normal, do not need to worry about

Idle memory free close to 0
0 using memory used close to total
Available memory (Free+buffers/cache) accounted for more than 20% of total
Swap partition memory swap has not changed
The following situation indicates that the memory is too low, need attention!

Available memory (Free+buffers/cache) is too low, close to 0
Swap partition memory consumption swap used increased or fluctuating
DMESG | grep Oom-killer shows a outofmemory-killer is running

Common parameters
-b/k/m/g display results in bytes/kilobytes/megabytes/gigabytes units
-H output statistical results in a human-readable manner
-T use this option to display more than one row of statistics that is titled Total
-O Suppress buffer adjustment values for the second row
-S automatically refreshes results every few seconds
-C with-s used to control the number of refresh results
-L display statistical details of high and low memory
-A shows available memory
-V Show version number

Linux calculates real available memory

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.