<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:59:43 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-6381] replace global dq_state_lock/dq_list_lock with per-sb spinlocks and per-sb hash table.</title>
                <link>https://jira.whamcloud.com/browse/LU-6381</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;3/18/15, 11:01:00 AM&amp;#93;&lt;/span&gt; Andreas Dilger: The other thought I had was to replace the global dq_state_lock and dq_list_lock with per-sb spinlocks and a per-sb hash table, and use a separate lock for the dq_list_lock for the quota format calls&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;3/18/15, 11:02:07 AM&amp;#93;&lt;/span&gt; Andreas Dilger: that would at least avoid lock contention between MDTs&lt;/p&gt;</description>
                <environment></environment>
        <key id="29151">LU-6381</key>
            <summary>replace global dq_state_lock/dq_list_lock with per-sb spinlocks and per-sb hash table.</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</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="di.wang">Di Wang</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Mar 2015 18:15:40 +0000</created>
                <updated>Thu, 20 Jul 2017 03:20:46 +0000</updated>
                                            <version>Lustre 2.8.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="110024" author="simmonsja" created="Wed, 18 Mar 2015 18:17:28 +0000"  >&lt;p&gt;Will this be a special kernel patch needed or will it be at the lustre level?&lt;/p&gt;</comment>
                            <comment id="110029" author="di.wang" created="Wed, 18 Mar 2015 18:36:55 +0000"  >&lt;p&gt;I believe it will be changed in the kernel patch. &lt;/p&gt;</comment>
                            <comment id="110031" author="jlevi" created="Wed, 18 Mar 2015 18:45:20 +0000"  >&lt;p&gt;Niu,&lt;br/&gt;
Could you please take a look at this one?&lt;br/&gt;
Thank you!&lt;/p&gt;</comment>
                            <comment id="110032" author="adilger" created="Wed, 18 Mar 2015 19:04:41 +0000"  >&lt;p&gt;The scalability of dqget() is poor because it is holding two global spinlocks for code that is shared across multiple filesystems.  In &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6378&quot; title=&quot;Quota performance issue for 2.7 &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6378&quot;&gt;&lt;del&gt;LU-6378&lt;/del&gt;&lt;/a&gt; there was major contention seen on dqget() due to multiple MDTs on the same MDS on fast storage.&lt;/p&gt;

&lt;p&gt;Several things that could be done to improve this:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;replace the global &lt;tt&gt;dq_state_lock&lt;/tt&gt; with a per-sb lock&lt;/li&gt;
	&lt;li&gt;replace most of the global &lt;tt&gt;dq_list_lock&lt;/tt&gt; with a per-sb lock, and move the quota format handling under a different lock (I don&apos;t see how the quota formats relate to the hash buckets)&lt;/li&gt;
	&lt;li&gt;for better scaling between users there could be per-hash bucket locking, or a blockgroup_lock that at least scales well per core without the overhead of one lock per bucket.  This won&apos;t help if all the dqget() calls are for a single user, as with most benchmarks and normal uses.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="110033" author="adilger" created="Wed, 18 Mar 2015 19:05:43 +0000"  >&lt;p&gt;Please also post patches to the upstream &lt;tt&gt;linux-fsdevel&lt;/tt&gt; mailing list for review and feedback.&lt;/p&gt;</comment>
                            <comment id="110076" author="niu" created="Thu, 19 Mar 2015 10:39:47 +0000"  >&lt;blockquote&gt;
&lt;p&gt;The scalability of dqget() is poor because it is holding two global spinlocks for code that is shared across multiple filesystems. In &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6378&quot; title=&quot;Quota performance issue for 2.7 &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6378&quot;&gt;&lt;del&gt;LU-6378&lt;/del&gt;&lt;/a&gt; there was major contention seen on dqget() due to multiple MDTs on the same MDS on fast storage.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Andreas, do we have the performance &amp;amp; oprofile data for multiple MDTs on same MDS? I didn&apos;t find it in IU-4 (there is only numbers for multiple MDTs with quota disabled). It would be interesting if we can compare it with the data when quota disabled, and it&apos;s even better to do such comparison for multiple MDTs vs. single MDT (with quota enabled), so we can verify that if there is other bottlenecks besides these two global locks. I&apos;m not sure if it&apos;s proper to ask Nathan from IU to the test for us?&lt;/p&gt;

&lt;p&gt;An interesting observation is that unlink test wasn&apos;t affected by the quota global locks like mknod test. (unlink calls dqput() which will get the dq_list_lock), see the oprofile of unlink test (64 threads, 32 mnt, single MDT, Lustre 2.6):&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;CPU: Intel Architectural Perfmon, speed 3292.01 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
vma      samples  %        image name               app name                 symbol name
ffffffff811be860 831572    4.7333  vmlinux                  vmlinux                  __find_get_block_slow
0000000000032bd0 523313    2.9787  obdclass.ko              obdclass.ko              class_handle2object
ffffffff811701c0 328672    1.8708  vmlinux                  vmlinux                  kmem_cache_free
ffffffff811bf060 319529    1.8188  vmlinux                  vmlinux                  __find_get_block
000000000001f6c0 288861    1.6442  libcfs.ko                libcfs.ko                cfs_percpt_lock
0000000000031cd0 264236    1.5040  obdclass.ko              obdclass.ko              lprocfs_counter_add
0000000000050530 234202    1.3331  obdclass.ko              obdclass.ko              lu_context_key_get
ffffffff81058e10 209186    1.1907  vmlinux                  vmlinux                  task_rq_lock
ffffffff8128f490 165519    0.9421  vmlinux                  vmlinux                  memset
ffffffff811708f0 150077    0.8542  vmlinux                  vmlinux                  kfree
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The oprofile for mknod test looks like (64 threads, 32 mnt, Lustre 2.6):&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;CPU: Intel Architectural Perfmon, speed 3292.01 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
vma      samples  %        image name               app name                 symbol name
ffffffff811eb7f0 4744016  21.8990  vmlinux                  vmlinux                  dqput
ffffffff811eb180 3570862  16.4836  vmlinux                  vmlinux                  dquot_mark_dquot_dirty
ffffffff811ecb70 2488686  11.4881  vmlinux                  vmlinux                  dqget
ffffffff811be860 436818    2.0164  vmlinux                  vmlinux                  __find_get_block_slow
0000000000002630 383431    1.7700  ldiskfs.ko               ldiskfs.ko               ldiskfs_check_dir_entry
ffffffff811bf060 297226    1.3720  vmlinux                  vmlinux                  __find_get_block
0000000000026690 147702    0.6818  ldiskfs.ko               ldiskfs.ko               ldiskfs_dx_find_entry
0000000000050530 147313    0.6800  obdclass.ko              obdclass.ko              lu_context_key_get
000000000000a6a0 130593    0.6028  jbd2.ko                  jbd2.ko                  jbd2_journal_add_journal_head
ffffffff81058e10 121861    0.5625  vmlinux                  vmlinux                  task_rq_lock
0000000000031cd0 121519    0.5609  obdclass.ko              obdclass.ko              lprocfs_counter_add
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And there is actually another global quota lock &apos;dq_data_lock&apos;, which is used on each inode/block allocating/deleting, but I&apos;m not quite sure why the contention on this lock is negligible (as showed by oprofile data).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="29136">LU-6378</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|hzx8uf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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>