Linux Mint Cinnamon - High Ram Usage
Solution 1
You could close the unused programs, the bulk of it though is coming from Cinnamon (desktop environment), nearly 1GB
which is a little high but believe it or not is about right for idle use.
Cinnamon compared to other desktops can use quite a lot of ram (but it does look pretty)
See this post (granted its not for Linux mint)
There is nothing out of the ordinary about the output you have provided. If you want to use less ram in an "idle" state, i suggest closing all applications (skype, spotify, discord).
Closing those app's would save you around a couple GB.
You can of course get rid of cinnamon...But i wouldn't be too bothered, your memory inst spiking, it seems to be consistent.
Solution 2
1GB in the cinnamon
process alone seems relatively high to me. At least two sources, including links in other answers, suggest the whole system should use on the order of 800M when you initially boot and log in to Cinnamon.
1) It looks like Cinnamon version 4.0 includes significant fixes to memory management, based on the upstream GNOME project(s). I don't know if the fixes have been ported to earlier versions. (Also I am not 100% certain that Cinnamon suffered the same problem as upstream GNOME, but it is looking very suggestive :-).
- https://feaneron.com/2018/04/20/the-infamous-gnome-shell-memory-leak/ (technically not a leak, but it looks similar from the outside)
- https://github.com/linuxmint/cjs/pull/67
I note the gnome-shell
process on my Fedora Workstation 29 (which includes these upstream fixes) currently shows as using somewhere between 200-400M. (Although processes like this may be pinning more memory in less obvious ways).
2) The bug tracker and other sources say to be wary of any Cinnamon "spice applets, desklets, extensions", and non-default themes. They may cause the main cinnamon
process to leak memory. I.e. make sure to test without them.
3) ghu knows what cinnamon-screensaver
needs over 200M resident for when it's not active. It does not make me happy. Maybe also be some sort of leak. i) Try using whatever the default screensaver setting is, if you changed it. If you're not sure what the default was, try a blank screen option. ii) This might suggest a graphics driver problem - this can definitely be an issue, though I don't know if it's your main problem.
I make no promises! Maybe you can keep memory usage down to 3GB on idle, maybe not. If you can, it is not clear from your question that you would not consider 3GB on your "idle" load to be "high" as well :-).
4) If you are interested in learning about Terminal tools to look at memory usage:
-
At a basic level, please use
free -h
.free -g
only shows the nearest gigabyte, e.g. it will show "0 shared" even if you have 499 megabytes used as "shared".(Don't make too many assumptions about what "shared" means in
free
, without very careful testing. Except thatfree
does not count "shared" as part of "used"; for technical reasons it counts "shared" as part of "cached". But unlike the rest of the cache, the "shared" is not automatically freed up when you need to allocate more memory). -
atop
is a bit complex but worth the effort IMO.sudo atop -r
, pressm
andM
to showPSIZE
for each process. This avoids you double-counting memory which is shared between multiple processes. Theatop
package also includes a service which can log per-process memory usage every ten minutes - great for seeing if something tends toleakincrease its memory usage over time :-P.
Related videos on Youtube
unkn0wnx
Updated on September 18, 2022Comments
-
unkn0wnx over 1 year
I'm using Linux Mint as day-by-day OS, but I'm having a hard time with RAM usage, as 4 of 16 GB are used just when idling... Why is this happening? Is it something I forgot to configure? What can I do to lower RAM usage? I only have Skype, Spotify and Discord open.
Uptime stats:
dragos@madscientistlab ~ $ uptime 16:40:10 up 3 days, 3:53, 1 user, load average: 1,95, 1,42, 1,13
free -g command:
dragos@madscientistlab ~ $ free -g total used free shared buff/cache available Mem: 15 4 6 0 5 10 Swap: 15 0 15
-
Kusalananda over 5 yearsI'm failing to see how a RAM usage of 4 out of 16 Gb is an issue...
-
terdon about 5 yearsYes, what makes you feel there is a problem? RAM should be used! There's no point in keeping it empty. It only becomes a problem if other programs don't have enough, and that doesn't seem to be the case here. Also see linuxatemyram.com.
-
user2948306 about 5 yearsHi. For anyone asking questions like this, please specify the version number of the operating system you are using. It's very difficult to tell you if it's a knownbug / fixed in a later version, etc, if we don't know what the version you tested is :-).
-
user2948306 about 5 years@terdon The tool in question does not count "cached" memory as "used". It actually appears to show the MemAvailable figure.
-
terdon about 5 years@sourcejedi yes, I know, but there may well be other programs using the RAM in ways that allow it to be available. I may be wrong here, but I just don't see how such a low %use of RAM could ever be a problem. By the way, the OS version isn't very relevant, the change in the way
free
displays the data depends on the kernel. See How can I get the amount of available memory portably across distributions? -
user2948306 about 5 years@terdon fair point. I just want to make sure we're asking and not telling, if you see what I mean. In my case, having more RAM free can make a significant proportional difference in the number of VMs I can run without my cheap laptop blowing up, and certain memory usage improvements around Fedora Workstation version 29 were very welcome :-).
-
user2948306 about 5 years@terdon I wouldn't have assumed that any software on a Linux desktop, outside of the kernel, is set up to allow RAM usage to be reclaimed on-demand. You see that with e.g. browser caches w.r.t. disk space, but I can't think of an example for memory. Do you have some reason to believe that software started using MADV_FREE ?
-
terdon about 5 years@sourcejedi I don't really claim to know. But I'm thinking about things (things I understand very, very little about) like shared memory and advanced memory management tricks which are like Voodoo to me. So I may well be totally off.
-
-
unkn0wnx about 6 yearsThanks for your reply, well, actually, I'm playing music even if idling with Spotify, and I need Skype for messaging :(. After restart, the ram got down to 3.0 GB with Spotify, Skype, Discord and Chromium. I guess Cinammon is just leaking memory?
-
Fabby about 5 yearsInteresting read... +1