<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:25:59 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-9413] stat-&gt;st_blksize and glibc buffering</title>
                <link>https://jira.whamcloud.com/browse/LU-9413</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The issue has a detailed description in &lt;a href=&quot;https://bugzilla.lustre.org/show_bug.cgi?id=12739&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://bugzilla.lustre.org/show_bug.cgi?id=12739&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In short, for an open file Lustre returns st_blksize=4 MiB and glibc allocates a buffer of this size. Short random reads cause 4 MiB BRWs which ruin performance as compared to other distributed fs.&lt;/p&gt;

&lt;p&gt;It is often not possible or not practical to patch the program itself.&lt;/p&gt;

&lt;p&gt;The original ticket contains the assertion that it&apos;s a bug in glibc and should be fixed in glibc. While it was fixed in glibc 2.25 (&lt;a href=&quot;https://sourceware.org/bugzilla/show_bug.cgi?id=4099#c10&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://sourceware.org/bugzilla/show_bug.cgi?id=4099#c10&lt;/a&gt;), this glibc version won&apos;t be used in Linux distros with Lustre support any time soon.&lt;/p&gt;

&lt;p&gt;How about adding a temporary workaround for this issue similar to the one proposed by Aur&#233;lien Degr&#233;mont in bz #12739?&lt;/p&gt;</description>
                <environment></environment>
        <key id="45754">LU-9413</key>
            <summary>stat-&gt;st_blksize and glibc buffering</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="wc-triage">WC Triage</assignee>
                                    <reporter username="panda">Andrew Perepechko</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Thu, 27 Apr 2017 16:00:27 +0000</created>
                <updated>Wed, 24 May 2017 12:23:00 +0000</updated>
                            <resolved>Wed, 24 May 2017 12:23:00 +0000</resolved>
                                    <version>Lustre 2.9.0</version>
                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="193787" author="gerrit" created="Thu, 27 Apr 2017 16:04:08 +0000"  >&lt;p&gt;Andrew Perepechko (andrew.perepechko@seagate.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/26869&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/26869&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9413&quot; title=&quot;stat-&amp;gt;st_blksize and glibc buffering&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9413&quot;&gt;&lt;del&gt;LU-9413&lt;/del&gt;&lt;/a&gt; llite: llite.stat_blocksize param for fixed st_blksize&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 16964b5af530b59a3e7da73d62f3a8b1e0d8a4d0&lt;/p&gt;</comment>
                            <comment id="196411" author="adilger" created="Thu, 18 May 2017 23:18:57 +0000"  >&lt;p&gt;I&apos;m glad you used a config param instead of a module parameter in the updated patch.  However, as Aurelien said in Bugzilla, this parameter causes problems on the nodes that it is enabled on.  Have you done any benchmarks with this enabled?  I think iozone has a buffered IO mode with a range of blocksizes, with this feature enabled and disabled?&lt;/p&gt;

&lt;p&gt;As I also wrote in that patch:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In Lustre 1.4 it was possible to change the stat() blocksize of a file by changing the file&lt;br/&gt;
striping.  The returned value was stripe_count * stripe_size, or 2MB, whichever was less.&lt;/p&gt;

&lt;p&gt;This was removed because NFS Connectathon failed an sanity test due to changing &lt;tt&gt;st_blksize&lt;/tt&gt; if a file was &lt;tt&gt;mknod()&lt;/tt&gt; (using an artifical &lt;tt&gt;st_blksize&lt;/tt&gt; since the file has no layout) and then opened and it inherited a layout from the parent.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;That said, I think the Connectathon issue could be fixed in several ways (e.g. set the &lt;tt&gt;st_blksize&lt;/tt&gt; based on the filesystem default stripe size, rather than an arbitrary constant, or similar.&lt;/p&gt;

&lt;p&gt;Another option would be to use &lt;tt&gt;lfs ladvise&lt;/tt&gt; to allow setting the blocksize on the file (in memory on the client inode, or possibly also on disk for ZFS &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8951&quot; title=&quot;lctl conf_param not retaining *_cache_enable settings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8951&quot;&gt;&lt;del&gt;LU-8951&lt;/del&gt;&lt;/a&gt;).  This would allow tuning the &lt;tt&gt;st_blksize&lt;/tt&gt; value in a script before running the application, but it adds some complexity to run this on the file on every client for every time the application is running on a new file.  Conceivably, &lt;tt&gt;st_blksize&lt;/tt&gt; could be stored persistently in an xattr on the file (inherited from the parent?), but this is considerably more work.&lt;/p&gt;</comment>
                            <comment id="196853" author="gerrit" created="Wed, 24 May 2017 07:33:53 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/26869/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/26869/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9413&quot; title=&quot;stat-&amp;gt;st_blksize and glibc buffering&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9413&quot;&gt;&lt;del&gt;LU-9413&lt;/del&gt;&lt;/a&gt; llite: llite.stat_blocksize param for fixed st_blksize&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: f07576d3f82b50d74a858ccd60f7bdd0977a85a4&lt;/p&gt;</comment>
                            <comment id="196873" author="pjones" created="Wed, 24 May 2017 12:23:00 +0000"  >&lt;p&gt;Landed for 2.10&lt;/p&gt;</comment>
                    </comments>
                    <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_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>Performance</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzbd3:</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>