Results 1 to 9 of 9

Thread: Help releasing / freeing up buffer/cache specifically used by Gnome session

  1. #1
    Join Date
    Jun 2014
    Location
    FarFarAway
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Help releasing / freeing up buffer/cache specifically used by Gnome session

    There is a well documented problem of huge memory leak in Gnome Session.
    Some of the leaks have been fixed in Gnome but haven't been pushed down to Ubuntu yet.
    So, I am having to keep rebooting my machine to free up ram or system freezes up.

    Now. until the fixes are pushed, I would like to set up a script (or something like it) to manually release the buffer / cache. Especially used / marked by Gnome session (as there are other valid programs using buffer / cache as well).

    I tried (over ssh):
    Code:
    gnome-session --replace
    did not work. I don;t get any error but I don't see any change in RAM usage (free command used).

    Help please.

    Some links to the leak problem:
    https://feaneron.com/2018/04/20/the-...l-memory-leak/
    https://bugs.launchpad.net/ubuntu/+s...l/+bug/1672297

    PS: Running 18.04.I already have an old thread (from 17.10) but that was specifically for leak and I am leaving it alone.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    GUI stuff can't be done over a remote session due to the way that X/Windows clients and servers work.
    Also, does gnome-session stop, close, then restart the X session? I'd think that a logout and login would be necessary.

    p.s. - I don't use gnome.

  3. #3
    Join Date
    Apr 2018
    Beans
    62
    Distro
    Ubuntu

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    I believe TheFu is right, a complete session restart is required, so you'll either have to logout / login, or restart GDM ("systemctl restart gdm.service").
    My Ubuntu / Linux / open source website LinuxUprising.

  4. #4
    Join Date
    Jun 2014
    Location
    FarFarAway
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    Can I use "DISPLAY" variable" and "nohup" in some combination to accomplish this over ssh?

    I will try to restart the gdm service and see if that frees up the ram.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    no. You can kill the x/windows process, but that will term-close all running X-apps tied to the X/server. xorg is the process on 16.04 and it runs as root.

  6. #6
    Join Date
    Jun 2014
    Location
    FarFarAway
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    Restarting GDM didn't return any error. But no impact on ram / cache / buffer.

    OK. I know this could be dangerous, but is there anyway / command / process by which I can directly clean up the cache?

    I tried xfce, but don't like it much. Still running on my laptops but I rather not use it on server.
    Other than switching to something other than gnome, do I have any options?

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    Any options?
    * reboot
    * don't run any GUI on a server

  8. #8
    Join Date
    Jun 2014
    Location
    FarFarAway
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    @TheFu and other experts.
    So, I switched to "cinnamon" instead of Gnome. And my buffer/cache still kept getting filled up not freeing automatically. Since Cinnamon is derivative of Gnome, I then installed xfce4. Still same symptoms.
    I started looking at different places.
    What I realize (currently) is that when I access/copy files from that computer (as I use it as server) the buffer keeps getting used but never frees up even after files are done copying. The method used doesn't make difference. I used samba and ssh (scp). Both eat up ram and don't release it back.
    After looking around. I found these two commands to free up buffer. I am not sure how risky these are.
    Could you add your thoughts?
    Code:
     echo 3 > /proc/sys/vm/drop_caches
    AND
    Code:
    sudo sysctl vm.drop_caches=1
    Both of these commands free up the buffer/cache.
    Now, someone also mentioned the
    Code:
    fincore
    command from "linux-ftools" to see what is in the cache, but looks like it's not available in repos.

    All I am looking for is ram managed well so that it doesn't crash my machine.

  9. #9
    Join Date
    Jun 2014
    Location
    FarFarAway
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Help releasing / freeing up buffer/cache specifically used by Gnome session

    Bump

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •