Can anyone explain these memory stats to me?

Here is the result of running “free -h” on my laptop.

The total Ram is shown as 31Gi with 21Gi is available and to me that is a difference of 10Gi but the Used figure is showing as only 6.8Gi.

Here is the result of a “ps aux”

Can anyone see what is going on here? What is using up so much Ram?

total = used + free + buff/cache
shared: memory used by more than 1 application
available: memory can be allocated when there is a need (which will usually take from buff/cache)

1 Like

See also: Help! Linux ate my RAM!

2 Likes

I am not saying Linux ate it. However I am suspecting KDE or Google Chrome might not be releasing it and I am not 100% sure that all the ram usage is being reported by “ps aux”. The other problem is that I have no idea which Ram figure the number in KDE represents as it doesn’t correspond to any of those figures.

That wasn’t a screenshot of a browser. Besides I have done that before and not found anything that goes as high as 9 Gi of Ram. The highest is an Ad Block Chrome extension which is just under 500,000K.

Try to isolate the issue by closing the browser.
Perhaps it’s unrelated and the issue is caused by something else.

I closed everything down and it does free up about 4 GB of space but now 4 Gb is still being used basically doing nothing. Is this normal?

Also again note how the used space reported by free doesn’t match what is reported by the System Monitor. Which one should I believe?

The tabs on your konsole don’t look like nothing.

I don’t really understand the relationships myself: What part of memory is neither included in “used” nor in “available”? Probably just the same question phrased another way, but “free” plus “cache” tends to approximately equal “available” but “available” is a little smaller, why?

But I think your bigger question would be why is “used” as high as 3.1GiB doing “nothing”. I expect one of those nothings (first guess would be python) is a lot bigger than you think.

With Chrome gone, I expect the memory column in System Monitor is more helpful.

4.7 GiB ram used and 5.6% cpu usage seems to be doing a lot of “nothing”.

On my system, I consider it doing nothing when I first log in, have opened no tasks except possibly one terminal tab, and the CPU is showing 0% with memory considerably less than 4 GiB.

What does the command uptime show for load average?
My system is currently running at about 8% cpu, using 8GiB ram, 0 Swap, and has ~1250 processes loaded. These stats from lm_sensors and gkrellm.
My ‘uptime’ shows 1.28 load average

Here it is again with Konsole closed.

and with the uptime comand

$ uptime
18:21:12 up 11 days, 49 min, 3 users, load average: 0.71, 1.29, 1.43

The longer the system is up the worse it gets but when I close Google Chrome a lot of it is reclaimed but not all.

The latest version of Chrome seems to make a big difference to my ram consumption. I will keep monitoring but normally it creeps to about 8Gb ram usage overnight.

This is what I am using at the moment.

Given all the Chrome tabs I currently have open this looks reasonable. Before the update of Chrome I was getting as high as 16Gb ram usage so I am thinking it really was Google Chrome leaking memory that was the culprit.

I will highlight this as the solution if it keeps RAM under control in the next couple of days.