Cheatsheet: Memory Usage in Linux

free output explained

Every now and then, I have to explain the truth to the Apps team or Junior admins. There truth being which number tells us the actual free amount of memory in Linux, in particular in free command output. Additionally, I would send them to Linux at my RAM!

Sometimes, I too spend several seconds to remember what each column means in free output. I thought why not create a cheat sheet.

Update:It is not longer correct to add up free, and cached.

+MemAvailable: An estimate of how much memory is available for starting new
+ applications, without swapping. Calculated from MemFree,
+ SReclaimable, the size of the file LRU lists, and the low
+ watermarks in each zone.
+ The estimate takes into account that the system needs some
+ page cache to function well, and that not all reclaimable
+ slab will be reclaimable, due to items being in use. The
+ impact of those factors will vary from system to system.
Buffers: Relatively temporary storage for raw disk blocks
shouldn't get tremendously large (20MB or so)
Cached: in-memory cache for files read from the disk (the

On newer kernels where MemAvailable is available in /proc/meminfo, that is what you should check.

Advertisements

One thought on “Cheatsheet: Memory Usage in Linux

  1. Pingback: Approach to Linux performance troubleshooting – rtfmp

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s