<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:28:18 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-16587] Make lfs migrate faster</title>
                <link>https://jira.whamcloud.com/browse/LU-16587</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Most of the time &lt;tt&gt;lfs migrate&lt;/tt&gt; uses a 1MB buffer (stripe size) to copy data. This is terribly slow. &lt;/p&gt;

&lt;p&gt;In my testing I see improved performance up to 64M buffers.&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;
[root@kjlmo4n00 16G]# lfs getstripe 16G.1
16G.1
lmm_stripe_count:  1
lmm_stripe_size:   1048576
lmm_pattern:       raid0
lmm_layout_gen:    11
lmm_stripe_offset: 1
lmm_pool:          flash
	obdidx		 objid		 objid		 group
	     1	        394422	      0x604b6	             0

[root@kjlmo4n00 16G]# time lfs migrate -S 1M -p flash 16G.1

real	0m25.341s
user	0m0.001s
sys	0m2.606s
[root@kjlmo4n00 16G]# time /root/tools/lfs_nzr migrate -S 1M -p flash 16G.1

real	0m6.526s
user	0m0.000s
sys	0m2.177s
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You can force lfs to use a bigger buffer by increasing stripe size and you can see similar improvements.&lt;/p&gt;</description>
                <environment></environment>
        <key id="74796">LU-16587</key>
            <summary>Make lfs migrate faster</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="nrutman">Nathan Rutman</assignee>
                                    <reporter username="nrutman">Nathan Rutman</reporter>
                        <labels>
                    </labels>
                <created>Wed, 22 Feb 2023 22:32:21 +0000</created>
                <updated>Wed, 2 Aug 2023 18:47:42 +0000</updated>
                            <resolved>Mon, 3 Apr 2023 21:45:09 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="363810" author="nrutman" created="Wed, 22 Feb 2023 23:00:26 +0000"  >&lt;p&gt;Sigh. Permission denied trying to upload to Gerritt; stashing patch here for now.&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;
diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c
index 999e6357a1..c2aa48d071 100644
--- a/lustre/utils/lfs.c
+++ b/lustre/utils/lfs.c
@@ -832,7 +832,7 @@ &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; migrate_copy_data(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; fd_src, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; fd_dst, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; (*check_file)(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;),
                             &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; stats_interval_sec, off_t file_size_bytes)
 {
        struct llapi_layout *layout;
-       size_t buf_size = 4 * 1024 * 1024;
+       size_t buf_size = 64 * 1024 * 1024;
        void *buf = NULL;
        off_t pos = 0;
        off_t data_end = 0;
@@ -850,8 +850,14 @@ &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; migrate_copy_data(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; fd_src, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; fd_dst, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; (*check_file)(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;),
                uint64_t stripe_size;
 
                rc = llapi_layout_stripe_size_get(layout, &amp;amp;stripe_size);
-               &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc == 0)
-                       buf_size = stripe_size;
+               &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc == 0) {
+                       &lt;span class=&quot;code-comment&quot;&gt;/* We like big bufs */&lt;/span&gt;
+                       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (stripe_size &amp;gt; buf_size)
+                               buf_size = stripe_size;
+                       &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
+                               &lt;span class=&quot;code-comment&quot;&gt;/* Trim to stripe_size multiple */&lt;/span&gt;
+                               buf_size -= buf_size % stripe_size;
+               }
 
                llapi_layout_free(layout);
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="363811" author="paf0186" created="Wed, 22 Feb 2023 23:03:43 +0000"  >&lt;p&gt;Nathan,&lt;/p&gt;

&lt;p&gt;Share your Gerrit error message here and we might be able to help?&lt;/p&gt;

&lt;p&gt;I sort of thought we&apos;d already done this, when we switched it to using direct I/O...&#160; Oops.&#160; DIO won&apos;t help at all if the buffer size is still small...&lt;/p&gt;</comment>
                            <comment id="363817" author="gerrit" created="Wed, 22 Feb 2023 23:25:18 +0000"  >&lt;p&gt;&quot;Nathan Rutman &amp;lt;nrutman@gmail.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50118&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50118&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16587&quot; title=&quot;Make lfs migrate faster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16587&quot;&gt;&lt;del&gt;LU-16587&lt;/del&gt;&lt;/a&gt; utils: give lfs migrate a larger buffer&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f93e048409c6ea03dc2afe48788cf0a1fd0bbbed&lt;/p&gt;</comment>
                            <comment id="363820" author="adilger" created="Thu, 23 Feb 2023 00:53:34 +0000"  >&lt;p&gt;Patrick, do we default to O_DIRECT now that your optimizations are landed?  Presumably that would only get faster over time, and be avoid thrashing the client page cache when migrating a lot of files. &lt;/p&gt;</comment>
                            <comment id="363821" author="paf0186" created="Thu, 23 Feb 2023 01:28:53 +0000"  >&lt;p&gt;Well, now you&apos;ve made me check...&lt;/p&gt;

&lt;p&gt;Yes - We default to direct I/O and let you turn it off with &apos;D&apos; for non-direct mode.&#160; And now that Nathan is increasing the buffer size, it will actually be faster.&#160; Oops.&lt;/p&gt;</comment>
                            <comment id="366765" author="gerrit" created="Tue, 21 Mar 2023 23:14:55 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50118/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50118/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16587&quot; title=&quot;Make lfs migrate faster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16587&quot;&gt;&lt;del&gt;LU-16587&lt;/del&gt;&lt;/a&gt; utils: give lfs migrate a larger buffer&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 23224e03dc30c89dd449de5a7fe99b0bd3aca495&lt;/p&gt;</comment>
                            <comment id="366813" author="pjones" created="Wed, 22 Mar 2023 01:55:00 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                            <comment id="373285" author="gerrit" created="Wed, 24 May 2023 09:44:11 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51115&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51115&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16587&quot; title=&quot;Make lfs migrate faster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16587&quot;&gt;&lt;del&gt;LU-16587&lt;/del&gt;&lt;/a&gt; utils: give lfs migrate a larger buffer&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 10a6cdb9359e4728b2541e70c07043ce10176f84&lt;/p&gt;</comment>
                            <comment id="373288" author="gerrit" created="Wed, 24 May 2023 10:01:30 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51116&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51116&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16587&quot; title=&quot;Make lfs migrate faster&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16587&quot;&gt;&lt;del&gt;LU-16587&lt;/del&gt;&lt;/a&gt; utils: give lfs migrate a larger buffer&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 7c8f2aee8e5c87b5415c6ac20497ee5687372835&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="76883">LU-16948</issuekey>
        </issuelink>
                            </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|i03etb:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>