Submitted by linuxawy on Tue, 27/11/2007 - 14:45.
( categories: )

When i try to check the free memory by using free command, i find the output very misleading. so i tried to cat /proc/meminfo .. which is driving me mad. Let me explain the situation i have, I have a 12G RAM server. using ps aux or top i find that the only process that is really eating up memory consumes around 60% of the RAM.. cool.. that's nice. But when i use free -m i get:


             total       used       free     shared    buffers     cached
Mem:         12013      11992         20          0          5        105
-/+ buffers/cache:      11881        132
Swap:         8191         16       8175

and /proc/meminfo:


MemTotal:     12301940 kB
MemFree:         21636 kB
Buffers:          5896 kB
Cached:         108120 kB
SwapCached:       6140 kB
Active:        7294524 kB
Inactive:         9068 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     12301940 kB
LowFree:         21636 kB
SwapTotal:     8388576 kB
SwapFree:      8372132 kB
Dirty:             124 kB
Writeback:           0 kB
Mapped:        7282484 kB
Slab:           117732 kB
CommitLimit:  14539544 kB
Committed_AS:  7723424 kB
PageTables:      18192 kB
VmallocTotal: 536870911 kB
VmallocUsed:    266880 kB
VmallocChunk: 536603755 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     2048 kB

can anyone help me with this? i wanna know howto read these numbers. thanks


First don't panic when you

AMS's picture

First don't panic when you read the second line of $free -m output ;-), when there is a free ram space that programs don't use Linux will fill this space with buffers/cash for faster reading in the future,ignore this line.so lets look to the third one which reports 11881 MB of 12013 MB being used and 132 MB free.the final one tell us the swap space that we used.

/proc/meminfo provide the same informations and more.

Update : to know howto read /proc/meminfo check out for help.

But I'm curious. what is that process which eat 60% of 12GB RAM?!!

I don't know why I have

MSameer's picture

I don't know why I have the feeling it's either Java or Oracle related.


WWW: The place for organized randoms!

you are right

linuxawy's picture

it's a tomcat


Ahmed D. El-Mekkawy

it's /dev/shm

linuxawy's picture

ok this is what i was thinking too, untill it started swapping and server started to get really slow. Anyway i figured out that all the memory was eaten by /dev/shm which is 5.9G , this is really nonsense... i dunno exactly what's /dev/shm is doing, but i think it's about shared memory between programs, and i got only 1 important process in this server. I'll try to read more about it.


Ahmed D. El-Mekkawy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.