<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="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">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">dblack@redhat.com</a>&gt;<br>
&gt; To: <a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a><br>
&gt; Cc: &quot;Annette Clewett&quot; &lt;<a href="mailto:aclewett@redhat.com">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-<wbr>c258c1302607<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-<wbr>distrep3x2-hot<br>
&gt; Brick2: n4:/rhgs/hotbricks/1nvme-<wbr>distrep3x2-hot<br>
&gt; Brick3: n3:/rhgs/hotbricks/1nvme-<wbr>distrep3x2-hot<br>
&gt; Brick4: n2:/rhgs/hotbricks/1nvme-<wbr>distrep3x2-hot<br>
&gt; Brick5: n1:/rhgs/hotbricks/1nvme-<wbr>distrep3x2-hot<br>
&gt; Brick6: n0:/rhgs/hotbricks/1nvme-<wbr>distrep3x2-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-<wbr>distrep3x2<br>
&gt; Brick8: n1:/rhgs/coldbricks/1nvme-<wbr>distrep3x2<br>
&gt; Brick9: n2:/rhgs/coldbricks/1nvme-<wbr>distrep3x2<br>
&gt; Brick10: n3:/rhgs/coldbricks/1nvme-<wbr>distrep3x2<br>
&gt; Brick11: n4:/rhgs/coldbricks/1nvme-<wbr>distrep3x2<br>
&gt; Brick12: n5:/rhgs/coldbricks/1nvme-<wbr>distrep3x2<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(<wbr>params)<br>
&gt; File &quot;/root/bin/smallfile_cli.py&quot;, line 62, in run_multi_host_workload<br>
&gt; sync_files.create_top_dirs(<wbr>master_invoke, True)<br>
&gt; File &quot;/root/bin/sync_files.py&quot;, line 27, in create_top_dirs<br>
&gt; shutil.rmtree(master_invoke.<wbr>network_dir)<br>
&gt; File &quot;/usr/lib64/python2.7/shutil.<wbr>py&quot;, line 256, in rmtree<br>
&gt; onerror(os.rmdir, path, sys.exc_info())<br>
&gt; File &quot;/usr/lib64/python2.7/shutil.<wbr>py&quot;, line 254, in rmtree<br>
&gt; os.rmdir(path)<br>
&gt; OSError: [Errno 39] Directory not empty: &#39;/rhgs/client/1nvme-<wbr>distrep3x2/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-<wbr>distrep3x2/smf1 | wc -l; ls<br>
&gt; /rhgs/hotbricks/1nvme-<wbr>distrep3x2-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) +1.212.510.4138 (m) +1.215.821.7423<br>
&gt; <a href="mailto:dustin@redhat.com">dustin@redhat.com</a><br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Gluster-devel mailing list<br>
&gt; <a href="mailto:Gluster-devel@gluster.org">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/<wbr>mailman/listinfo/gluster-devel</a><br>
</blockquote></div></div>