[Gluster-users] Disable Linux OOM killer on GlusterFS FUSE cllient

Justin Dossey jbd at podomatic.com
Thu Feb 20 17:24:02 UTC 2014

Hi all,

Here's a tip for those of you running FUSE clients on memory-constrained

Since the glusterfs client process is just a process, the OOM killer may
select it for killing if the system runs out of memory for some reason.
 This condition happens once in a while to me on my image thumbnailing
servers-- people upload all kinds of crazy images to our site and
occasionally one of them causes ImageMagick to suck up all available

If the kernel kills the glusterfs process, the FUSE mount in question
becomes inaccessible and must be unmounted and remounted.  This is bad.

Anyway, I use puppet to disable the OOM killer on the glusterfs process.
 Here's the exec I use for it:

  exec { 'disable-oom-killer-on-glusterfs-client':
    path    => "/bin:/sbin:/usr/bin:/usr/sbin",
    command => 'echo -17  > /proc/$(pidof
    onlyif  => 'test 0 = $(cat /proc/$(pidof
    require => Package['glusterfs-client'],

Another tip is to keep a sigil file in your volume, say "MOUNTED", which
you can test for with your monitoring agent to see if the filesystem is
accessible.  Of course, if you can't stat() the MOUNTED file, the volume is
not mounted.

Hope this helps others!

Justin Dossey
CTO, PodOmatic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20140220/18a5f3dc/attachment.html>

More information about the Gluster-users mailing list