Reading /proc/meminfo
/proc/meminfo is the authoritative source for memory statistics on Linux. Tools like free, top, and monitoring agents all read from it. Once you understand what each line means, you'll never misread "free" memory again.
Sample /proc/meminfo Output
The Most Important Fields
MemAvailable — Use This, Not MemFree
MemFree shows truly unoccupied RAM — usually low because Linux fills RAM with cache. MemAvailable estimates how much RAM is actually available for new applications, accounting for reclaimable cache. This is what monitoring tools should alert on.
Cached vs Buffers
Cached = file data cache (the page cache — cached file contents). Buffers = metadata cache (directory entries, superblocks). Both are reclaimable when memory pressure increases. In modern kernels these are largely unified in the page cache.
Dirty — Pages Not Yet Written
Dirty pages are in-memory modifications not yet written to disk. Linux writes them asynchronously. High Dirty value means writes are piling up. If the system crashes before they're written, data is lost. fsync() forces a flush.
Slab — Kernel Object Cache
The slab allocator caches kernel data structures (inodes, dentries, task structs). SReclaimable can be freed under pressure; SUnreclaim cannot. High slab usage with many tiny files is common on busy webservers.
free -h — Human-Readable View
Frequently Asked Questions
What will I learn here?
This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.
How should I use this page?
Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.
What should I read next?
Use the navigation below to continue to the next lesson or explore related topics.