Ask Your Question

RAM usage explanation? [closed]

asked 2013-06-20 11:55:49 -0500

chickenfish gravatar image

updated 2014-09-29 01:16:58 -0500

mether gravatar image

Hey guys, so I ran free -m to see how much RAM is being used and this was the output

              total       used       free     shared    buffers     cached
Mem:          3868       3717        151          0        122       2397
-/+ buffers/cache:       1197       2670
Swap:         3871          0       3871

Now, I'm not sure if I understand this correctly, but does it say that I have only 151MB of RAM available? I ran gnome-system-monitor afterwards, which shows that 1.2GB being used. Could you enlighten me a bit?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by chickenfish
close date 2013-06-21 01:41:04.234845

2 Answers

Sort by » oldest newest most voted

answered 2013-06-20 14:13:50 -0500

hedayat gravatar image

Look at the second row of the output. It shows the amount of RAM that is occupied minus the amount that is used as buffers/cache. And shows the amount of free memory including buffers/cache. This is what you see in gnome-system-monitor. In the first row, the 'free' memory is the amount which is really unused by the system.

The amount of RAM that is used by Linux kernel as buffer/cache can be considered as 'free' because it is used to speed up operations (and the data is available on disk and can be also retrieved from there) and will be freed if applications or the kernel itself need more RAM to store data that must be stored in memory.

In other words, less free space in the first row means that your RAM is utilized better by Linux kernel. But less free space in the second row means that there is not much free space for applications to use without any data being pushed to swap area; and might result in slower system. Ideally, you should have lots of free space in the second row, and very little free space in the first one!

edit flag offensive delete link more


Thanks a lot! Now I understand it just fine.

chickenfish gravatar imagechickenfish ( 2013-06-21 01:39:21 -0500 )edit

answered 2013-06-20 13:46:01 -0500

skytux gravatar image

updated 2013-06-20 14:02:38 -0500

You have 2670 Mb free.

Please take a look at the following web site, I learned to read my ram usage from that site:

Linux ate my ram!

From the above site:

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".

But what do you call memory that is both used for something and available for applications?

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.



edit flag offensive delete link more


Another great answer! Thanks for the link provided.

chickenfish gravatar imagechickenfish ( 2013-06-21 01:40:07 -0500 )edit

Question Tools

1 follower


Asked: 2013-06-20 11:55:49 -0500

Seen: 2,784 times

Last updated: Jun 20 '13