In addition, Linux memory simple computing-Linux general technology-Linux programming and kernel information. The following is a detailed description. This article is easy to understand and suitable for technical support staff who have doubts about Linux memory management:
The basic principle of Linux is that no resources should be wasted. Therefore, the core uses as much RAM as possible to cache information from local and remote file systems. When the system performs read/write operations, data related to the currently running process is stored in RAM as much as possible. The cache of the system report is the sum of cache and page cache. The cache is not recycled at the end of the process (You may soon start another process and need the same data), but recycled on demand-for example, when you start a process that requires a large amount of memory, the Linux core recycles the cache from the memory and allocates the obtained memory to the new process.
Some areas, such as anonymous memory ing (MMP) and shared memory areas, are reported as cache, but not directly released by the core. The general cache does not map to the address space of the process, but is just a simple core ing, and these special caches map to all processes attached to them.
The following is an example (unit: MB ):
# Free-m
Total used free shared buffers cached
Mem: 1000 900 100 0 350 350
-/+ Buffers/cache: 200 800
In this example, the application only uses MB of memory and MB of idle memory.
Some simple calculation methods:
Physical memory used = actual memory used + buffer + Cache
Physical idle memory = total physical memory-actually used memory-buffer-Cache
Available idle memory for applications = total physical memory-actually used memory
Application memory used = actual memory used-buffer-Cache
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