7

I am experiencing a pretty huge memory leak from gnome-shell and after a while memory is up to over 5GB. I have 8GB of system memory and when the system starts using swap the whole system slows down a lot. I do have a SSD but that doesn't make matters better. I have changed the swap settings to 1 but that has no effect. I regularly kill gnome-shell off to be able to use the system. I came from Unity where system-ram was used quite heavily and swap was sometimes used as well. My solution was to up ram from 4GB to 8GB and to change to GNOME, but it seems I still have the same problem :-(

Any ideas how to limit gnome-shell ram usage? Any program that can kill off gnome when it exceeds 4GB for example? I don't really know what to do except try Unity again or change to Xubuntu or such. I do really like GNOME though...

7
  • A have a couple of scripts which clear the cache, and push swap back onto disk. If you would like to try them I can post them into an answer. Dec 5, 2014 at 18:13
  • Please post more information on your memory use. output of free -m. top can also help. Linux is not windows and unused RAM is wasted RAM. Hard to know if you even have a problem. Clearing the cache and pushing swap back to disk may or may not help.
    – Panther
    Dec 5, 2014 at 19:49
  • here is my free -m output: total used free shared buffers cached Mem: 7967 7555 412 43 33 2739 -/+ buffers/cache: 4781 3185 Swap: 3813 588 3225 Dec 5, 2014 at 22:03
  • I prefer the system not to use swap completely as it uses the ssd to much and it only makes the system slower. It is a bit annoying that it is so hard to stop the system from using it. I do want to be able to put the computer to sleep :-) Dec 5, 2014 at 22:06
  • For the close voters: I think that this is fully in topic with the Gnome flavor of Ubuntu.
    – Rmano
    Dec 5, 2014 at 22:40

1 Answer 1

7

gnome-shell leaks memory like a colander.

There is a bug reported here (it's for Mint but it's the same problem) and on redhat.

Upstream there are at least 9 bugs reported.

Basically (one developer told me once, I can't find the reference) gnome-shell is completely unable (by design) to control the memory usage of its extensions. Add this to the fact that there is no API documentation for writing them (at least, I could not find it when I wrote mine) and well... leak happens.

In my case, I had to remove a couple of extensions (sensors and weather were the main culprits) that made the shell grows like crazy. Even now, every now and then I have to restart the shell with Alt-F2 and r to get it back to its normal size (and then you have to cope with gnome-terminals going crazy...).

Practical solution:

  1. remove all extensions, look at the memory usage, and add them one by one to find the worst offender(s).

  2. gnome-shell still leaks memory by itself, or you really need some extensions. So I do every now and then (basically every morning, my PC is normally on 24/7):

  3. kill gnome terminals to avoid the bug above (in 14.04-shell 3.10; should be fixed in newer shell), by doing from one of them:

    killall gnome-terminal 
    

    and reset the shell with Alt-F2 and r

PD: I know, there are others DEs. But I like gnome-shell, call me crazy...

10
  • I might need to take away an extension. I tried a extension that monitors temperature but i didnt get it to work anyways...I would be great if it were that simple! I really like the simplicity of gnome instead of unity :-P Dec 5, 2014 at 22:07
  • i unistalled a few gnome programs to lessen the memory, now it is only up to 3gb. I will see tomorrow if it helped. I also disabled the firefox-ubuntu-addon inside firefox. I hope this helps :-) Dec 5, 2014 at 22:44
  • didnt seem to work....3.6gb and climbing :-( Dec 5, 2014 at 22:49
  • Up to 6.1gb now....This does not feel normal. It is a very fresh install with very little tinkering done to the system. Dec 6, 2014 at 8:03
  • Try to remove all extensions and repeat. If still there, it is probably something introduced in 14.10 --- so a bug report would be the right way. I have no intention to upgrade now... I have work to do ;-)
    – Rmano
    Dec 6, 2014 at 8:48

Not the answer you're looking for? Browse other questions tagged .