<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:50:39 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-12216] lctl set_param debug_mb=xxx  set debug buffer to the wrong size</title>
                <link>https://jira.whamcloud.com/browse/LU-12216</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;lctl set_param debug_mb was always in MB. But in 2.10.x its wrong.&lt;/p&gt;

&lt;p&gt; lctl get_param debug_mb&lt;br/&gt;
debug_mb=4801&lt;/p&gt;

&lt;p&gt;Results in log file that is 474MB&lt;br/&gt;
And you can set values like this.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;lctl set_param debug_mb=50000&lt;br/&gt;
debug_mb=50000&lt;/li&gt;
	&lt;li&gt;lctl get_param debug_mb&lt;br/&gt;
debug_mb=49919&lt;br/&gt;
I think in the past 4GB was the limit.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="55468">LU-12216</key>
            <summary>lctl set_param debug_mb=xxx  set debug buffer to the wrong size</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="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="6">Not a Bug</resolution>
                                        <assignee username="pfarrell">Patrick Farrell</assignee>
                                    <reporter username="mhanafi">Mahmoud Hanafi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 23 Apr 2019 03:01:11 +0000</created>
                <updated>Tue, 23 Apr 2019 19:30:00 +0000</updated>
                            <resolved>Tue, 23 Apr 2019 19:30:00 +0000</resolved>
                                    <version>Lustre 2.10.6</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="246206" author="pfarrell" created="Tue, 23 Apr 2019 14:35:19 +0000"  >&lt;p&gt;Mahmoud,&lt;/p&gt;

&lt;p&gt;There has never been a fixed upper limit on how large debug_mb can be set.&#160; The behavior you&apos;re seeing is intended.&lt;/p&gt;

&lt;p&gt;Additionally, the debug_mb value is the &lt;b&gt;total&lt;/b&gt; buffer size across all CPUs (&apos;CPU&apos; here is defined as &quot;thing a process can be scheduled on, visible in cat /proc/cpuinfo&quot;), the actual buffer space is evenly divided among CPUs.&lt;/p&gt;

&lt;p&gt;So if you have a 4801 MiB debug buffer and 16 CPUs, each CPU has ~300 MiB of debug buffer.&#160; This means that if you have a single threaded workload (like a single process reading or writing a file), it will fill the 300 MiB and then begin to wrap around.&#160; Because Lustre has various network daemons, you will see some activity on other CPUs, so you will never get debug messages from just one CPU.&lt;/p&gt;

&lt;p&gt;So this means that you will never get &lt;span class=&quot;error&quot;&gt;&amp;#91;with these settings and 16 CPU cores&amp;#93;&lt;/span&gt;&#160;more than 300 MiB of log (at one time) from a given CPU.&lt;/p&gt;



&lt;p&gt;I am assuming when you say you have a 474 MiB debug log, you mean that&apos;s the largest log you get when recording a particular activity, and you expect more.&#160; (it is also possible that you are recording everything, if you have a time limited process).&lt;/p&gt;

&lt;p&gt;If you look at a Lustre debug log line:&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;00000100:00000001:3.0:1555092720.263653:0:6377:0:(client.c:701:ptlrpc_request_bufs_pack()) Process entered &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The third field (3.0 here) reflects the CPU in use.&#160; (3 is the CPU, 0 reflects whether or not you&apos;re in an interrupt context - it will mostly be 0).&lt;/p&gt;


&lt;p&gt;But, assuming you are running out of debug buffer:&lt;br/&gt;
If you look at your 474 MiB debug log, you will find the majority of your messages are from just a few CPUs, maybe just one.&lt;/p&gt;

&lt;p&gt;All of this is expected.&#160; If you need a larger per CPU buffer, the solution is simply to set an extremely large debug_mb.&#160; debug_mb is not allocated until it is used, and anything that was used is freed when you set it back to a lower value, so setting it to enormous values for a short time to capture a specific event is OK.&#160; (Do not leave it at those large values or you will be wasting memory.&#160; This is purely a temporary thing for gathering logs.)&lt;/p&gt;</comment>
                            <comment id="246220" author="mhanafi" created="Tue, 23 Apr 2019 16:17:47 +0000"  >&lt;p&gt;In the past the upper limit was like 4GB. At least in &amp;lt;2.7.x&lt;/p&gt;</comment>
                            <comment id="246223" author="pfarrell" created="Tue, 23 Apr 2019 16:31:08 +0000"  >&lt;p&gt;Mahmoud,&lt;/p&gt;

&lt;p&gt;Perhaps you had nodes with a small memory footprint.&#160; The limit for debug_mb has been 80% of memory since some time before Lustre 2.0 was released.&lt;/p&gt;

&lt;p&gt;In any case, the behavior here is all as intended - Do you have any further questions?&lt;/p&gt;</comment>
                            <comment id="246236" author="mhanafi" created="Tue, 23 Apr 2019 19:02:06 +0000"  >&lt;p&gt;no, thank you&lt;/p&gt;</comment>
                            <comment id="246238" author="pfarrell" created="Tue, 23 Apr 2019 19:30:00 +0000"  >&lt;p&gt;Thanks, Mahmoud!&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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i00f87:</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>