Middle
What are the differences between the free sections?
sobes.tech AI
Answer from AI
The Unix/Linux free command displays information about system memory usage. The sections it outputs typically include:
- total: The total amount of physical memory available to the system.
- used: The amount of memory in use.
- free: The amount of unused (free) memory.
- shared: Memory used simultaneously by multiple processes (usually minimal).
- buff/cache: Memory used by the kernel for buffering and caching filesystem data. This memory can be quickly freed if needed.
- available: An estimate of the memory that can be allocated to new processes without swapping. It is the sum of
freeand part ofbuff/cachethat can be reclaimed.
Here is a typical output of the free -m command (in megabytes) with explanations for the sections:
total used free shared buff/cache available
Mem: 7890 2567 1234 123 4089 4879
Swap: 2047 0 2047
Where:
Mem: The line related to physical RAM.total: 7890 MB.used: 2567 MB (actively used by processes).free: 1234 MB (completely unused).shared: 123 MB (used shared).buff/cache: 4089 MB (buffers and cache).available: 4879 MB (the most accurate representation of available memory for starting new applications).
Swap: The line related to swap space.total: 2047 MB (total swap size).used: 0 MB (swap in use).free: 2047 MB (free in swap).
The difference between free and available is important: free shows absolutely unused memory, while available is the memory the system can quickly free for applications, including most of buff/cache. The buff/cache section shows memory that is occupied but can be quickly released, so it should not be viewed as "lost" memory.