<div dir="ltr"><div dir="ltr">Hi Mohit,<div><br></div><div>Thank you for the update. More inline.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 1, 2019 at 11:45 PM Mohit Agrawal &lt;<a href="mailto:moagrawa@redhat.com">moagrawa@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi Vijay,</div><div><br></div><div>I have tried to execute smallfile tool on volume(12x3), i have not found any significant performance improvement</div><div>for smallfile operations, I have configured 4 clients and 8 thread to run operations. </div></div></div></blockquote><div><br></div><div>For measuring performance, did you measure both time taken and cpu consumed? Normally O(n) computations are cpu expensive and we might see better results with a hash table when a large number of objects ( a few thousands) are present in a single dictionary. If you haven&#39;t gathered cpu statistics, please also gather that for comparison.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div>I have generated statedump and found below data for dictionaries specific to gluster processes</div><div><br></div><div>brick</div><div>max-pairs-per-dict=50</div><div>total-pairs-used=192212171</div><div>total-dicts-used=24794349</div><div>average-pairs-per-dict=7</div><div><br></div><div><br></div><div>glusterd</div><div>max-pairs-per-dict=301</div><div>total-pairs-used=156677</div><div>total-dicts-used=30719</div><div>average-pairs-per-dict=5</div><div><br></div><div><br></div><div>fuse process</div><div>[dict]</div><div>max-pairs-per-dict=50</div><div>total-pairs-used=88669561</div><div>total-dicts-used=12360543</div><div>average-pairs-per-dict=7</div><div><br></div><div>It seems dictionary has max-pairs in case of glusterd and while no. of volumes are high the number can be increased.</div><div>I think there is no performance regression in case of brick and fuse. I have used hash_size 20 for the dictionary.</div><div>Let me know if you can provide some other test to validate the same.</div></div></div></blockquote><div><br></div><div>A few more items to try out:</div><div><br></div><div>1. Vary the number of buckets and test.</div><div>2. Create about 10000 volumes and measure performance for a volume info &lt;volname&gt; operation on some random volume? <br></div><div>3. Check the related patch from Facebook and see if we can incorporate any ideas from their patch.</div><div><br></div><div>Thanks,</div><div>Vijay</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div>Thanks,</div><div>Mohit Agrawal</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2019 at 2:29 PM Mohit Agrawal &lt;<a href="mailto:moagrawa@redhat.com" target="_blank">moagrawa@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Thanks, Amar for sharing the patch, I will test and share the result.<br></div></div><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2019 at 2:23 PM Amar Tumballi Suryanarayan &lt;<a href="mailto:atumball@redhat.com" target="_blank">atumball@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Shreyas/Kevin tried to address it some time back using <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1428049" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1428049</a> (<a href="https://review.gluster.org/16830" target="_blank">https://review.gluster.org/16830</a>)</div><div dir="ltr"><br></div><div>I vaguely remember the reason to keep the hash value 1 was done during the time when we had dictionary itself sent as on wire protocol, and in most other places, number of entries in dictionary was on an avg, 3. So, we felt, saving on a bit of memory for optimization was better at that time.</div><div><br></div><div>-Amar</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2019 at 12:02 PM Mohit Agrawal &lt;<a href="mailto:moagrawa@redhat.com" target="_blank">moagrawa@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">sure Vijay, I will try and update.<div><br></div><div>Regards,</div><div>Mohit Agrawal</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2019 at 11:44 AM Vijay Bellur &lt;<a href="mailto:vbellur@redhat.com" target="_blank">vbellur@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Mohit,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 29, 2019 at 7:15 AM Mohit Agrawal &lt;<a href="mailto:moagrawa@redhat.com" target="_blank">moagrawa@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi All,</div><div><br></div><div>  I was just looking at the code of dict, I have one query current dictionary logic.</div><div>  I am not able to understand why we use hash_size is 1 for a dictionary.IMO with the </div><div>  hash_size of 1 dictionary always work like a list, not a hash, for every lookup</div><div>  in dictionary complexity is O(n).</div><div><br></div><div>  Before optimizing the code I just want to know what was the exact reason to define</div><div>  hash_size is 1?</div></div></div></blockquote><div><br></div><div>This is a good question. I looked up the source in gluster&#39;s historic repo [1] and hash_size is 1 even there. So, this could have been the case since the first version of the dictionary code.</div><div><br></div><div>Would you be able to run some tests with a larger hash_size and share your observations?</div><div><br></div><div>Thanks,</div><div>Vijay</div><div><br></div><div>[1] <a href="https://github.com/gluster/historic/blob/master/libglusterfs/src/dict.c" target="_blank">https://github.com/gluster/historic/blob/master/libglusterfs/src/dict.c</a></div><div><br></div><div> </div></div></div></blockquote></div></blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>