<div dir="ltr">Hi all,<div><br></div><div>Here&#39;s a tip for those of you running FUSE clients on memory-constrained boxes.</div><div><br></div><div>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 memory.  </div>
<div><br></div><div>If the kernel kills the glusterfs process, the FUSE mount in question becomes inaccessible and must be unmounted and remounted.  This is bad.</div><div><br></div><div>Anyway, I use puppet to disable the OOM killer on the glusterfs process.  Here&#39;s the exec I use for it:</div>
<div><br></div><div><div>  exec { &#39;disable-oom-killer-on-glusterfs-client&#39;:</div><div>    path    =&gt; &quot;/bin:/sbin:/usr/bin:/usr/sbin&quot;,</div><div>    command =&gt; &#39;echo -17  &gt; /proc/$(pidof /usr/sbin/glusterfs)/oom_score_adj&#39;,</div>
<div>    onlyif  =&gt; &#39;test 0 = $(cat /proc/$(pidof /usr/sbin/glusterfs)/oom_score_adj)&#39;,</div><div>    require =&gt; Package[&#39;glusterfs-client&#39;],</div><div>  }</div><div><br></div><div>Another tip is to keep a sigil file in your volume, say &quot;MOUNTED&quot;, which you can test for with your monitoring agent to see if the filesystem is accessible.  Of course, if you can&#39;t stat() the MOUNTED file, the volume is not mounted.</div>
<div><br></div><div>Hope this helps others!</div><div><br></div>-- <br>Justin Dossey<br>CTO, PodOmatic<div><br></div>
</div></div>