<div dir="ltr">Hi Kotresh,<div><br></div><div>i have used below command to verify any open fd for file. </div><div><br></div><div>&quot;ls -l /proc/*/fd | grep filename&quot;.<br></div><div><br></div><div>as soon as write completes there no open fd&#39;s, if there is any alternate option. please let me know will also try that.</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Also, below is my scrub status in my test setup. number of skipped files slow reducing day by day. I think files are skipped due to bitrot signature process is not completed yet.</div><div><br></div><div>where can i see scrub skipped files?<br></div><div><br></div><div><br></div><div><div>Volume name : glsvol1</div><div><br></div><div>State of scrub: Active (Idle)</div><div><br></div><div>Scrub impact: normal</div><div><br></div><div>Scrub frequency: daily</div><div><br></div><div>Bitrot error log location: /var/log/glusterfs/bitd.log</div><div><br></div><div>Scrubber error log location: /var/log/glusterfs/scrub.log</div><div><br></div><div><br></div><div>=========================================================</div><div><br></div><div>Node: localhost</div><div><br></div><div>Number of Scrubbed files: 1644</div><div><br></div><div>Number of Skipped files: 1001</div><div><br></div><div>Last completed scrub time: 2016-09-20 11:59:58</div><div><br></div><div>Duration of last scrub (D:M:H:M:S): 0:0:39:26</div><div><br></div><div>Error count: 0</div><div><br></div><div><br></div><div>=========================================================</div><div><br></div><div>Node: 10.1.2.3</div><div><br></div><div>Number of Scrubbed files: 1644</div><div><br></div><div>Number of Skipped files: 1001</div><div><br></div><div>Last completed scrub time: 2016-09-20 10:50:00</div><div><br></div><div>Duration of last scrub (D:M:H:M:S): 0:0:38:17</div><div><br></div><div>Error count: 0</div><div><br></div><div><br></div><div>=========================================================</div><div><br></div><div>Node: 10.1.2.4</div><div><br></div><div>Number of Scrubbed files: 981</div><div><br></div><div>Number of Skipped files: 1664</div><div><br></div><div>Last completed scrub time: 2016-09-20 12:38:01</div><div><br></div><div>Duration of last scrub (D:M:H:M:S): 0:0:35:19</div><div><br></div><div>Error count: 0</div><div><br></div><div><br></div><div>=========================================================</div><div><br></div><div>Node: 10.1.2.1</div><div><br></div><div>Number of Scrubbed files: 1263</div><div><br></div><div>Number of Skipped files: 1382</div><div><br></div><div>Last completed scrub time: 2016-09-20 11:57:21</div><div><br></div><div>Duration of last scrub (D:M:H:M:S): 0:0:37:17</div><div><br></div><div>Error count: 0</div><div><br></div><div><br></div><div>=========================================================</div><div><br></div><div>Node: 10.1.2.2</div><div><br></div><div>Number of Scrubbed files: 1644</div><div><br></div><div>Number of Skipped files: 1001</div><div><br></div><div>Last completed scrub time: 2016-09-20 11:59:25</div><div><br></div><div>Duration of last scrub (D:M:H:M:S): 0:0:39:18</div><div><br></div><div>Error count: 0</div><div><br></div><div>=========================================================</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Thanks </div><div>Amudhan</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 21, 2016 at 11:45 AM, Kotresh Hiremath Ravishankar <span dir="ltr">&lt;<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@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">Hi Amudhan,<br>
<br>
I don&#39;t think it&#39;s the limitation with read data from the brick.<br>
To limit the usage of CPU, throttling is done using token bucket<br>
algorithm. The log message showed is related to it. But even then<br>
I think it should not take 12 minutes for check-sum calculation unless<br>
there is an fd open (might be internal). Could you please cross verify<br>
if there are any fd opened on that file by looking into /proc? I will<br>
also test it out in the mean time and get back to you.<br>
<span class="im HOEnZb"><br>
Thanks and Regards,<br>
Kotresh H R<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Amudhan P&quot; &lt;<a href="mailto:amudhan83@gmail.com">amudhan83@gmail.com</a>&gt;<br>
</span><div class="HOEnZb"><div class="h5">&gt; To: &quot;Kotresh Hiremath Ravishankar&quot; &lt;<a href="mailto:khiremat@redhat.com">khiremat@redhat.com</a>&gt;<br>
&gt; Cc: &quot;Gluster Users&quot; &lt;<a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a>&gt;<br>
&gt; Sent: Tuesday, September 20, 2016 3:19:28 PM<br>
&gt; Subject: Re: [Gluster-users] 3.8.3 Bitrot signature process<br>
&gt;<br>
&gt; Hi Kotresh,<br>
&gt;<br>
&gt; Please correct me if i am wrong, Once a file write completes and as soon as<br>
&gt; closes fds, bitrot waits for 120 seconds and starts hashing and update<br>
&gt; signature for the file in brick.<br>
&gt;<br>
&gt; But, what i am feeling that bitrot takes too much of time to complete<br>
&gt; hashing.<br>
&gt;<br>
&gt; below is test result i would like to share.<br>
&gt;<br>
&gt;<br>
&gt; writing data in below path using dd :<br>
&gt;<br>
&gt; /mnt/gluster/data/G (mount point)<br>
&gt; -rw-r--r-- 1 root root  10M Sep 20 12:19 test53-bs10M-c1.nul<br>
&gt; -rw-r--r-- 1 root root 100M Sep 20 12:19 test54-bs10M-c10.nul<br>
&gt;<br>
&gt; No any other write or read process is going on.<br>
&gt;<br>
&gt;<br>
&gt; Checking file data in one of the brick.<br>
&gt;<br>
&gt; -rw-r--r-- 2 root root 2.5M Sep 20 12:23 test53-bs10M-c1.nul<br>
&gt; -rw-r--r-- 2 root root  25M Sep 20 12:23 test54-bs10M-c10.nul<br>
&gt;<br>
&gt; file&#39;s stat and getfattr info from brick, after write process completed.<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ stat test53-bs10M-c1.nul<br>
&gt;   File: ‘test53-bs10M-c1.nul’<br>
&gt;   Size: 2621440         Blocks: 5120       IO Block: 4096   regular file<br>
&gt; Device: 821h/2081d      Inode: 536874168   Links: 2<br>
&gt; Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)<br>
&gt; Access: 2016-09-20 12:23:28.798886647 +0530<br>
&gt; Modify: 2016-09-20 12:23:28.994886646 +0530<br>
&gt; Change: 2016-09-20 12:23:28.998886646 +0530<br>
&gt;  Birth: -<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ stat test54-bs10M-c10.nul<br>
&gt;   File: ‘test54-bs10M-c10.nul’<br>
&gt;   Size: 26214400        Blocks: 51200      IO Block: 4096   regular file<br>
&gt; Device: 821h/2081d      Inode: 536874169   Links: 2<br>
&gt; Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)<br>
&gt; Access: 2016-09-20 12:23:42.902886624 +0530<br>
&gt; Modify: 2016-09-20 12:23:44.378886622 +0530<br>
&gt; Change: 2016-09-20 12:23:44.378886622 +0530<br>
&gt;  Birth: -<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ sudo getfattr -m. -e hex -d<br>
&gt; test53-bs10M-c1.nul<br>
&gt; # file: test53-bs10M-c1.nul<br>
&gt; trusted.bit-rot.version=<wbr>0x020000000000000057daa7b50002<wbr>e5b4<br>
&gt; trusted.ec.config=<wbr>0x0000080501000200<br>
&gt; trusted.ec.size=<wbr>0x0000000000a00000<br>
&gt; trusted.ec.version=<wbr>0x0000000000000050000000000000<wbr>0050<br>
&gt; trusted.gfid=<wbr>0xe2416bd1aae4403c88f44286273b<wbr>be99<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ sudo getfattr -m. -e hex -d<br>
&gt; test54-bs10M-c10.nul<br>
&gt; # file: test54-bs10M-c10.nul<br>
&gt; trusted.bit-rot.version=<wbr>0x020000000000000057daa7b50002<wbr>e5b4<br>
&gt; trusted.ec.config=<wbr>0x0000080501000200<br>
&gt; trusted.ec.size=<wbr>0x0000000006400000<br>
&gt; trusted.ec.version=<wbr>0x0000000000000320000000000000<wbr>0320<br>
&gt; trusted.gfid=<wbr>0x54e018dd8c5a4bd79e0317729d8a<wbr>57c5<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; file&#39;s stat and getfattr info from brick, after bitrot signature updated.<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ stat test53-bs10M-c1.nul<br>
&gt;   File: ‘test53-bs10M-c1.nul’<br>
&gt;   Size: 2621440         Blocks: 5120       IO Block: 4096   regular file<br>
&gt; Device: 821h/2081d      Inode: 536874168   Links: 2<br>
&gt; Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)<br>
&gt; Access: 2016-09-20 12:25:31.494886450 +0530<br>
&gt; Modify: 2016-09-20 12:23:28.994886646 +0530<br>
&gt; Change: 2016-09-20 12:27:00.994886307 +0530<br>
&gt;  Birth: -<br>
&gt;<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ sudo getfattr -m. -e hex -d<br>
&gt; test53-bs10M-c1.nul<br>
&gt; # file: test53-bs10M-c1.nul<br>
&gt; trusted.bit-rot.signature=<wbr>0x0102000000000000006de7493c5c<wbr>90f643357c268fbaaf461c1567e033<wbr>4e4948023ce17268403aa37a<br>
&gt; trusted.bit-rot.version=<wbr>0x020000000000000057daa7b50002<wbr>e5b4<br>
&gt; trusted.ec.config=<wbr>0x0000080501000200<br>
&gt; trusted.ec.size=<wbr>0x0000000000a00000<br>
&gt; trusted.ec.version=<wbr>0x0000000000000050000000000000<wbr>0050<br>
&gt; trusted.gfid=<wbr>0xe2416bd1aae4403c88f44286273b<wbr>be99<br>
&gt;<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ stat test54-bs10M-c10.nul<br>
&gt;   File: ‘test54-bs10M-c10.nul’<br>
&gt;   Size: 26214400        Blocks: 51200      IO Block: 4096   regular file<br>
&gt; Device: 821h/2081d      Inode: 536874169   Links: 2<br>
&gt; Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)<br>
&gt; Access: 2016-09-20 12:25:47.510886425 +0530<br>
&gt; Modify: 2016-09-20 12:23:44.378886622 +0530<br>
&gt; Change: 2016-09-20 12:38:05.954885243 +0530<br>
&gt;  Birth: -<br>
&gt;<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ sudo getfattr -m. -e hex -d<br>
&gt; test54-bs10M-c10.nul<br>
&gt; # file: test54-bs10M-c10.nul<br>
&gt; trusted.bit-rot.signature=<wbr>0x010200000000000000394c345f0b<wbr>0c63ee652627a62eed069244d35c4d<wbr>5134e4f07d4eabb51afda47e<br>
&gt; trusted.bit-rot.version=<wbr>0x020000000000000057daa7b50002<wbr>e5b4<br>
&gt; trusted.ec.config=<wbr>0x0000080501000200<br>
&gt; trusted.ec.size=<wbr>0x0000000006400000<br>
&gt; trusted.ec.version=<wbr>0x0000000000000320000000000000<wbr>0320<br>
&gt; trusted.gfid=<wbr>0x54e018dd8c5a4bd79e0317729d8a<wbr>57c5<br>
&gt;<br>
&gt;<br>
&gt; (Actual time taken for reading file from brick for md5sum)<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ time md5sum test53-bs10M-c1.nul<br>
&gt; 8354dcaa18a1ecb52d0895bf00888c<wbr>44  test53-bs10M-c1.nul<br>
&gt;<br>
&gt; real    0m0.045s<br>
&gt; user    0m0.007s<br>
&gt; sys     0m0.003s<br>
&gt;<br>
&gt; gfstst-node5:/media/disk2/<wbr>brick2/data/G$ time md5sum test54-bs10M-c10.nul<br>
&gt; bed3c0a4a1407f584989b4009e9ce3<wbr>3f  test54-bs10M-c10.nul<br>
&gt;<br>
&gt; real    0m0.166s<br>
&gt; user    0m0.062s<br>
&gt; sys     0m0.011s<br>
&gt;<br>
&gt; As you can see that &#39;test54-bs10M-c10.nul&#39; file took around 12 minutes to<br>
&gt; update bitort signature (pls refer stat output for the file).<br>
&gt;<br>
&gt; what would be the cause for such a slow read?. Any limitation in read data<br>
&gt; from brick?<br>
&gt;<br>
&gt; Also, i am seeing this line bitd.log, what does this mean?<br>
&gt; [bit-rot.c:1784:br_rate_limit_<wbr>signer] 0-glsvol1-bit-rot-0: [Rate Limit<br>
&gt; Info] &quot;tokens/sec (rate): 131072, maxlimit: 524288<br>
&gt;<br>
&gt;<br>
&gt; Thanks<br>
&gt; Amudhan P<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Sep 19, 2016 at 1:00 PM, Kotresh Hiremath Ravishankar &lt;<br>
&gt; <a href="mailto:khiremat@redhat.com">khiremat@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi Amudhan,<br>
&gt; &gt;<br>
&gt; &gt; Thanks for testing out the bitrot feature and sorry for the delayed<br>
&gt; &gt; response.<br>
&gt; &gt; Please find the answers inline.<br>
&gt; &gt;<br>
&gt; &gt; Thanks and Regards,<br>
&gt; &gt; Kotresh H R<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; From: &quot;Amudhan P&quot; &lt;<a href="mailto:amudhan83@gmail.com">amudhan83@gmail.com</a>&gt;<br>
&gt; &gt; &gt; To: &quot;Gluster Users&quot; &lt;<a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a>&gt;<br>
&gt; &gt; &gt; Sent: Friday, September 16, 2016 4:14:10 PM<br>
&gt; &gt; &gt; Subject: Re: [Gluster-users] 3.8.3 Bitrot signature process<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Can anyone reply to this mail.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Tue, Sep 13, 2016 at 12:49 PM, Amudhan P &lt; <a href="mailto:amudhan83@gmail.com">amudhan83@gmail.com</a> &gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I am testing bitrot feature in Gluster 3.8.3 with disperse EC volume 4+1.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; When i write single small file (&lt; 10MB) after 2 seconds i can see bitrot<br>
&gt; &gt; &gt; signature in bricks for the file, but when i write multiple files with<br>
&gt; &gt; &gt; different size ( &gt; 10MB) it takes long time (&gt; 24hrs) to see bitrot<br>
&gt; &gt; &gt; signature in all the files.<br>
&gt; &gt;<br>
&gt; &gt;    The default timeout for signing to happen is 120 seconds. So the<br>
&gt; &gt; signing will happen<br>
&gt; &gt;   120 secs after the last fd gets closed on that file. So if the file is<br>
&gt; &gt; being written<br>
&gt; &gt;   continuously, it will not be signed until 120 secs after it&#39;s last fd is<br>
&gt; &gt; closed.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; My questions are.<br>
&gt; &gt; &gt; 1. I have enabled scrub schedule as hourly and throttle as normal, does<br>
&gt; &gt; this<br>
&gt; &gt; &gt; make any impact in delaying bitrot signature?<br>
&gt; &gt;       No.<br>
&gt; &gt; &gt; 2. other than &quot;bitd.log&quot; where else i can watch current status of bitrot,<br>
&gt; &gt; &gt; like number of files added for signature and file status?<br>
&gt; &gt;      Signature will happen after 120 sec of last fd closure, as said above.<br>
&gt; &gt;      There is not status command which tracks the signature of the files.<br>
&gt; &gt;      But there is bitrot status command which tracks the number of files<br>
&gt; &gt;      scrubbed.<br>
&gt; &gt;<br>
&gt; &gt;      #gluster vol bitrot &lt;volname&gt; scrub status<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt; 3. where i can confirm that all the files in the brick are bitrot signed?<br>
&gt; &gt;<br>
&gt; &gt;      As said, signing information of all the files is not tracked.<br>
&gt; &gt;<br>
&gt; &gt; &gt; 4. is there any file read size limit in bitrot?<br>
&gt; &gt;<br>
&gt; &gt;      I didn&#39;t get. Could you please elaborate this ?<br>
&gt; &gt;<br>
&gt; &gt; &gt; 5. options for tuning bitrot for faster signing of files?<br>
&gt; &gt;<br>
&gt; &gt;      Bitrot feature is mainly to detect silent corruption (bitflips) of<br>
&gt; &gt; files due to long<br>
&gt; &gt;      term storage. Hence the default is 120 sec of last fd closure, the<br>
&gt; &gt; signing happens.<br>
&gt; &gt;      But there is a tune able which can change the default 120 sec but<br>
&gt; &gt; that&#39;s only for<br>
&gt; &gt;      testing purposes and we don&#39;t recommend it.<br>
&gt; &gt;<br>
&gt; &gt;       gluster vol get master features.expiry-time<br>
&gt; &gt;<br>
&gt; &gt;      For testing purposes, you can change this default and test.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks<br>
&gt; &gt; &gt; Amudhan<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; &gt; Gluster-users mailing list<br>
&gt; &gt; &gt; <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
&gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr>mailman/listinfo/gluster-users</a><br>
&gt; &gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>