0

I've observed high memory usage at amazon ec2 instance using amazon Linux.

See attached image. enter image description here Top 25 processes shows < 1GB of memory, but free -m says ~ 3GB is consumed. I've already visited http://www.linuxatemyram.com/, but in my case cache is also displayed as consumed.

EDIT: I've low free count in -/+ buffers/cache in 2nd line of output.

Any idea?

Output from cat /proc/meminfo

MemTotal:        3857992 kB
MemFree:           85032 kB
MemAvailable:    3589668 kB
Buffers:          102704 kB
Cached:           176500 kB
SwapCached:         1876 kB
Active:           358416 kB
Inactive:          66924 kB
Active(anon):     159468 kB
Inactive(anon):    27128 kB
Active(file):     198948 kB
Inactive(file):    39796 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       8388604 kB
SwapFree:        8377616 kB
Dirty:                24 kB
Writeback:             0 kB
AnonPages:        144268 kB
Mapped:            45708 kB
Shmem:             40460 kB
Slab:            3308524 kB
SReclaimable:    3295052 kB
SUnreclaim:        13472 kB
KernelStack:        1744 kB
PageTables:         9056 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    10317600 kB
Committed_AS:     491944 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       11340 kB
VmallocChunk:   34359722271 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       22528 kB
DirectMap2M:     3909632 kB
Piyuesh
  • 136
  • 6
  • Possible duplicate of [Meaning of the buffers/cache line in the output of free](http://serverfault.com/questions/85470/meaning-of-the-buffers-cache-line-in-the-output-of-free) –  Jan 27 '16 at 09:53
  • 1
    Probably NO, because I actually have low free in 2nd line, according to your link: "A Linux system is really low on memory if the free value in -/+ buffers/cache: line gets low." – Piyuesh Jan 27 '16 at 10:28
  • 1
    what does `cat /proc/meminfo` say? – user1700494 Jan 27 '16 at 10:36
  • 613MB is not low especially considering your swap isn't being used hard. The 3154MB in buffers/cache should be subtracted from the Mem used number. 3421-3154=267MB used by something other than the cache. That 267MB should be pretty close to what you see in ps or top. –  Jan 27 '16 at 10:49
  • try checking your memory with free / top before and after a: (as root) echo 3 > /proc/sys/vm/drop_caches, you should see a big difference. Check here for more info on that: https://www.kernel.org/doc/Documentation/sysctl/vm.txt (kernel documentation) – Fredi Jan 27 '16 at 11:03

1 Answers1

0

SOLVED: As per http://blog.famzah.net/2014/09/24/memavailable-metric-for-linux-kernels-before-3-14-in-procmeminfo/ actual free memory is determined by MemAvailable in /proc/meminfo output.

Actual issue here explained at Unusually high dentry cache usage

Piyuesh
  • 136
  • 6