<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:43:34 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-4533] rpc_stats histogram does not support max_rpcs_in_flight greater than 31</title>
                <link>https://jira.whamcloud.com/browse/LU-4533</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The &quot;rpcs in flight&quot; histogram which is displayed by reading the proc file /proc/fs/lustre/osc/*/rpc_stats does not show values higher than 31.  When max_rpcs_in_flight is set to a value greater than 31, we should see rows for &quot;rpcs in flight&quot; values greater than 31.  Instead, all rpcs which are sent when there are 31 or more rpcs in flight are accounted for in the 31st bucket of the histogram.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;                        read                    write
rpcs in flight        rpcs   % cum % |       rpcs   % cum %
0:                       0   0   0   |          0   0   0
1:                     504   5   5   |        621  30  30
2:                     330   3   8   |        405  20  51
3:                     337   3  12   |          1   0  51
4:                     349   3  16   |          1   0  51
5:                     338   3  19   |          1   0  51
6:                     325   3  23   |          1   0  51
7:                     327   3  26   |          1   0  51
8:                     324   3  30   |          1   0  51
9:                     307   3  33   |          1   0  51
10:                    306   3  36   |          1   0  51
11:                    306   3  40   |          1   0  51
12:                    301   3  43   |          1   0  51
13:                    291   3  46   |          1   0  51
14:                    283   3  49   |          1   0  51
15:                    278   2  52   |          2   0  51
16:                    276   2  55   |          1   0  51
17:                    270   2  58   |          1   0  51
18:                    270   2  61   |          1   0  52
19:                    266   2  63   |          1   0  52
20:                    265   2  66   |          1   0  52
21:                    262   2  69   |          2   0  52
22:                    263   2  72   |          4   0  52
23:                    262   2  75   |          3   0  52
24:                    263   2  77   |          1   0  52
25:                    262   2  80   |          2   0  52
26:                    261   2  83   |          1   0  52
27:                    260   2  86   |          1   0  52
28:                    259   2  89   |          3   0  52
29:                    256   2  91   |          2   0  53
30:                    256   2  94   |          1   0  53
31:                    512   5 100   |        939  46 100
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;According to the current version of the Lustre manual, the valid range for max_rpcs_in_flight is between 1 and 256.  Those values should be supported by this histogram.  The maximum value for max_rpcs_in_flight is determined by the value of this preprocessor macro:&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;#define OSC_MAX_RIF_MAX         256
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The size of the obd_histogram struct is determined by a preprocessor macro as well:&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-comment&quot;&gt;/* &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; we find more consumers &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; could be generalized */&lt;/span&gt;
#define OBD_HIST_MAX 32
struct obd_histogram {
        spinlock_t      oh_lock;
        unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;   oh_buckets[OBD_HIST_MAX];
};
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It looks like the histogram for recording the number of rpcs in flight has the greatest space requirements, so it would be a sufficient fix if we defined OBD_HIST_MAX to OSC_MAX_RIF_MAX.  However, this would increase the size of every obd_histogram by about a factor of 8.  I&apos;m not sure yet if this would be a significant increase.&lt;/p&gt;

&lt;p&gt;Another option would be to generalize the obd_histogram struct to use a flexible array for oh_buckets, but this would require a lot more work, and all obd_histogram structures would need to be dynamically allocated.&lt;/p&gt;</description>
                <environment></environment>
        <key id="22860">LU-4533</key>
            <summary>rpc_stats histogram does not support max_rpcs_in_flight greater than 31</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="haasken">Ryan Haasken</reporter>
                        <labels>
                            <label>easy</label>
                            <label>patch</label>
                    </labels>
                <created>Thu, 23 Jan 2014 23:33:29 +0000</created>
                <updated>Wed, 26 Jan 2022 18:00:04 +0000</updated>
                                            <version>Lustre 2.5.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="81402" author="haasken" created="Thu, 10 Apr 2014 22:44:15 +0000"  >&lt;p&gt;Here is a patch which just sets OBD_HIST_MAX to 256 to match the value of OSC_MAX_RIF_MAX.  This may not be the best solution because of the extra space used by every obd_histogram, but it fixes this bug.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#/c/9930/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/9930/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is an example of the output from reading /proc/fs/lustre/osc/*/rpc_stats when max_rpcs_in_flight=64:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;			read			write
rpcs in flight        rpcs   % cum % |       rpcs   % cum %
0:		         0   0   0   |          0   0   0
1:		         2 100 100   |       4592  25  25
2:		         0   0 100   |       3216  17  43
3:		         0   0 100   |       2390  13  56
4:		         0   0 100   |       1966  10  67
5:		         0   0 100   |       1663   9  76
6:		         0   0 100   |       1292   7  84
7:		         0   0 100   |        907   5  89
8:		         0   0 100   |        592   3  92
9:		         0   0 100   |        414   2  94
10:		         0   0 100   |        254   1  96
11:		         0   0 100   |        155   0  96
12:		         0   0 100   |        107   0  97
13:		         0   0 100   |         78   0  97
14:		         0   0 100   |         56   0  98
15:		         0   0 100   |         38   0  98
16:		         0   0 100   |         32   0  98
17:		         0   0 100   |         28   0  98
18:		         0   0 100   |         23   0  98
19:		         0   0 100   |         22   0  99
20:		         0   0 100   |         22   0  99
21:		         0   0 100   |         17   0  99
22:		         0   0 100   |         14   0  99
23:		         0   0 100   |         11   0  99
24:		         0   0 100   |         12   0  99
25:		         0   0 100   |         11   0  99
26:		         0   0 100   |         10   0  99
27:		         0   0 100   |         14   0  99
28:		         0   0 100   |         16   0  99
29:		         0   0 100   |          9   0  99
30:		         0   0 100   |          7   0  99
31:		         0   0 100   |          5   0  99
32:		         0   0 100   |          7   0  99
33:		         0   0 100   |          4   0  99
34:		         0   0 100   |          3   0  99
35:		         0   0 100   |          2   0  99
36:		         0   0 100   |          2   0  99
37:		         0   0 100   |          1   0  99
38:		         0   0 100   |          1   0  99
39:		         0   0 100   |          1   0 100
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As you can see, now the histogram goes past 31 and all values of rpcs_in_flight which occurred are reported properly in the histogram.&lt;/p&gt;</comment>
                            <comment id="81526" author="haasken" created="Mon, 14 Apr 2014 15:04:01 +0000"  >&lt;p&gt;I have abandoned this patch:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#/c/9930/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/9930/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Andreas Dilger says he has a patch in the works to do dynamic allocation of the obd_histogram buckets.  That will be a much better long-term solution.&lt;/p&gt;</comment>
                            <comment id="220496" author="gerrit" created="Thu, 8 Feb 2018 20:14:41 +0000"  >&lt;p&gt;Chris Horn (hornc@cray.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/31236&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/31236&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4533&quot; title=&quot;rpc_stats histogram does not support max_rpcs_in_flight greater than 31&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4533&quot;&gt;LU-4533&lt;/a&gt; lprocfs: Increase OBD_HIST_MAX to OSC_MAX_RIF_MAX&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 87f1cfd9f4fb9ed200c3bb14e65f5993faf82e0c&lt;/p&gt;</comment>
                            <comment id="220497" author="hornc" created="Thu, 8 Feb 2018 20:16:12 +0000"  >&lt;p&gt;I am re-upping this patch since we never saw the dynamic obd_histogram allocation that was the reason we abandoned this change originally.&lt;/p&gt;</comment>
                            <comment id="247976" author="cfaber" created="Wed, 29 May 2019 17:07:13 +0000"  >&lt;p&gt;Has there been any further progress here?&lt;/p&gt;</comment>
                            <comment id="286956" author="adilger" created="Tue, 8 Dec 2020 05:55:30 +0000"  >&lt;p&gt;Attached my &lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/attachment/36879/36879_old_prototype_dynamic_histogram.patch&quot; title=&quot;old_prototype_dynamic_histogram.patch attached to LU-4533&quot;&gt;old_prototype_dynamic_histogram.patch&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://jira.whamcloud.com/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt; .  It only allocates buckets on demand as they are used.  It is from the time of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7990&quot; title=&quot; Large bulk IO support&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7990&quot;&gt;&lt;del&gt;LU-7990&lt;/del&gt;&lt;/a&gt;, so about Lustre 2.9.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="14521">LU-1431</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="35844">LU-7990</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="53612">LU-11526</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="59320">LU-13601</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="36879" name="old_prototype_dynamic_histogram.patch" size="54917" author="adilger" created="Tue, 8 Dec 2020 05:46:58 +0000"/>
                    </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|hzwdi7:</customfieldvalue>

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