GNOME memory leak discussion

Here you can discuss every aspect of Debian. Note: not for support requests!

GNOME memory leak discussion

Postby Wheelerof4te » 2018-03-30 16:12

For years, GNOME has been regarded as a memory hog DE. And now, most of the public has learned a reason why:
GNOME devs work on a fix for large memory leak

Truth is, this has been known among the dev community for a long time. gnome-shell process will leak 1Mbit of RAM every few minutes. Worse, when using any action, such as displaying overview, memory will leak by a 0.1 Mbits. Just try to reproduce it by spamming "super" for a while. Then open System Monitor and see the RSS usage for gnome-shell.

GNOME dev has pinpointed a culprit, it's so-called "garbage collector". Read more about it in the article. If all goes well, a patch should be issued sometime after Ubuntu 18.04 releases, and should be ready for Debian 9.5 point-release.
Now, onto a more wider discussion. How did this bug remained unfixed for so long? Why didn't devs give priority to fixing it, since it was/still is giving GNOME such a bad reputation as a memory hog? How many more of such bugs exist in massive open-source projects like GNOME?

These are all questions for a more technically capable people than myself. But since GNOME is default for so many distros now, users have a right to know about these bugs and propose solutions that will prevent such rep-breaking bugs from incurring again.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: GNOME memory leak discussion

Postby bw123 » 2018-03-30 16:59

I think memory leaks are very common, and have been for a long time. There might be a lot of reasons for it, and on large projects that reuse a lot of code, especially a lot of old code, or code from different languages, or code from different programmers, I think it might be a lot harder to fix than we might assume.

I've never really thought about a massive memory leak as a "known issue" in gnome, but I haven't really used it.
User avatar
bw123
 
Posts: 3278
Joined: 2011-05-09 06:02
Location: TN_USA

Re: GNOME memory leak discussion

Postby Wheelerof4te » 2018-03-30 17:43

Yes, but most other leaks are often tied to performing specific commands or tasks in an application. And when that application is closed, the memory leak is gone. Here, we are talking about memory leak from a DE-related core process which is persistent. In other words, it can't be simply terminated without crashing entire session.

Yes, these kinds of leaks are hard to identify. But projects that impact a large number of users should focus on stability to minimize critical bugs. I don't think GNOME devs have thought much about stability for...a good while :D

Maybe GNOME devs should reconsider GNOME4 and focus on stabilizing and refining existing platform. Features could be added pro-actively.
EDIT: Removed some nonsense.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: GNOME memory leak discussion

Postby debiman » 2018-03-31 06:23


so basically the fix is not to fix the leak, but create another process that collects the garbage?
sounds typical.

apropos Gnome4.
User avatar
debiman
 
Posts: 2816
Joined: 2013-03-12 07:18

Re: GNOME memory leak discussion

Postby Wheelerof4te » 2018-03-31 11:57

https://gitlab.gnome.org/GNOME/gnome-sh ... note_91418
They have added an extension to "reduce the damage".

Another annoying bug related to Wayland and Mutter is also being worked on:
https://feaneron.com/2018/03/30/leak-hu ... r-hacking/

The issue is that on hybrid systems Mutter is waking the dGPU on every render, which causes the stutter. I reported this issue here a couple of days ago on my Intel/AMD hybrid laptop.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: GNOME memory leak discussion

Postby None1975 » 2018-03-31 12:09

Wheelerof4te wrote:For years, GNOME has been regarded as a memory hog DE.

Also, Gnome is a CPU hog...
OS: Debian 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 627
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: GNOME memory leak discussion

Postby FreewheelinFrank » 2018-04-01 09:07

Does this actually affect Gnome in Stretch? Show Applications bumps up RAM use quite a bit, and by going mad with the Super key and Alt Tab I can get usage up to 250-260MB, but at that point it just goes up and down by a few MB. I have not seen any incremental increase during the day, and memory use does not affect performance, even though I use a cheap low RAM/crap CPU computer that according to the review sites is laggy in Windows 10.
User avatar
FreewheelinFrank
 
Posts: 254
Joined: 2010-06-07 16:59

Re: GNOME memory leak discussion

Postby Wheelerof4te » 2018-04-01 11:02

^Depends on your amount of RAM. For a crappy PC, that looks a lot for single process. IMO, the leak is present even in Stretch. It's a upstream bug that is left unfixed because of it's complexity.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: GNOME memory leak discussion

Postby FreewheelinFrank » 2018-04-01 15:06

I tried to reproduce the bug on my laptop- also running Stretch. Base usage is 95MB. There's a huge jump after clicking Show Applications (presumably due to Gnome caching the icon images in memory) up to about 260MB. Then by switching between windows with Alt Tab at a crazy rate for about a minute I could hit over 300MB, but always at some point memory usage dropped back to under 300MB.

I don't seem to be able to reproduce the inexorable rise some people have reported to several GB. Maybe you have to leave the computer running for several days as seems to be the case with people who have reported Gnome taking up all memory in the bug reports?
User avatar
FreewheelinFrank
 
Posts: 254
Joined: 2010-06-07 16:59

Re: GNOME memory leak discussion

Postby Wheelerof4te » 2018-04-02 19:49

^Yes, most likely those people just put their PC's to sleep or use hibernation. I think it's better for hardware's health to turn them off every night when you sleep.

In other news, Sid has changed default GNOME session back to X due to the micro-stutter bug, it seems.
Code: Select all
Graphics:  Card-1: Intel HD Graphics
           Card-2: Advanced Micro Devices [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430]
           Display Server: x11 (X.Org 1.19.6 ) drivers: i915,radeon
           Resolution: 1366x768@60.02hz
           OpenGL: renderer: Mesa DRI Intel Broadwell GT1
           version: 4.5 Mesa 17.3.7
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: GNOME memory leak discussion

Postby mooreted » 2018-04-08 04:01

My computer has been up for over 24 hours. It was up for several days before my last reboot. Gnome-shell is using 373.8 MB. I tried spamming super and show applications but it pretty much stays right there. I don't see the leak on my end.
mooreted
 
Posts: 352
Joined: 2007-07-23 03:39

Re: GNOME memory leak discussion

Postby Wheelerof4te » 2018-04-08 08:51

^Are you using Stretch?
I seems that certain hardware configurations limit the leak to an acceptable level. Or Debian devs did something magical to reduce it.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Re: GNOME memory leak discussion

Postby mooreted » 2018-04-08 13:58

Yup, I'm using Stretch.

424.8 MB of RAM with Chrome open. No reboot since last post.
mooreted
 
Posts: 352
Joined: 2007-07-23 03:39

Re: GNOME memory leak discussion

Postby Hallvor » 2018-04-08 14:40

mooreted wrote:Yup, I'm using Stretch.

424.8 MB of RAM with Chrome open. No reboot since last post.


Try leaving it on for a few days.
HP Elitebook 2570p, Intel Core i5 3320-M CPU @ 2.60 GHz, 6 GB RAM, Intel HD 4000 graphics, 240 GB SSD, Debian Stretch (KDE)
User avatar
Hallvor
 
Posts: 842
Joined: 2009-04-16 18:35
Location: Norway

Re: GNOME memory leak discussion

Postby Wheelerof4te » 2018-04-09 15:01

It's using 142 MB on my Debian 9 system that's been running for 3 hours straight with casual usage.
Maybe when I shut it down, it reaches 200 MB. /s

So yeah, Debian has done something to it, or it doesn't exist in GNOME 3.22.
User avatar
Wheelerof4te
 
Posts: 1134
Joined: 2015-08-30 20:14

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable