Linux memory view command free

  

linux view memory command free. However, the actual use of linux memory, and the literal meaning of the output is still somewhat different, the real memory available to linux is not directly seen by the free item. As follows:

[root@dbrg-1 ~]# freetotal used free shared buffers cachedMem: 319844 83632 236212 0 19128 46116-/+ buffers/cache: 18388 301456Swap: 2096472 0 2096472

total Total memory

used Number of used memory

free Free memory

shared Total memory shared by multiple processes

buffers Buffer Cache and cached Page Cache Size of Disk Cache

Swap Virtual Memory

[Note] The meaning of used/free for red and blue lines is different. The red line is from a system perspective, buffers/cached are all used, blue lines are from the application point of view, for applications, buffers/cached is equal to available, because buffer/cached is for Improve the performance of file reading, when the application needs to use memory, buffer /cached will be quickly recycled.

For the Mem line: total = used + free ((319844 = 83632 + 236212 )

for the -/+ buffers/cache line:

total = used + free ( 319844 = 18388 + 301456)

used = used + buffers + cached (83632 = 18388 + 19128 + 46116 )

Transfer:

To improve disk access efficiency, Linux Some elaborate design, in addition to caching dentry (for VFS, speed up file path name to inode conversion), also adopted two main Cache methods: Buffer Cache and Page Cache. The former for disk block read and write, The latter reads and writes to file inodes. These Caches effectively reduce the time of I/O system calls (such as read, write, getdents).

Copyright © Windows knowledge All Rights Reserved