First, the principle of memory usage in Linux is to "maximize the use of physical memory". During the running process, the frequently used data is stored in the memory as much as possible to be used for the next time. How is the application's available memory calculated: # free-mtotalusedfreesharedbufferscachedMem: 10009001000350350-/+ buffers/cache: 200800 in this example, the application
First, the principle of memory usage in Linux is to "maximize the use of physical memory". During the running process, the frequently used data is stored in the memory as much as possible to be used for the next time.
How is the application's available memory calculated:
# 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