<div dir="ltr"><div># gluster --version</div><div>glusterfs 3.7.9 built on Jun 10 2016 06:32:42</div><div><br></div><div><br></div><div>Try not to make fun of my python, but I was able to make a small modification to the to the sync_files.py script from smallfile and at least enable my team to move on with testing. It&#39;s terribly hacky and ugly, but works around the problem, which I am pretty convinced is a Gluster bug at this point.</div><div><br></div><div><br></div><div><div># diff bin/sync_files.py.orig bin/sync_files.py</div><div>6a7,8</div><div>&gt; import errno</div><div>&gt; import binascii</div><div>27c29,40</div><div>&lt;         shutil.rmtree(master_invoke.network_dir)</div><div>---</div><div>&gt;         try:</div><div>&gt;             shutil.rmtree(master_invoke.network_dir)</div><div>&gt;         except OSError as e:</div><div>&gt;             err = e.errno</div><div>&gt;             if err != errno.EEXIST:</div><div>&gt;                 # workaround for possible bug in Gluster</div><div>&gt;                 if err != errno.ENOTEMPTY:</div><div>&gt;                     raise e</div><div>&gt;                 else:</div><div>&gt;                     print(&#39;saw ENOTEMPTY on stonewall, moving shared directory&#39;)</div><div>&gt;                     ext = str(binascii.b2a_hex(os.urandom(15)))</div><div>&gt;                     shutil.move(master_invoke.network_dir, master_invoke.network_dir + ext)</div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br><div dir="ltr" style="font-size:small">Dustin Black, RHCA  </div><div dir="ltr" style="font-size:small">Senior Architect, Software-Defined Storage</div><div dir="ltr" style="font-size:small">Red Hat, Inc.<br>(o) +1.212.510.4138  (m) +1.215.821.7423  <br><a href="mailto:dustin@redhat.com" style="color:rgb(17,85,204)" target="_blank">dustin@redhat.com</a>    <br>  </div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Oct 18, 2016 at 7:09 PM, Dustin Black <span dir="ltr">&lt;<a href="mailto:dblack@redhat.com" target="_blank">dblack@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"><p dir="ltr">Dang. I always think I get all the detail and inevitably leave out something important. :-/</p>
<p dir="ltr">I&#39;m mobile and don&#39;t have the exact version in front of me, but this is recent if not latest RHGS on RHEL 7.2.<br>
   </p><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><div class="gmail_quote">On Oct 18, 2016 7:04 PM, &quot;Dan Lambright&quot; &lt;<a href="mailto:dlambrig@redhat.com" target="_blank">dlambrig@redhat.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dustin,<br>
<br>
What level code ? I often run smallfile on upstream code with tiered volumes and have not seen this.<br>
<br>
Sure, one of us will get back to you.<br>
<br>
Unfortunately, gluster has a lot of protocol overhead (LOOKUPs), and they overwhelm the boost in transfer speeds you get for small files. A presentation at the Berlin gluster summit evaluated this.  The expectation is md-cache will go a long way towards helping that, before too long.<br>
<br>
Dan<br>
<br>
<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Dustin Black&quot; &lt;<a href="mailto:dblack@redhat.com" target="_blank">dblack@redhat.com</a>&gt;<br>
&gt; To: <a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a><br>
&gt; Cc: &quot;Annette Clewett&quot; &lt;<a href="mailto:aclewett@redhat.com" target="_blank">aclewett@redhat.com</a>&gt;<br>
&gt; Sent: Tuesday, October 18, 2016 4:30:04 PM<br>
&gt; Subject: [Gluster-devel] Possible race condition bug with tiered volume<br>
&gt;<br>
&gt; I have a 3x2 hot tier on NVMe drives with a 3x2 cold tier on RAID6 drives.<br>
&gt;<br>
&gt; # gluster vol info 1nvme-distrep3x2<br>
&gt; Volume Name: 1nvme-distrep3x2<br>
&gt; Type: Tier<br>
&gt; Volume ID: 21e3fc14-c35c-40c5-8e46-c258c1<wbr>302607<br>
&gt; Status: Started<br>
&gt; Number of Bricks: 12<br>
&gt; Transport-type: tcp<br>
&gt; Hot Tier :<br>
&gt; Hot Tier Type : Distributed-Replicate<br>
&gt; Number of Bricks: 3 x 2 = 6<br>
&gt; Brick1: n5:/rhgs/hotbricks/1nvme-distr<wbr>ep3x2-hot<br>
&gt; Brick2: n4:/rhgs/hotbricks/1nvme-distr<wbr>ep3x2-hot<br>
&gt; Brick3: n3:/rhgs/hotbricks/1nvme-distr<wbr>ep3x2-hot<br>
&gt; Brick4: n2:/rhgs/hotbricks/1nvme-distr<wbr>ep3x2-hot<br>
&gt; Brick5: n1:/rhgs/hotbricks/1nvme-distr<wbr>ep3x2-hot<br>
&gt; Brick6: n0:/rhgs/hotbricks/1nvme-distr<wbr>ep3x2-hot<br>
&gt; Cold Tier:<br>
&gt; Cold Tier Type : Distributed-Replicate<br>
&gt; Number of Bricks: 3 x 2 = 6<br>
&gt; Brick7: n0:/rhgs/coldbricks/1nvme-dist<wbr>rep3x2<br>
&gt; Brick8: n1:/rhgs/coldbricks/1nvme-dist<wbr>rep3x2<br>
&gt; Brick9: n2:/rhgs/coldbricks/1nvme-dist<wbr>rep3x2<br>
&gt; Brick10: n3:/rhgs/coldbricks/1nvme-dist<wbr>rep3x2<br>
&gt; Brick11: n4:/rhgs/coldbricks/1nvme-dist<wbr>rep3x2<br>
&gt; Brick12: n5:/rhgs/coldbricks/1nvme-dist<wbr>rep3x2<br>
&gt; Options Reconfigured:<br>
&gt; cluster.tier-mode: cache<br>
&gt; features.ctr-enabled: on<br>
&gt; performance.readdir-ahead: on<br>
&gt;<br>
&gt;<br>
&gt; I am attempting to run the &#39;smallfile&#39; benchmark tool on this volume. The<br>
&gt; &#39;smallfile&#39; tool creates a starting gate directory and files in a shared<br>
&gt; filesystem location. The first run (write) works as expected.<br>
&gt;<br>
&gt; # smallfile_cli.py --threads 12 --file-size 4096 --files 300 --top<br>
&gt; /rhgs/client/1nvme-distrep3x2 --host-set<br>
&gt; c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,<wbr>c10,c11 --prefix test1 --stonewall Y<br>
&gt; --network-sync-dir /rhgs/client/1nvme-distrep3x2/<wbr>smf1 --operation create<br>
&gt;<br>
&gt; For the second run (read), I believe that smallfile attempts first to &#39;rm<br>
&gt; -rf&#39; the &quot;network-sync-dir&quot; path, which fails with ENOTEMPTY, causing the<br>
&gt; run to fail<br>
&gt;<br>
&gt; # smallfile_cli.py --threads 12 --file-size 4096 --files 300 --top<br>
&gt; /rhgs/client/1nvme-distrep3x2 --host-set<br>
&gt; c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,<wbr>c10,c11 --prefix test1 --stonewall Y<br>
&gt; --network-sync-dir /rhgs/client/1nvme-distrep3x2/<wbr>smf1 --operation create<br>
&gt; ...<br>
&gt; Traceback (most recent call last):<br>
&gt; File &quot;/root/bin/smallfile_cli.py&quot;, line 280, in &lt;module&gt;<br>
&gt; run_workload()<br>
&gt; File &quot;/root/bin/smallfile_cli.py&quot;, line 270, in run_workload<br>
&gt; return run_multi_host_workload(params<wbr>)<br>
&gt; File &quot;/root/bin/smallfile_cli.py&quot;, line 62, in run_multi_host_workload<br>
&gt; sync_files.create_top_dirs(mas<wbr>ter_invoke, True)<br>
&gt; File &quot;/root/bin/sync_files.py&quot;, line 27, in create_top_dirs<br>
&gt; shutil.rmtree(<a href="http://master_invoke.ne">master_invoke.ne</a><wbr>twork_dir)<br>
&gt; File &quot;/usr/lib64/python2.7/shutil.p<wbr>y&quot;, line 256, in rmtree<br>
&gt; onerror(os.rmdir, path, sys.exc_info())<br>
&gt; File &quot;/usr/lib64/python2.7/shutil.p<wbr>y&quot;, line 254, in rmtree<br>
&gt; os.rmdir(path)<br>
&gt; OSError: [Errno 39] Directory not empty: &#39;/rhgs/client/1nvme-distrep3x2<wbr>/smf1&#39;<br>
&gt;<br>
&gt;<br>
&gt; From the client perspective, the directory is clearly empty.<br>
&gt;<br>
&gt; # ls -a /rhgs/client/1nvme-distrep3x2/<wbr>smf1/<br>
&gt; . ..<br>
&gt;<br>
&gt;<br>
&gt; And a quick search on the bricks shows that the hot tier on the last replica<br>
&gt; pair is the offender.<br>
&gt;<br>
&gt; # for i in {0..5}; do ssh n$i &quot;hostname; ls<br>
&gt; /rhgs/coldbricks/1nvme-distrep<wbr>3x2/smf1 | wc -l; ls<br>
&gt; /rhgs/hotbricks/1nvme-distrep3<wbr>x2-hot/smf1 | wc -l&quot;; donerhosd0<br>
&gt; 0<br>
&gt; 0<br>
&gt; rhosd1<br>
&gt; 0<br>
&gt; 0<br>
&gt; rhosd2<br>
&gt; 0<br>
&gt; 0<br>
&gt; rhosd3<br>
&gt; 0<br>
&gt; 0<br>
&gt; rhosd4<br>
&gt; 0<br>
&gt; 1<br>
&gt; rhosd5<br>
&gt; 0<br>
&gt; 1<br>
&gt;<br>
&gt;<br>
&gt; (For the record, multiple runs of this reproducer show that it is<br>
&gt; consistently the hot tier that is to blame, but it is not always the same<br>
&gt; replica pair.)<br>
&gt;<br>
&gt;<br>
&gt; Can someone try recreating this scenario to see if the problem is consistent?<br>
&gt; Please reach out if you need me to provide any further details.<br>
&gt;<br>
&gt;<br>
&gt; Dustin Black, RHCA<br>
&gt; Senior Architect, Software-Defined Storage<br>
&gt; Red Hat, Inc.<br>
&gt; (o) <a href="tel:%2B1.212.510.4138" value="+12125104138" target="_blank">+1.212.510.4138</a> (m) <a href="tel:%2B1.215.821.7423" value="+12158217423" target="_blank">+1.215.821.7423</a><br>
&gt; <a href="mailto:dustin@redhat.com" target="_blank">dustin@redhat.com</a><br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Gluster-devel mailing list<br>
&gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a><br>
</blockquote></div></div>
</div></div></blockquote></div><br></div>