Why are the last columns empty in the swap line?

$ free
         total        used        free      shared  buff/cache   available
Mem:   3912864     2255460      315388      249068     1342016     1123600
Swap:  4060156           0      4060156

swap is usually a file or a disk partition which is slower than memory. When there's not enough free memory to satisfy some program's request for memory allocation, then already allocated (but not used recently memory) is moved to swap.

Also kernel cannot work with something what was swapped. When it does, the memory must be freed and what was swapped must be "unswapped" back to the memory.

Caches and buffers are in memory only because they need to be fast.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.