Detailed free command

Insert picture description here

  • total: total memory size.

  • used: used memory size (including cached and buffers and shared parts).

  • free: The amount of free memory.

  • shared: shared memory between processes (generally not used, can be ignored).

  • Buffers: The written things in the memory are cached, so that the request is responded quickly, and the data is then periodically flushed to the disk.

  • cached: The size of the cached content after reading in the memory (this part is for quick return in the next query).

  • -/+ buffers/cache can be seen as two parts:

    • -buffers/cache: The size of the memory being used (note that it is not the used part, because buffers and cached are not being used), and its value = used-buffers-cached.
    • +buffers/cache: the available memory size (the same is not the part represented by free), its value = free+buffers+cached.
  • Swap: The used size of the swap partition on the hard disk.

The purpose of the design is that when the available memory indicated by the +buffers/cache mentioned above has been used up, after a new read and write request comes, part of the data in the memory will be written to the disk, thereby taking part of the disk space as virtual memory To use.

Guess you like

Origin blog.csdn.net/lianshaohua/article/details/111032590