Hi there,
A few other users and I have noticed what appears to be a memory leak in Cinnamon 2.4. I'm on Cinnamon 2.4.3 on openSUSE, and the other user is on 2.4.5:
http://www.reddit.com/r/LinuxActionShow/comments/2qy1bo/cinnamon_245_bleeding_ram_anyone
I'm seeing well over 500MB of memory usage by Cinnamon after 11 days of being logged in, and the other user is seeing almost 2GB in a session!
Update: Bug still present with Cinnamon 2.6.13.
I, too, am having the same issue. I'm about to give up on Mint Linux. This is the latest in a long string of issues I've had with Mint. I'm really about done with this distro.
The same: after few hours > 500 MB with 2.4.6, Arch Linux, nvidia proprietary driver 340.76.
Now I'm seeing extremely inflated memory usage (2 GB) by nemo, and I'm not really doing anything intensive with it at all.
@sb56637 try to disable any external nemo extension. Also see if you execute nemo as root, some files could need now root access in this case. You need detect and delete this file manually(on your user profile) to be create again by nemo without root access.
@lestcape wrote:
Also see if you execute nemo as root, some files could need now root access in this case.
You need detect and delete this file manually
This could be what happened. Any suggestions on how to detect and delete the(se) file(s)?
@sb56637 https://github.com/linuxmint/Cinnamon/issues/3676 and also see:
https://github.com/linuxmint/nemo/issues/777
I don't seem to have any file permissions issues, but this _MASSIVE_ 2GB memory leak was still persisting in Nemo. So I downgraded Nemo to 2.2.4, which has fixed it.
So should I file a separate Nemo memory leak bug?
Cinnamon was taking 4GB Memory after a few days not rebooting and not logging out. Previously I had like 90 days uptime and Cinnamon still took 4-5GB memory. Cinnamon 2.4.6. I had to replace ( alt + f2 -> r) the session in order to clear the memory.
I'd say this is still a bug. I'm now on Cinnamon 2.6.11 on Ubuntu, and the cinnamon process is the biggest memory hog process on my system. I booted my system at around 7:00 this morning, and now barely 7 hours later it's consuming over 400MB of RAM.
Same on Arch, it can easily climb up to 650Mb over 3 days.
@sb56637 Are you using the trash applet by chance? 2.6.11 is not the newest version of 2.6 and a serious bug was fixed in this applet. Not sure if that was in 2.6.11
@JosephMcc Thanks for the suggestion. Nope, not using the trash applet.
I know this issue if frustrating if you are experiencing it and I mean no disrespect but the feedback posted in this issue really does nothing to help solve this issue. We need to know more info, such what kinds of things are you doing or using when you experience this.
A good place to start is by grabbing this applet: https://github.com/mtwebster/Cinnamonitor
and placing it on cinnamons panel. Keep an eye on it while you're working and see if there are any particular actions you do that cause jumps in memory usage.
@JosephMcc Likewise, I don't mean any disrespect, my apologies if I sounded grumpy.
I'll try out the applet to see if I notice anything. But the memory usage doesn't really seem to correlate with any specific action or event. It just steadily rises from a base of around 200MB and just keeps going from there.
I should mention that this particular machine has plenty of free RAM, 8GB total. Could this just be a case of "free RAM is wasted RAM" and the Linux kernel is just trying to cache all of Cinnamon for speed? The Gnome system monitor just labels the column as "Memory", which I don't think included the caches.
@sb56637 My machine is the same, 8GB total. On a fresh start cinnamon uses around 110mb and even after a couple of days never raises above 150. That's what makes these types of issues so hard to troubleshoot. If you don't experience the problem it's nearly impossible to pinpoint it's source.
sb56637 has a different system with Ubuntu, I am on Arch.
Maybe @JosephMcc you can give us some pointers what we could compare?
Running apps that spawn a tray icon
Running apps that spawn notifications
Applets and panel layout.
What is important here?
Is the cinnamon process the one that hosts the javascript applets? That would seem to be the biggest source of variability from one system to another.
@sb56637 Yes
While I know it inconvenient, to start troubleshooting these issues the first thing you should do is disable any 3rd party applets, desklets, and extensions. Not to place blame on those devs but just to reduce some of the variables involved. In fact I would suggest only using the bare minimum applets you need for a bit just to see what effect it has. Like I said we recently discovered an issue in the built in trash applet where a single delete operation could explode cinnamons memory usage to several gigabytes.
Not sure if this LookingGlass screenshot helps any?

BTW I upgraded to Cinnamon 2.6.13, and after an hour or so cinnamon process memory usage is over 350MB.
Am also having this, I have 8GB RAM in my laptop and just got locked up completely, granted it took awhile to get there, but I have remember to reload Cinnamon daily.
Same for me.

cinnamon-2.8.6-1.fc23.x86_64 here, using 3.4GB of VM and 1.4GB of real RAM in 12 days.
LookingGlass says glibc_uordblks is 675MB.
Restarting cinnamon brings it back down to 2GB of VM (which still seems like a lot for what cinnamon is) and 338MB of real RAM.
I don't have any desklets or extensions enabled. It's really not practical to disable all applets as the desktop/environment will be unusable.
Does this still happen in cinnamon 3.0?
Not that I'm aware of. Cinnamon 3.0 is pretty stable.
On 09/05/2016 12:33 PM, ManIVIctorious wrote:
Does this still happen in cinnamon 3.0?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/linuxmint/Cinnamon/issues/3796#issuecomment-244782801,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJdRzTvSeDKQKuaOmlTKLyWVdenutOrhks5qnERkgaJpZM4DNmOW.
My Cinnamon process was started about 48 hours ago, currently consuming 238MB. I'll check to see if it continues going up.
Definitely still happening
The rate is much better now, It can run for 5-7 days for me before hitting ~700MB, but it is not entirely gone
Sometimes I just Alt+F2 and "r" to reload cinnamon and the memory gets flushed.
I have a fresh install of Linux Mint, cinnamon version is 3.0.7.
After a day of usage, the cinnamon process takes 579 Mb.

Here is what memory map shows for cinnamon process
I have cinnamon 3.0.5 here, installed July 05/16 on F24. My cinnamon process has been running since Aug. 08:
brian 2684 2641 2 Aug08 ? 19:57:27 cinnamon --replace
It's VM usage:
VmPeak: 3012408 kB
VmSize: 2838196 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 1344436 kB
VmRSS: 1116724 kB
RssAnon: 1077184 kB
RssFile: 31028 kB
RssShmem: 8512 kB
VmData: 1635676 kB
VmStk: 136 kB
VmExe: 12 kB
VmLib: 61276 kB
VmPTE: 4224 kB
VmPMD: 24 kB
VmSwap: 266784 kB
So as we can see, it's using 3GB of VM and 1GB of real memory. Again, I would submit that chewing up 1GB of real memory for desktop management is a bit much, so I'd say, yes, this is still happening on 3.0.
It is still happening on 3.0 but it's nowhere near as unstable as
previous versions. You're right and I agree; Cinnamon needs much
cleaner memory management code. As a side issue, I use my Linux machine
as a WiFi hotspot (use ethernet to connect on my computer) and it
crashes after a few weeks. Any suggestions?
On 09/06/2016 11:54 AM, Brian J. Murrell wrote:
I have cinnamon 3.0.5 here, installed July 05/16 on F24. My |cinnamon|
process has been running since Aug. 08:|brian 2684 2641 2 Aug08 ? 19:57:27 cinnamon --replace |
It's VM usage:
|VmPeak: 3012408 kB VmSize: 2838196 kB VmLck: 0 kB VmPin: 0 kB VmHWM:
1344436 kB VmRSS: 1116724 kB RssAnon: 1077184 kB RssFile: 31028 kB
RssShmem: 8512 kB VmData: 1635676 kB VmStk: 136 kB VmExe: 12 kB VmLib:
61276 kB VmPTE: 4224 kB VmPMD: 24 kB VmSwap: 266784 kB |So as we can see, it's using 3GB of VM and 1GB of real memory. Again,
I would submit that chewing up 1GB of real memory for desktop
management is a bit much, so I'd say, yes, this is still happening on 3.0.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/linuxmint/Cinnamon/issues/3796#issuecomment-244997309,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJdRzXQLBsMlHXKhIVSstgZqBcWmkyEfks5qnYyugaJpZM4DNmOW.
@NeoGeo64 - cron job or systemd timer for a weekly reboot?
What crashes, exactly? Might just need a task to automatically restart a service if that's how you're fixing it...
Manjaro 16.08 with Cinnamon 3.0.7 and same issue.
Startup:

After 8 hours:

Kernel: 4.4.0-45-generic x86_64 (64 bit) Desktop: Cinnamon 3.0.7 Distro: Linux Mint 18 Sarah
Few weeks ago I noticed that cinnamon process was using 1.5GB of RAM before I restarted it. Since then, I've been logging cinnamon process and have been collecting memory usage every 5min. Here's the data since my last reboot if anyone's interested: http://pastebin.com/GAP8zgAv (1st column - unix time, 2nd column memory use in bytes).
Today, I've noticed that my cinnamon process is using roughly 722MB of RAM... which is on the high end given how most of the time it doesn't cross 350MB. I plotted the data with gnuplot and this is what the memory use looks like:

and here's what 11 days of cinnamon memory use look like (all the data I have). Dips are reboots or cinnamon process restarts. Click on images to see full-size.

I'm not exactly sure what those steep memory jumps correspond to. I'm also not sure how to figure out what's causing this. If anyone has any suggestions or wants me to provide logs, please let me know and be specific please.
The graphs are neat but don't provide any really useful info. What we need to know are things like, what were you doing at the time? What applets are you running? Are you using something that sends a lot of notifications? Is there an applet or desklet you are using that is updating constantly? Like a system monitor type of applet. Please don't take this as rude. A lot of people are posting screenshots of their memory usage. We believe you. We know there is an issue but tracking it down is pretty much impossible without useful info so we can at least attempt to reproduce it.
As an example, the other day I installed the Multi Core system monitor applet. I can tell you that it definitely caused an increase in Cinnamons memory usage on my machine.
I've been running the same set of applets for the past few months Here's what they are:
Search Applet, System Monitor, Weather, Calendar, Keyboard, Menu, Nvidia Prime, Network Manager, Notifications, Panel launchers, Removable drives, Sound, System Tray, Window List, Windows Quick List.
As to what caused those jumps, I have no idea. I've tried doing few things to see if I can trigger the memory leak but everything I tried didn't seem to change things.
@nick-s-b i have a similar problem before, my solution was create another user and logging to that user, configure my desktop similar to the old one. When i make the test again, the problem not disappear, but was reduced a lot. I don't know how... But i can live with that now...
@lestcape that sounds like a placebo solution to me. Unless we know what's causing this, there's really no way to resolve it properly.
@nick-s-b true... Sorry for try to help you.
I wrote a script to notify me when memory use jumps by 5% or more (you can set it to what you prefer) and to notify me when cinnamon process consumes more than 300MiB (again, you can adjust it). This will allow you to try to figure out what causes memory leaks on your setup. You can also restart cinnamon process if you wish.
Save the script below as cinnamonlog.sh and put it in a bin directory that you prefer and add this line to cron by typing crontab -e and adding this to the bottom: */5 * * * * /PATHTOYOURBIN/cinnamonlog.sh This will cause the script to run every 5 min. Change it to 1min by replacing 5 with 1 if you want more granularity.
cinnamonlog.sh:
#!/bin/bash
logfile="$HOME/.cin-log.txt"
changemax=5 #percent change
cinmax=300000 #max memory
#create the log file, if it doesn't exist, and check if we can write to it
( [ -e "$logfile" ] || touch "$logfile" ) && [ ! -w "$logfile" ] && echo "Error: Cannot write to $logfile" && exit 1
#grab the previous cinnamon process memory value
previousmem=$(tail -n 1 $logfile | awk -F "," '{print $2}')
currentmem=$(echo 0 $(awk '/Rss/ {print "+", $2}' /proc/`pidof "cinnamon"`/smaps) | bc)
#calculate percent change if previous mem exists and notify us if it increases by more than 10%
if [[ $previousmem != "" ]]; then
percentchange=$(( (currentmem - previousmem)*100/previousmem ))
if [[ $percentchange -ge $changemax ]]; then
export DISPLAY=":0"
/usr/bin/notify-send "Cinnamon Monitor" "Memory has increased by $percentchange%"
fi
fi
#output new mem value to the log
echo -n `date +%s` >>$logfile
echo -n "," >>$logfile
echo $currentmem | bc >>$logfile
if [ "$currentmem" -gt "$cinmmax" ]; then
export DISPLAY=":0"
/usr/bin/notify-send "Cinnamon Monitor" "Current mem usage: $currentmem ; cinnamon process exceeded $cinmax."
#pkill -HUP -f "cinnamon --replace" #uncomment this line to restart cinnamon process; or type Alt+F2 and type "r" to restart it manually
fi
Well, after running cinnamonlog for few days, I've noticed few things:
Anyway, I'll continue keeping track of mem usage.
Not sure if related, but there's an obvious memory leak when changing themes.
I have a script that auto-reloads the theme each time I save changes to it, and after a while the memory increases a lot.
I have made a test script. In a few seconds memory increases up to 1GB and never decreases again until you restart Cinnamon.
while true ;do
gsettings set org.cinnamon.theme name cinnamon
done
It happens also if you change the theme manually through theme settings.
This is not a big issue, but maybe fixing one solves the other.

i have faced this issue with cinnamon recently
any idea what is causing it or how do i troubleshoot it
cinnamon 3.2.1 on ARCH
I have one more observation... after I upgraded to a 4K display, Cinnamon's usage increased dramatically. Average session now reaches 600MB within an hour of use and it's a lot more unpredictable. At this very moment, it's using around 700MB.
Here's the graph from the time I got a 4K display:

Dips to zero are manual restarts.
So, a bigger display means a lot larger cinnamon memory use.
@germanfr the main problem it's the theme icons. They are not destroyed in several extensions. The most important i think it's the cinnamon menu. You can play to remove the cinnamon menu and then add it again, and you will see what happens.
@lestcape yep. Added lots of menus and cleared the panel several times and it happened. There's a memory leak there. I believe it's not related with this issue, though.
@germanfr yes, the cinnamon menu problem it's not related, but not destroy theme icons in some places, well, cloud be.
how to trouble shoot memory leak and after restarting cinnamon the applet (icing taskmanager) have missing icon of libre office but it is running
already tried removing applet but memory leak is still their

I haven’t verified but I have the impression that memory (and CPU) usage increases a lot when tray icons change. For example, for online backups, I use SpiderOak ONE, which animates its tray icon when it backs up stuff, and Cinnamon’s memory usage at the end of a session seems much higher if I had to upload a lot of data.
I guess it could be easily verified by writing a small app with a tray icon that would change repeatedly. I might get around to doing that next year (I am currently on vacation with no access to my usual computer).
After upgrading to Cinnamon 3.2.x, memory problem seems to be mostly gone. While the memory does jump a certain percentage as before, it is not as bad. I'm hopeful that this improvement in memory consumption will continue. Thanks devs!
Really? for me, it got much worse than with 3.0.
@spider-mario Well, I just did some checking to see what's going on. I'm using the script above to constantly check my memory usage and I've modified it to warn me when cinnamon crosses the 800MiB threshold. Since updating to 3.2.x, I haven't received that many notices. It almost never crosses the 800 mark anymore but it does go up slowly during the course of the day. Before 3.2.x, I've seen cinnamon process use 1GB+ of RAM every second day or so. I have not used 2.x branch at all so have no idea.
Biggest jump in RAM usage occurred when I added a 4K monitor to my setup. More pixels on screen = more RAM for cinnamon for some reason. That's when cinnamon went from using 150MiB at the start to 300MiB+ right off the bat.
Also, when I browse images with Xviewer, the default image viewer, cinnamon RAM usage skyrockets. Why? I have no idea.
Here's the RAM usage from the past few days... I just plotted the last 500 data points. Dips are shutdowns at the end of the day.

Still exists in 3.4. Pity.
@magnetx yeah, it's still there but it's not as bad. It never goes over 600MB anymore.
Hello
the problem is still present
Cinnamon 3.4.6 with ArchLinux.
Excessive consumption of the ram from the start of the pc (1.1 GB anyway)
and after 5 hours of operation I am at 2.8 GB with only 6 open firefox tabs and Quodlibet ..
the problem is nonexistent on my Debian Sid Cinnamon (3.4.6)
it's a memory leak of Cinnamon on Arch?
the more the versions of Cinnamon evolve, the more it becomes greedy, as much as Gnome, pity
hoping for a fix ...
http://pix.toile-libre.org/upload/original/1505071937.png
I think this is not related to Cinnamon. I had the same issue with Ubuntu, then I tried different distros with different window manager and searched the net to find a solution, but nothing.
I have a DELL latitude with nvidia proprietary driver and I suspect that this due to graphic driver.
Now I'm using Mint on two notebooks, one with nvidia and one with intel GPU, and the issue is present much more on the first one.
I also have the problem, and yes, it is worse with Nvidia and high resolution panels.
Not only that, but also the GPU use is much much higher than even Unity!
I get 400MB of memory use that quite quickly climb to about 1GB, and stays there.
For me, what seems to accelerate the leak is when there is an animated icon in the systray, for example SpiderOak ONE uploading stuff. Incidentally, it also causes Cinnamon to stutter and use a lot of CPU, but only since Cinnamon 3.0 IIRC. I don’t remember having had the problem with 2.8.
Nvidia drivers appear responsible
on my Sid after updating the Nvidia driver, I have 200MB of RAM at startup used more before the update.
knowing that I did not add any software at startup.
Therefore, ArchLinux and Debian are almost identical in RAM consumption at startup.
About 1 GB used.
Maybe the Intel chipset (i7 3630qm) uses a little (too much) ram?
I monitored Cinnamon 3.4.6 over the past 6-7 days again. Here's the plot:

It seems to me that memory usage has gotten somewhat worse than from before. It now averages over 700MB. If I were betting money, I'd wager that Nemo's thumbnails view is the culprit. When I browse folders with lots of images in a thumbnail mode, memory always spikes up a lot. Nemo's also quite unstable for me (crashes about 6-12 times every day on my machine).
Memory map for 'cinnamon' process shows that 80% of memory usage is 'heap'.

Closed
Duplicate of #6850