Ask Your Question

RAM usage explanation? [closed]

asked 2013-06-20 16:55:49 +0000

chickenfish gravatar image

updated 2014-09-29 06:16:58 +0000

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 06:41:04.234845

2 answers

Sort by » oldest newest most voted

answered 2013-06-20 19:13:50 +0000

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 ( 2013-06-21 06:39:21 +0000 )edit

answered 2013-06-20 18:46:01 +0000

skytux gravatar image

updated 2013-06-20 19:02:38 +0000

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 ( 2013-06-21 06:40:07 +0000 )edit

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2013-06-20 16:55:49 +0000

Seen: 2,399 times

Last updated: Jun 20 '13