<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:31:32 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-16972] optimize e2fsck ea_refcount processing</title>
                <link>https://jira.whamcloud.com/browse/LU-16972</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Filesystems with a large number of external xattr blocks, such as MDTs with large PFL layouts that overflow the in-inode xattr space, cause a significant slowdown during pass1 inode processing because of inefficient management of the &lt;tt&gt;refcount_extra&lt;/tt&gt; list that stores the refcounts for shared external xattr blocks.&lt;/p&gt;

&lt;p&gt;The &lt;tt&gt;refcount_extra&lt;/tt&gt; structure is implemented as a linear array of &lt;tt&gt;ea_refcount_el&lt;/tt&gt; elements:&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;
struct ea_refcount_el { 
        &lt;span class=&quot;code-comment&quot;&gt;/* ea_key could either be an inode number or block number. */&lt;/span&gt;
        ea_key_t        ea_key;
        ea_value_t      ea_value;
}; 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;During element insertion, a binary search is used in the array to find the element, and if not found, the higher elements in the array are &lt;tt&gt;memmove()&lt;/tt&gt;&apos;d upward to make room for the new element in the list.  If the currently allocated array is full, then it is &lt;tt&gt;realloc()&lt;/tt&gt;&apos;d with 100 more elements, and the whole array is copied to the new memory.&lt;/p&gt;

&lt;p&gt;If there are a large number of shared xattr blocks then the array can grow very large and the processing of the linear array will be very inefficient and CPU intensive due to frequent large memory allocations and copies.&lt;/p&gt;</description>
                <environment>Exascaler version: 5.2.5</environment>
        <key id="77084">LU-16972</key>
            <summary>optimize e2fsck ea_refcount processing</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="dongyang">Dongyang Li</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>e2fsck</label>
                    </labels>
                <created>Thu, 20 Jul 2023 21:07:10 +0000</created>
                <updated>Wed, 9 Aug 2023 23:04:32 +0000</updated>
                            <resolved>Wed, 9 Aug 2023 23:04:32 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="379624" author="gerrit" created="Fri, 21 Jul 2023 05:47:05 +0000"  >&lt;p&gt;&quot;Li Dongyang &amp;lt;dongyangli@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51729&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51729&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16972&quot; title=&quot;optimize e2fsck ea_refcount processing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16972&quot;&gt;&lt;del&gt;LU-16972&lt;/del&gt;&lt;/a&gt; e2fsck: only add xattr block if refcount &amp;gt; 1&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: ca038661f5b332f4a0475eaae8bcec039b88b195&lt;/p&gt;</comment>
                            <comment id="379714" author="adilger" created="Fri, 21 Jul 2023 16:19:07 +0000"  >&lt;p&gt;I was wondering whether this code could use the &quot;icount&quot; structure used elsewhere in e2fsck (eg. duplicate block handling).  This is optimized for a count of 0/1 in a bitmap, and puts entries into an array only for count &amp;gt; 1.  The drawback is that it has to allocate a full bitmap of entries for all blocks counted, even though the usage would be very sparse. &lt;/p&gt;

&lt;p&gt;For an 10TiB MDT filesystem, the icount bitmap would be 2.5B bits, or 320MiB of RAM per icount. The current ea_refcount struct is 2x__u64=16 bytes per element, which means the break-even point would be 20M xattr blocks, which is quite high for most filesystems.&lt;/p&gt;

&lt;p&gt;I think the better alternative is to expand on what is in the current patch, namely that the block bitmap is used to track xattr blocks with count = 1 and then only add the ea_refcount for xattr blocks with refcount &amp;gt; 1.  The one complexity is whether this will catch xattr blocks that are duplicated with regular file blocks, but I think it would be handled correctly anyway. &lt;/p&gt;</comment>
                            <comment id="380123" author="gerrit" created="Wed, 26 Jul 2023 05:31:53 +0000"  >&lt;p&gt;&quot;Li Dongyang &amp;lt;dongyangli@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51763&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51763&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16972&quot; title=&quot;optimize e2fsck ea_refcount processing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16972&quot;&gt;&lt;del&gt;LU-16972&lt;/del&gt;&lt;/a&gt; e2fsck: fix merging ea_inode_refs&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fa29ce6fce78f90c691f5413393175b47ca5f566&lt;/p&gt;</comment>
                            <comment id="380828" author="gerrit" created="Tue, 1 Aug 2023 04:21:46 +0000"  >&lt;p&gt;&quot;Li Dongyang &amp;lt;dongyangli@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51827&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51827&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16972&quot; title=&quot;optimize e2fsck ea_refcount processing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16972&quot;&gt;&lt;del&gt;LU-16972&lt;/del&gt;&lt;/a&gt; tests: createmany sets xattr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: b2157c6920b54e63c3aff6eae85873118482f8eb&lt;/p&gt;</comment>
                            <comment id="381572" author="gerrit" created="Mon, 7 Aug 2023 14:07:21 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51763/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51763/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16972&quot; title=&quot;optimize e2fsck ea_refcount processing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16972&quot;&gt;&lt;del&gt;LU-16972&lt;/del&gt;&lt;/a&gt; e2fsck: fix merging ea_inode_refs&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 35ecc72a445b04f2a257bc31cbeb310d76420b89&lt;/p&gt;</comment>
                            <comment id="381573" author="gerrit" created="Mon, 7 Aug 2023 14:07:36 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51729/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51729/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16972&quot; title=&quot;optimize e2fsck ea_refcount processing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16972&quot;&gt;&lt;del&gt;LU-16972&lt;/del&gt;&lt;/a&gt; e2fsck: use rb-tree to track EA reference counts&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 165abd0095613b60fbf64d139b899ba4896a2d92&lt;/p&gt;</comment>
                            <comment id="381578" author="gerrit" created="Mon, 7 Aug 2023 14:20:46 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51885&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51885&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16972&quot; title=&quot;optimize e2fsck ea_refcount processing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16972&quot;&gt;&lt;del&gt;LU-16972&lt;/del&gt;&lt;/a&gt; build: update version to 1.47.0-wc4&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: ac0905b216ba46ffbce4dffa94c1576d06d00096&lt;/p&gt;</comment>
                            <comment id="381580" author="gerrit" created="Mon, 7 Aug 2023 14:28:45 +0000"  >&lt;p&gt;&quot;Andreas Dilger &amp;lt;adilger@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/tools/e2fsprogs/+/51885/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/tools/e2fsprogs/+/51885/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16972&quot; title=&quot;optimize e2fsck ea_refcount processing&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16972&quot;&gt;&lt;del&gt;LU-16972&lt;/del&gt;&lt;/a&gt; build: update version to 1.47.0-wc4&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: cc6a3d0d898cc06dc87780305f6427d6dec5e120&lt;/p&gt;</comment>
                            <comment id="381905" author="adilger" created="Wed, 9 Aug 2023 23:04:32 +0000"  >&lt;p&gt;Fix included in 1.47.0-wc4&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </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|i03r1b:</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>