<div dir="ltr">Yes, we do have our application using shared memory which is what we see when the cluster is down.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 17, 2016 at 10:53 PM, Ken Gaillot <span dir="ltr">&lt;<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/17/2016 12:02 PM, Nikhil Utane wrote:<br>
&gt; OK. Will do that.<br>
&gt;<br>
&gt; Actually I gave the /dev/shm usage when the cluster wasn&#39;t up.<br>
&gt; When it is up, I see it occupies close to 300 MB (it&#39;s also the DC).<br>
<br>
</span>Hmmm, there should be no usage if the cluster is stopped. Any memory<br>
used by the cluster will start with &quot;qb-&quot;, so anything else is from<br>
something else.<br>
<br>
If all executables using libqb (including corosync and pacemaker) are<br>
stopped, it&#39;s safe to remove any /dev/shm/qb-* files that remain. That<br>
should be rare, probably only after a core dump or such.<br>
<span class=""><br>
&gt; tmpfs                   500.0M    329.4M    170.6M  66% /dev/shm<br>
&gt;<br>
&gt; On another node the same is 115 MB.<br>
&gt;<br>
&gt; Anyways, I&#39;ll monitor the usage to know what size is needed.<br>
&gt;<br>
&gt; Thank you Ken and Ulrich.<br>
&gt;<br>
&gt; On Tue, May 17, 2016 at 8:23 PM, Ken Gaillot &lt;<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a><br>
</span><div><div class="h5">&gt; &lt;mailto:<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     On 05/17/2016 04:07 AM, Nikhil Utane wrote:<br>
&gt;     &gt; What I would like to understand is how much total shared memory<br>
&gt;     &gt; (approximately) would Pacemaker need so that accordingly I can define<br>
&gt;     &gt; the partition size. Currently it is 300 MB in our system. I recently ran<br>
&gt;     &gt; into insufficient shared memory issue because of improper clean-up. So<br>
&gt;     &gt; would like to understand how much Pacemaker would need for a 6-node<br>
&gt;     &gt; cluster so that accordingly I can increase it.<br>
&gt;<br>
&gt;     I have no idea :-)<br>
&gt;<br>
&gt;     I don&#39;t think there&#39;s any way to pre-calculate it. The libqb library is<br>
&gt;     the part of the software stack that actually manages the shared memory,<br>
&gt;     but it&#39;s used by everything -- corosync (including its cpg and<br>
&gt;     votequorum components) and each pacemaker daemon.<br>
&gt;<br>
&gt;     The size depends directly on the amount of communication activity in the<br>
&gt;     cluster, which is only indirectly related to the number of<br>
&gt;     nodes/resources/etc., the size of the CIB, etc. A cluster with nodes<br>
&gt;     joining/leaving frequently and resources moving around a lot will use<br>
&gt;     more shared memory than a cluster of the same size that&#39;s quiet. Cluster<br>
&gt;     options such as cluster-recheck-interval would also matter.<br>
&gt;<br>
&gt;     Practically, I think all you can do is simulate expected cluster<br>
&gt;     configurations and loads, and see what it comes out to be.<br>
&gt;<br>
&gt;     &gt; # df -kh<br>
&gt;     &gt; tmpfs                   300.0M     27.5M    272.5M   9% /dev/shm<br>
&gt;     &gt;<br>
&gt;     &gt; Thanks<br>
&gt;     &gt; Nikhil<br>
&gt;     &gt;<br>
&gt;     &gt; On Tue, May 17, 2016 at 12:09 PM, Ulrich Windl<br>
&gt;     &gt; &lt;<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a><br>
&gt;     &lt;mailto:<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a>&gt;<br>
</div></div>&gt;     &gt; &lt;mailto:<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a><br>
<span class="">&gt;     &lt;mailto:<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-regensburg.de</a>&gt;&gt;&gt; wrote:<br>
&gt;     &gt;<br>
&gt;     &gt;     Hi!<br>
&gt;     &gt;<br>
&gt;     &gt;     One of the main problems I identified with POSIX shared memory<br>
&gt;     &gt;     (/dev/shm) in Linux is that changes to the shared memory don&#39;t<br>
&gt;     &gt;     affect the i-node, so you cannot tell from a &quot;ls -rtl&quot; which<br>
&gt;     &gt;     segments are still active and which are not. You can only see the<br>
&gt;     &gt;     creation time.<br>
&gt;     &gt;<br>
&gt;     &gt;     Maybe there should be a tool that identifies and cleans up obsolete<br>
&gt;     &gt;     shared memory.<br>
&gt;     &gt;     I don&#39;t understand the part talking about the size of /dev/shm: It&#39;s<br>
&gt;     &gt;     shared memory. See &quot;kernel.shmmax&quot; and &quot;kernel.shmall&quot; in you sysctl<br>
&gt;     &gt;     settings (/etc/sysctl.conf).<br>
&gt;     &gt;<br>
&gt;     &gt;     Regards,<br>
&gt;     &gt;     Ulrich<br>
&gt;     &gt;<br>
&gt;     &gt;     &gt;&gt;&gt; Nikhil Utane &lt;<a href="mailto:nikhil.subscribed@gmail.com">nikhil.subscribed@gmail.com</a> &lt;mailto:<a href="mailto:nikhil.subscribed@gmail.com">nikhil.subscribed@gmail.com</a>&gt;<br>
</span>&gt;     &gt;     &lt;mailto:<a href="mailto:nikhil.subscribed@gmail.com">nikhil.subscribed@gmail.com</a><br>
<span class="">&gt;     &lt;mailto:<a href="mailto:nikhil.subscribed@gmail.com">nikhil.subscribed@gmail.com</a>&gt;&gt;&gt; schrieb am 16.05.2016 um 14:31 in<br>
&gt;     &gt;     Nachricht<br>
&gt;     &gt;<br>
&gt;      &lt;CAGNWmJVSye5PJgkdbFAi5AzO+Qq-j=<a href="mailto:2fS1c%2B0rGnqS994vV48w@mail.gmail.com">2fS1c+0rGnqS994vV48w@mail.gmail.com</a><br>
&gt;     &lt;mailto:<a href="mailto:2fS1c%252B0rGnqS994vV48w@mail.gmail.com">2fS1c%2B0rGnqS994vV48w@mail.gmail.com</a>&gt;<br>
</span>&gt;     &gt;     &lt;mailto:<a href="mailto:2fS1c%252B0rGnqS994vV48w@mail.gmail.com">2fS1c%2B0rGnqS994vV48w@mail.gmail.com</a><br>
&gt;     &lt;mailto:<a href="mailto:2fS1c%25252B0rGnqS994vV48w@mail.gmail.com">2fS1c%252B0rGnqS994vV48w@mail.gmail.com</a>&gt;&gt;&gt;:<br>
<span class="im HOEnZb">&gt;     &gt;     &gt; Thanks Ken.<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; Could you also respond on the second question?<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;&gt;     Also, in /dev/shm I see that it created around 300+ files of<br>
&gt;     &gt;     around<br>
&gt;     &gt;     &gt;&gt;     250 MB.<br>
&gt;     &gt;     &gt;&gt;<br>
&gt;     &gt;     &gt;&gt;     For e.g.<br>
&gt;     &gt;     &gt;&gt;     -rw-rw----    1 hacluste hacluste      8232 May  6 13:03<br>
&gt;     &gt;     &gt;&gt;     qb-cib_rw-response-25035-25038-10-header<br>
&gt;     &gt;     &gt;&gt;     -rw-rw----    1 hacluste hacluste    540672 May  6 13:03<br>
&gt;     &gt;     &gt;&gt;     qb-cib_rw-response-25035-25038-10-data<br>
&gt;     &gt;     &gt;&gt;     -rw-------    1 hacluste hacluste      8232 May  6 13:03<br>
&gt;     &gt;     &gt;&gt;     qb-cib_rw-response-25035-25036-12-header<br>
&gt;     &gt;     &gt;&gt;     -rw-------    1 hacluste hacluste    540672 May  6 13:03<br>
&gt;     &gt;     &gt;&gt;     qb-cib_rw-response-25035-25036-12-data<br>
&gt;     &gt;     &gt;&gt;     And many more..<br>
&gt;     &gt;     &gt;&gt;<br>
&gt;     &gt;     &gt;&gt;     We have limited space in /dev/shm and all these files are<br>
&gt;     &gt;     filling it<br>
&gt;     &gt;     &gt;&gt;     up. Are these all needed? Any way to limit? Do we need to do any<br>
&gt;     &gt;     &gt;&gt;     clean-up if pacemaker termination was not graceful? What&#39;s the<br>
&gt;     &gt;     &gt; recommended size for this folder for Pacemaker? Our cluster will have<br>
&gt;     &gt;     &gt; maximum 6 nodes.<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; -Regards<br>
&gt;     &gt;     &gt; Nikhil<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; On Sat, May 14, 2016 at 3:11 AM, Ken Gaillot &lt;<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a> &lt;mailto:<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>&gt;<br>
</span><div class="HOEnZb"><div class="h5">&gt;     &gt;     &lt;mailto:<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a> &lt;mailto:<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>&gt;&gt;&gt; wrote:<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;&gt; On 05/08/2016 11:19 PM, Nikhil Utane wrote:<br>
&gt;     &gt;     &gt;&gt; &gt; Moving these questions to a different thread.<br>
&gt;     &gt;     &gt;&gt; &gt;<br>
&gt;     &gt;     &gt;&gt; &gt;     Hi,<br>
&gt;     &gt;     &gt;&gt; &gt;<br>
&gt;     &gt;     &gt;&gt; &gt;     We have limited storage capacity in our system for<br>
&gt;     &gt;     different folders.<br>
&gt;     &gt;     &gt;&gt; &gt;     How can I configure to use a different folder for<br>
&gt;     &gt;     /var/lib/pacemaker?<br>
&gt;     &gt;     &gt;&gt;<br>
&gt;     &gt;     &gt;&gt; ./configure --localstatedir=/wherever (defaults to /var or<br>
&gt;     &gt;     ${prefix}/var)<br>
&gt;     &gt;     &gt;&gt;<br>
&gt;     &gt;     &gt;&gt; That will change everything that normally is placed or<br>
&gt;     looked for<br>
&gt;     &gt;     under<br>
&gt;     &gt;     &gt;&gt; /var (/var/lib/pacemaker, /var/lib/heartbeat, /var/run, etc.).<br>
&gt;     &gt;     &gt;&gt;<br>
&gt;     &gt;     &gt;&gt; Note that while ./configure lets you change the location of<br>
&gt;     nearly<br>
&gt;     &gt;     &gt;&gt; everything, /usr/lib/ocf/resource.d is an exception,<br>
&gt;     because it is<br>
&gt;     &gt;     &gt;&gt; specified in the OCF standard.<br>
&gt;     &gt;     &gt;&gt;<br>
&gt;     &gt;     &gt;&gt; &gt;<br>
&gt;     &gt;     &gt;&gt; &gt;<br>
&gt;     &gt;     &gt;&gt; &gt;     Also, in /dev/shm I see that it created around 300+ files<br>
&gt;     &gt;     of around<br>
&gt;     &gt;     &gt;&gt; &gt;     250 MB.<br>
&gt;     &gt;     &gt;&gt; &gt;<br>
&gt;     &gt;     &gt;&gt; &gt;     For e.g.<br>
&gt;     &gt;     &gt;&gt; &gt;     -rw-rw----    1 hacluste hacluste      8232 May  6 13:03<br>
&gt;     &gt;     &gt;&gt; &gt;     qb-cib_rw-response-25035-25038-10-header<br>
&gt;     &gt;     &gt;&gt; &gt;     -rw-rw----    1 hacluste hacluste    540672 May  6 13:03<br>
&gt;     &gt;     &gt;&gt; &gt;     qb-cib_rw-response-25035-25038-10-data<br>
&gt;     &gt;     &gt;&gt; &gt;     -rw-------    1 hacluste hacluste      8232 May  6 13:03<br>
&gt;     &gt;     &gt;&gt; &gt;     qb-cib_rw-response-25035-25036-12-header<br>
&gt;     &gt;     &gt;&gt; &gt;     -rw-------    1 hacluste hacluste    540672 May  6 13:03<br>
&gt;     &gt;     &gt;&gt; &gt;     qb-cib_rw-response-25035-25036-12-data<br>
&gt;     &gt;     &gt;&gt; &gt;     And many more..<br>
&gt;     &gt;     &gt;&gt; &gt;<br>
&gt;     &gt;     &gt;&gt; &gt;     We have limited space in /dev/shm and all these files are<br>
&gt;     &gt;     filling it<br>
&gt;     &gt;     &gt;&gt; &gt;     up. Are these all needed? Any way to limit? Do we need to<br>
&gt;     &gt;     do any<br>
&gt;     &gt;     &gt;&gt; &gt;     clean-up if pacemaker termination was not graceful?<br>
&gt;     &gt;     &gt;&gt; &gt;<br>
&gt;     &gt;     &gt;&gt; &gt;     -Thanks<br>
&gt;     &gt;     &gt;&gt; &gt;     Nikhil<br>
</div></div></blockquote></div><br></div>