Why my free ram is so small

December 23, 2014 1.1k views

I try

root@wz:~# free -m
             total       used       free     shared    buffers     cached
Mem:           490        445         44          0         95        271
-/+ buffers/cache:         78        411
Swap:            0          0          0

why it's only 44m free ram?

3 Answers

The link @TheNumb provided explains what's going on here. The Linux kernel will use any available memory for disk caching, unless it's required by a running program. If needed by a program, the memory will be freed up. From the site Linux Ate My RAM:

Why does top and free say all my ram is used if it isn't?

This is just a misunderstanding of terms. Both you and Linux agree that memory taken by applications is "used", while memory that isn't used for anything is "free".

You would call that "free", but Linux calls it "used".

Memory that is You'd call it Linux calls it
taken by applications Used Used
available for applications, and used for something Free Used
not used for anything Free Free

This "something" is what top and free calls "buffers" and "cached". Since your and Linux's terminology differs, you think you are low on ram when you're not.

Have another answer? Share your knowledge.