gam_server on ubuntu

So today my gam_server went memory crazy. It is a daemon that notfies applications about file changes. At one point it was using 40% of my gig of memory. I killed it and it came right back and was using 22% a short while later.

Luckily the newest version(0.17) is in dapper drake and is supposed to fix a few of the memory leaks that are in 0.15 that is in breezy. There are no special dependencies on dapper so dpkg installs it just fine on breezy.

I installed gamin and libgamin0(download then dpkg -i filename.deb from a command line). Hopefully I won’t have any more issues.

update: So far so good. No gigantic memory leaks overnight. I did attempt to just uninstall gamin but then apt decided it would have to uninstall all of my gnome desktop so I looked for another solution

update2: I haven’t had any issues since I installed the new versions last month. So go install 0.17 if you run into this problem.

update3: Follow instructions on Kibbitz and update your gaminrc in /etc/gamin/gaminrc to set notify status on any mounted partitions:


# configuration for gamin
# Can be used to override the default behaviour.
# notify filepath(s) : indicate to use kernel notification
# poll filepath(s) : indicate to use polling instead
# fsset fsname method poll_limit : indicate what method of notification for
# the filesystem
# kernel - use the kernel for notification
# poll - use polling for notification
# none - don't use any notification
#
# the poll_limit is the number of seconds
# that must pass before a resource is polled
# again. It is optional, and if it is not
# present the previous value will be used
# or the default.
#
# Some examples:
# notify /mnt/local* /mnt/pictures* # use kernel notification on these paths
# poll /temp/* # use poll notification on these paths
# fsset nfs poll 10 # use polling on nfs mounts and poll once
# every 10 seconds
notify /media/music* /media/pictures* /media/movies* /mnt/extra*
fsset ext3 notify

14 Responses to “gam_server on ubuntu”

  1. Kyle Schneider Says:

    Now if only I could do that to fix my problem with Firefox being a memory hog.

  2. spi Says:

    yeah tell me about it. Firefox is pretty leaky on my system also. Uses about as much memory as Xorg, which is pretty silly.

  3. Tim Carmean Says:

    Hopefully this will lead to a closure of an outstanding bug that I finally became aware of in breezy where I can no longer unmount removable media without an annoying error.

  4. neuro Says:

    Just had the exact same thing happen to me; was wondering why my box was so unresponsive, then noticed the gig of ram and gig and a half of swap being used to the full by gam_server. Killed the process off with SIGKILL and got ~ 890MB of ram back. Thanks for being the first hit on google for “gam_server ubuntu” :)

  5. flopexile Says:

    You can fix the problem by upgrading gamin (need to include a “…dapper main” in your sources.list file).

  6. theturtle Says:

    thanks for the fix. google came across your page, when i searched for gam_server. we’ll see if upgrading fixes it for me as well. it has been quite annoying coming home everyday and noticing my system running at a crawl.

  7. Matt Dorn Says:

    Why is Ubuntu not including this fix as part of the automated updates for Breezy?

    Re. Firefox, this post explains a possible fix:

    http://www.ubuntu-es.org/node/11381

    It’s in Spanish, but basically he suggests

    - Enter the address “about:config” in Firefox
    - Click the right button on any entry and put “New -> Integer”
    - Paste the following entry: browser.cache.memory.capacity
    - Assign the limit value of memory usable by the cache en KB, as in 65536 (64 MB)
    - Restart Firefox

    FYI, I haven’t tested it yet.

  8. spi Says:

    It is a little random in the people that it affects. It doesn’t seem to be across the board. The newer version of gamin may have unanticipated consequences for the stability of the platform as a whole. It is hard to know exactly why it has been released into the breezy update repository.

  9. SubWolf Says:

    Running the latest Dapper beta now, not noticing gam_server eating up any huge amounts of RAM, but it’s taking up more CPU than I’d expect on an XP 3000+. Hmmm.

  10. Haakon Nilsen Says:

    Yeah, I’m also on dapper, and gam_server hogs a whole lot of CPU time here. There’s a bug reported about it at https://launchpad.net/distros/ubuntu/+source/gamin/+bug/36581 . Hope they can find a way to fix this!

  11. Adi Says:

    Thanks for the upgrade tip, gam_server in my Kubuntu Breezy install’s just produced the same memory-eating. I installed the newer package from Dapper and it seems fine now. :)

  12. fedora 5 Says:

    Same thing on fedora core 5 - huge amount of ram wasted… the longer i keep running the more it uses …until i kill it

  13. Aleksandr Koltsoff Says:

    sudo chmod -x /usr/lib/gamin/gam_server

    this way package management doesn’t go berserk on next gamin update.
    You might want to kill the running instance of gam_server using kill -9 though.

    Since the execution bit has been removed, it can no longer be re-instanted automatically.

  14. spi Says:

    Except that doesn’t help services that actually use gam server. My last update solves the root of the problem(gamin incorrectly monitoring mounted partitions)