When I view the system monitor it reports that I'm only using 48% of ram. Same with gkrellm. But all of the command line utilities report different. Here is the output to free and /proc/meminfo. The only reason I can think of is the graphical utilities neglect to count the cache. But isn't that still stored in physical memory. Why is there such a distinction between the two (graphical and cmd-line). Is cache not important?

Thanks in advance

free -o

             total       used       free     shared    buffers     cached
Mem:       1915936    1831836      84100          0      11280     874072
Swap:      3866620     146944    3719676

cat /proc/meminfo

MemTotal:        1915936 kB
MemFree:           81740 kB
Buffers:           11900 kB
Cached:           869224 kB
SwapCached:         4128 kB
Active:           722020 kB
Inactive:         887300 kB
Active(anon):     669976 kB
Inactive(anon):   235424 kB
Active(file):      52044 kB
Inactive(file):   651876 kB
Unevictable:       50812 kB
Mlocked:               0 kB
SwapTotal:       3866620 kB
SwapFree:        3719680 kB
Dirty:               460 kB
Writeback:             0 kB
AnonPages:        776964 kB
Mapped:            52052 kB
Shmem:            126384 kB
Slab:              77824 kB
SReclaimable:      37580 kB
SUnreclaim:        40244 kB
KernelStack:        2800 kB
PageTables:        33836 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4824588 kB
Committed_AS:    2622452 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      560312 kB
VmallocChunk:   34359122920 kB
HardwareCorrupted:     0 kB
AnonHugePages:    118784 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       12288 kB
DirectMap2M:     1949696 kB

details of /proc/meminfo is

MemTotal: Total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary code)

MemFree: Is sum of LowFree+HighFree (overall stat)

MemShared: 0; is here for compat reasons but always zero.

SwapCache: Memory that once was swapped out, is swapped back in but still also is in the swapfile (if memory is needed it doesn't need to be swapped out AGAIN because it is already in the swapfile. This saves I/O)

the cache described in /proc/meminfo is Memory in the pagecache (diskcache) minus SwapCache see here and this explanation here

gkrellm tells that it calculate free and used memory by

The used and free memory here are calculated from the kernel reported used and free by subtracting or adding the buffers and cache memory. See the README and compare to the "-/+ buffers/cache:" line from the free command. If you show three memory krells, the kernel "raw free" is the space after the rightmost krell.

if you run free -m you will see "buffers" and "cached" columns, which tell you about the amount of memory that the kernel is using for filesystem buffers, etc.

This sort of cached data will be freed by the kernel when an application tries to allocate more than what is "free", which is why the "-/+ buffers/cache" line is really the important line to pay attention to when you're checking out the free memory on a system. see here


Cache is important from a performance point of view. But for free memory: when something requires more memory than freely available, some cache memory will be freed automatically.

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.