Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Your free memory is 1034. There was a really informative article about making sense of 'free' posted here on LQ some time ago. I can't seem to find it.
I understand what "free" does. My point was that different tools disagreed with one-another.
In fact, a closer look at "top" and "free" shows they are in agreement. It's gnome-system-monitor that's out of step; it should show more memory in use than "free", as it's using memory to run, yet it shows less. The moral would appear to be "Beware of GUI tools and always trust your CLI."
What version of gnome-system-monitor are you using? In mine, when I look under the Resources tab, it shows 1.8GB used. When I type "free -m" it says 3852 (3.8GB) used, but 1807 (1.8GB) used for the "-/+ buffers/cache" row which is the one we really want. Top of course shows 3.8GB being used, and is scary (I don't like it). Basically my gnome-system-monitor is running correctly (at least to what the user wants to know). In Help->About I get version "System Monitor 2.28.0".
Additionally, you might want to look at ksysguard, which is the KDE process manager, which is good in its own ways (allows tree-view of process list and a few other cool things), but worse than gnome-system-monitor in others, and doesn't require you to be in KDE to use; you can just install it from the package manager.
MEM is the total memory you have. USED is used memory plus memory in cache. CACHED is memory that is not being used by an app but is in cache ready to use. So in my example 443276 is being used by the system.
At least this is how I interpret it. If Im wrong maybe someone will correct me.
This is closer to the correct description of buffers and cache.
I read that up to the important, and I think incorrect, sentence:
Code:
SHR indicates how much of the VIRT size is actually sharable memory or libraries).
I have looked at /proc/pid/smaps in comparison to the SHR value reported by top. I have seen elsewhere that same claim that SHR is the sharable portion of VIRT. But when I actually look, SHR is way too low to be the sharable portion of VIRT.
I think SHR is the sharable portion of RES. I don't know how to tell for sure. But I haven't seen any cases that can be easily shown to contradict the idea that SHR is the sharable portion of RES.
I also dislike the sentence from that page
Code:
VIRT stands for the virtual size of a process, which is the sum of memory it is actually using
"Actually using" is ambiguous enough that I can't say flat out the above sentence is wrong. But that sentence is at least seriously misleading. VIRT typically includes a lot of "demand zero", "copy on write", and "untouched library pages", areas that are all memory the process hasn't used yet, isn't using now, and probably never will use.
Regarding the details of Buffers and Cache in that page, I don't know enough and/or didn't read carefully enough to comment on whether the page is accurate.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.