[Notes] Understanding memory usage in Linux

Linux version:
Red Hat Enterprise Linux Server release 7.3 (Maipo)

free -m

[servicesoaprd@ausflsoadfs008 u02]$ free -m
total used free shared buff/cache available
Mem: 96404 80399 7642 4099 8362 11073
Swap: 16384 0 16384


    1. For new linux version (I check on OEL 7.3), used shows in free is the exact free memory that application can use.
      Used = total – free – buffers/cache
    2. For older linux version (confirm on OEL 5.3), used shows in free are application used memory plus buffer/cache size.
      Website reference: https://www.binarytides.com/linux-command-check-memory-usage/

total used free shared buffers cached
Mem: 17G 7.6G 9G 464M 734M 2.7G
-/+ buffers/cache: 4.1G 13G
Swap: 2.0G 0B 2.0G

Check free value of -/+ buffers/cache for the exact free memory available.

Buffer/cache is a linux concept where it caching lot of things for faster performance, where memory can be easily freed and used if needed by application.

You Might Also Like

This site uses Akismet to reduce spam. Learn how your comment data is processed.