linux-Memory Analysis-free meminfo__linux

Source: Internet
Author: User
first , the introduction of monitoring the Linux system memory usage, the use of "free" is the most direct. View the machine's memory usage information "/proc/meminfo"
two. Analysis of 1. "Free" Let's look at one of the following outputs:

Free–m represents the memory usage in M, and in this output, we should focus on the output values of the free column and the cached column. From the output, this system a total of 7.8G memory, the system free memory and 621M, of which, Buffer cache occupies the 210m,page cache occupied 4056M, so that the system caches a lot of files and directories, and for Applications, There are 4888M of memory available, of course this 4888M contains the buffer cache and page cache values. As you can see in the swap, the swap partition is not yet in use. So from the application point of view, this system memory resources are very sufficient.
In general, there is an empirical formula: when the application available memory/system physical memory >70%, indicates that the system memory resources is very sufficient, does not affect system performance, the application available memory/system physical memory <20%, indicates the system memory resource is scarce, Need to increase system memory, 20%< application available memory/system physical memory <70%, the system memory resources can basically meet the application requirements, temporarily does not affect system performance. (such as the above, 4888/7869=0.621, so basically meet the performance)
Tips:watch is a very useful command, almost every Linux distribution with this tool, through the watch, can dynamically monitor the results of the operation of the command, eliminating the trouble of manual execution. e.g.
After "Watch" follow the command that needs to be run, watch automatically repeats the command, which defaults to 2 seconds of execution and updates the results of the execution to the screen. -N: Specifies the time to repeat-D: Indicates a highlight change.
2. "Meminfo" $cat/proc/meminfo read out the kernel information to explain

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.