I started checking this out when my Eclipse IDE was reporting memory problems with “Unable to create new native thread”.
Also when this happens I started getting problems with my browser loading new tabs.
With 12GB free memory I should not be getting any problems, but that is a different discussion.
Why is the memory widget reporting my memory usage so much lower than free?
I would like my dashboard/desktop to give me accurate information about my system.
Have you set TMPFS for any purpose? (Maybe you just have put your /tmp into memory as tmpfs.) I think the usage of TMPFS is not counted in the normal “used” number.
But it still odd that you have no ram to use when free says it has 12G as free.
It’s good to know that TMPFS usage is counted in “buffers/cache”
So, if I set a tmpfs for temporary use, like I put a large file in it, will it be freed by the kernel? If not, then that might be the reason the OP has no ram to use for this case.
The displayed columns are:
...
**shared** Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, avail-
able on kernels 2.6.32, displayed as zero if not available)
**buffers**
Memory used by kernel buffers (Buffers in /proc/meminfo)
**cached** Memory used by the page cache (Cached in /proc/meminfo)
So, if I set a tmpfs for temporary use, like I put a large file in it, will it be freed by the kernel? If not, then that might be the reason the OP has no ram to use for this case.
Of course the kernel does not automatically delete files in /tmp. You can setup systemd to do that regularly (or do it via a cron job), but cleaning tmp is not done in openSUSE by default. (if /tmp is a tmpfs, it will be clean on reboot anyway though)
I’m not sure whether the contents of a tmpfs would be swapped out, but that’s irrelevant in this case anyway, as there is no swap.
Well, I am not sure about this, but what you describe doesn’t necessarily mean that the 2GB file in the tmpfs is actually counted in “buff/cache”.
Copying the file to the tmpfs may have increased the buffers the kernel uses (after all the whole file gets read and written), and they would be freed again if necessary in that case, but the 2GB usage would stay in “shared” (and the other columns) even then.