<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:58:22 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-6226] lu-822 have a bad hash function for a switching files</title>
                <link>https://jira.whamcloud.com/browse/LU-6226</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;after running sanity.sh i see very bad distribution for a fid&apos;s between OI files.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@rhel6-64 tmp&amp;#93;&lt;/span&gt;# debugfs -R &apos;ls -l&apos; lustre-mdt1 | grep oi.16 | grep -v 8192&lt;br/&gt;
debugfs 1.42.7.wc1 (12-Apr-2013)&lt;br/&gt;
     22  100644 (1)      0      0   876544  9-Feb-2015 21:11 oi.16.0&lt;br/&gt;
     39  100644 (1)      0      0   491520  9-Feb-2015 21:11 oi.16.17&lt;br/&gt;
     70  100644 (1)      0      0   28672  9-Feb-2015 21:11 oi.16.48&lt;br/&gt;
     71  100644 (1)      0      0   2424832  9-Feb-2015 21:11 oi.16.49&lt;br/&gt;
     72  100644 (1)      0      0   483328  9-Feb-2015 21:11 oi.16.50&lt;br/&gt;
     73  100644 (1)      0      0   389120  9-Feb-2015 21:11 oi.16.51&lt;/p&gt;

&lt;p&gt;all other files 8k byte size - so likely unused. &lt;/p&gt;

&lt;p&gt;I don&apos;t see any reason to have 64 OI files if 5 only used.&lt;/p&gt;

&lt;p&gt;Please fix a hash function to have better distribution.&lt;/p&gt;</description>
                <environment></environment>
        <key id="28622">LU-6226</key>
            <summary>lu-822 have a bad hash function for a switching files</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="shadow">Alexey Lyashkov</reporter>
                        <labels>
                    </labels>
                <created>Mon, 9 Feb 2015 18:23:58 +0000</created>
                <updated>Fri, 28 Aug 2015 18:13:39 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="106295" author="bzzz" created="Mon, 9 Feb 2015 18:27:23 +0000"  >&lt;p&gt;probably you should try to use many more clients?&lt;/p&gt;</comment>
                            <comment id="106296" author="shadow" created="Mon, 9 Feb 2015 18:31:00 +0000"  >&lt;p&gt;did you really think - it function have a dependence to number a clients?&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;+&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; inline struct osd_oi *
+osd_fid2oi(struct osd_device *osd, &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_fid *fid)
+{
+        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!fid_is_norm(fid))
+                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; NULL;
+
+        LASSERT(osd-&amp;gt;od_oi_table != NULL &amp;amp;&amp;amp; osd-&amp;gt;od_oi_count &amp;gt;= 1);
+        /* It can work even od_oi_count equals to 1 although it&apos;s unexpected,
+         * the only reason we set it to 1 is &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; performance measurement */
+        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; &amp;amp;osd-&amp;gt;od_oi_table[fid-&amp;gt;f_seq &amp;amp; (osd-&amp;gt;od_oi_count - 1)];
+}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;f_seq &amp;amp; osd-&amp;gt;od_oi_count  - will don&apos;t depend to number a clients as uses only lower bits.&lt;/p&gt;

&lt;p&gt;why don&apos;t use fid_hash() instead ?&lt;/p&gt;</comment>
                            <comment id="106299" author="bzzz" created="Mon, 9 Feb 2015 18:38:53 +0000"  >&lt;p&gt;f_seq depends on the number of the clients indirectly.&lt;/p&gt;</comment>
                            <comment id="106302" author="shadow" created="Mon, 9 Feb 2015 18:43:27 +0000"  >&lt;p&gt;and we use only lower bits of it ? &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; seq may be in range 0 .. 64 not more &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;/p&gt;

&lt;p&gt;you don&apos;t answer - why don&apos;t use fid_hash with better distribution ? if we have one line change and replace fid-&amp;gt;f_seq with fid_hash(fid) distribution will changed dramatically and all files will be used.&lt;/p&gt;</comment>
                            <comment id="106304" author="bzzz" created="Mon, 9 Feb 2015 18:48:55 +0000"  >&lt;p&gt;seq isn&apos;t limited at all. seq is per client, then every client uses upto 128K oids and gets a new sequences. imagine 10K clients mount and start to generate roughly similar workload, they all will be sending roughly same f_oid..&lt;/p&gt;</comment>
                            <comment id="106305" author="shadow" created="Mon, 9 Feb 2015 18:52:58 +0000"  >&lt;p&gt;Alex, &lt;/p&gt;

&lt;p&gt;please look carefully to function - seq &amp;amp; (fid_files_num -1) so only lower bits used - so seq limited to 1-64.&lt;/p&gt;</comment>
                            <comment id="106323" author="bzzz" created="Mon, 9 Feb 2015 19:25:54 +0000"  >&lt;p&gt;probably Liang can comment better. I&apos;d suggest to use more clients to see how the function behaves really. a single client is a very special case. and even in this case few OI files were used which is good.&lt;/p&gt;</comment>
                            <comment id="106399" author="liang" created="Tue, 10 Feb 2015 02:53:36 +0000"  >&lt;p&gt;yes, my intention is hashing different clients to different OI files, so we don&apos;t have all clients contend on all OIs all the time (drawback of fid_hash). Also, because we have 64 OI files, so seq &amp;amp; (osd-&amp;gt;od_oi_count - 1) should be between 0-63, is there any issue at here? &lt;/p&gt;</comment>
                            <comment id="107815" author="shadow" created="Tue, 24 Feb 2015 19:07:07 +0000"  >&lt;p&gt;Liang,&lt;/p&gt;

&lt;p&gt;distribution too bad in case few clients, as lower bits is mostly same for these clients (seq always allocated 128 fid&apos;s range), so only few files used after test. from disk perspective any parallel access add additional seeks so not have a differences is different clients work on same file or not.&lt;/p&gt;</comment>
                            <comment id="107880" author="liang" created="Wed, 25 Feb 2015 02:13:45 +0000"  >&lt;p&gt;I don&apos;t think performance bottleneck is going to be OI operations when there are very few clients, also, why do we bother to use all OI files parallelly for handful clients? There was a single OI for whole filesystem in 2.0/2.1, multiple OIs were added to improve aggregated performance for many clients, not for single client.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="12328">LU-822</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzx5zj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17426</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>