0

About a year ago I upgraded my laptop with 8 GB of RAM. I had Windows 8 and 4 GB which wasn't enough in all situations according to the Task Manager. Shortly after the upgrade I switched to Debian 7 as my primary OS. Looking at the memory usage in the System Info program on Debian I always wonder how can the system work for hours with many application opened with just half a GB or at most 1 GB of RAM in use. The confusion comes when I run the free command. It reports much more memory usage than System Info. At the moment System Info reports 582 MB RAM and 0 MB swap used while running free -g reports that 2 GB are used:

$ free -g
             total       used       free     shared    buffers     cached
Mem:             7          2          5          0          0          1
-/+ buffers/cache:          0          7
Swap:           14          0         14

Why do these two report different amounts of memory used? The other thing that bothers me is that I almost never get near to using 4 GB of RAM even when running a virtual Linux machine with VMware. Is there a way to tell the system use more memory and gain performance in some way?

2

The two tools just have different definition of what it means for memory to be "used". The free command considers memory used if it is not free. System Info considers memory free even if it contains information that could be used, so long as that information can also be discarded. So, for example, memory that contains information that can also be read from disk is considered used by the free command but free by System Info.

The system will use as much memory as it possibly can to improve performance. Keeping memory free is the system's last resort if there is no practical way for it to hold useful information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.