<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Both methods should produce equivalent numbers. &nbsp;On my 2.14.0 system:
<div class=""><br class="">
</div>
<div class=""># ps auxww | grep mdt0<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594183&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:41 [mdt00_000]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594184&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:34 [mdt00_001]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594185&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:37 [mdt00_002]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594288&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:36 [mdt00_003]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594664&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:25 [mdt00_004]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594665&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:32 [mdt00_005]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594667&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:41 [mdt00_006]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594668&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:30 [mdt00_007]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594670&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:30 [mdt00_008]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594673&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:37 [mdt00_009]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594680&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:40 [mdt00_010]</div>
<div class=""># lctl get_param mds.MDS.mdt.threads_started<br class="">
mds.MDS.mdt.threads_started=11</div>
<div class=""><br class="">
</div>
<div class="">This is the service thread for most MDT RPC requests. &nbsp;Definitely increasing the number of &quot;mdt&quot; threads will improve metadata performance, as long as the underlying storage has IOPS for it. &nbsp;Having too many threads would use more memory, and
 in the rare case of an HDD-based MDT this might cause excessive seeking (that is obviously not a problem for SSD/NVMe MDTs).</div>
<div class=""><br class="">
<div># ps auxww | grep mdt_rdpg<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594186&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:02&nbsp;[mdt_rdpg00_000]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594187&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:02&nbsp;[mdt_rdpg00_001]<br class="">
root&nbsp; &nbsp; &nbsp;&nbsp;594663&nbsp;&nbsp;0.0&nbsp;&nbsp;0.0&nbsp; &nbsp; &nbsp;&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp;0 ?&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;I&nbsp; &nbsp;&nbsp;Sep09&nbsp;&nbsp;&nbsp;0:03&nbsp;[mdt_rdpg00_002]<br class="">
# lctl get_param mds.MDS.mdt_readpage.threads_started<br class="">
mds.MDS.mdt_readpage.threads_started=3</div>
<div><br class="">
</div>
<div>This service is for bulk readdir RPCs.</div>
<div><br class="">
</div>
<div>Cheers, Andreas</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Sep 22, 2021, at 15:16, Houkun Zhu &lt;<a href="mailto:diskun.zhu@gmail.com" class="">diskun.zhu@gmail.com</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">I\u2019m running lustre 2.12.7. The workload I was running was generated by fio, i.e., 6 process send I/O requests to the server. As I could see the non-trivial performance difference when I increase the parameter mds.MDS.mdt.threads_max, I assume
 it played a role in the performance. &nbsp;<br class="">
<br class="">
Thanks to the tip from Patrick, I just executed command ps axu|grep mdt and got the following result,<br class="">
<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;17654 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Aug07 &nbsp;&nbsp;0:13 [mdt00_006]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;18672 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Aug07 &nbsp;&nbsp;0:21 [mdt00_007]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;18902 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Aug07 &nbsp;&nbsp;0:11 [mdt00_008]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;23778 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:46 [mdt01_003]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;24032 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:14 [mdt_rdpg01_002]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25292 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:34 [mdt01_004]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25293 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:36 [mdt01_005]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25294 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:35 [mdt01_006]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25295 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:37 [mdt01_007]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25296 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:36 [mdt01_008]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25297 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:11 [mdt_rdpg01_003]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25298 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:38 [mdt01_009]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25299 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:38 [mdt01_010]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25301 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:11 [mdt_rdpg01_004]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25302 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:37 [mdt01_011]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25303 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:35 [mdt01_012]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25304 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:11 [mdt_rdpg01_005]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25370 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:11 [mdt_rdpg01_006]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;25375 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Sep21 &nbsp;&nbsp;0:09 [mdt_rdpg01_007]<br class="">
root &nbsp;&nbsp;&nbsp;&nbsp;29073 &nbsp;0.0 &nbsp;0.0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;0 ? &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S &nbsp;&nbsp;&nbsp;Aug26 &nbsp;&nbsp;0:00 [mdt_rdpg00_003]<br class="">
<br class="">
Could I verify my assumption by counting the number of process &nbsp;mdt\d\d_\d*?<br class="">
<br class="">
Best regards,<br class="">
Houkun<br class="">
<br class="">
<blockquote type="cite" class="">On 22. Sep 2021, at 21:21, Andreas Dilger &lt;<a href="mailto:adilger@whamcloud.com" class="">adilger@whamcloud.com</a>&gt; wrote:<br class="">
<br class="">
What version of Lustre are you running? &nbsp;I tested with 2.14.0 and observed that *.*.threads_started increased and (eventually) decreased as the service threads were being used. &nbsp;Note that the &quot;*.*.threads_max&quot; parameter is the *maximum* number of threads for
 a particular service (e.g. ost.OSS.ost_io.* is for bulk read/write IO operations, while ost.OSS.ost.* is for most other OST operations). &nbsp;New threads are only started if the number of incoming requests in the queue exceeds the number of currently running threads,
 so if the requests are processed quickly and/or there are not enough clients generating RPCs, then new threads will not be started beyond the number to manage the current workload.<br class="">
<br class="">
For example, I had reduced ost_io.threads_max=16 on my home filesystemyesterday to verify that the threads eventually stopped (that needed some ongoing IO workload until the higher-numbered threads processed a request and were the last thread running (see comment
 at ptlrpc_thread_should_stop() for details):<br class="">
<br class="">
# lctl get_param ost.OSS.ost_io.threads*<br class="">
ost.OSS.ost_io.threads_max=16<br class="">
ost.OSS.ost_io.threads_min=3<br class="">
ost.OSS.ost_io.threads_started=16<br class="">
<br class="">
When I increased threads_max=32 and ran a parallel IO workload on a client it increased the threads_started, but wasn't able to generate enough RPCs in flight to hit the maximum number of threads:<br class="">
<br class="">
# lctl get_param ost.OSS.ost_io.threads*<br class="">
ost.OSS.ost_io.threads_max=32<br class="">
ost.OSS.ost_io.threads_min=3<br class="">
ost.OSS.ost_io.threads_started=26<br class="">
<br class="">
On Sep 22, 2021, at 11:37, Houkun Zhu &lt;<a href="mailto:diskun.zhu@gmail.com" class="">diskun.zhu@gmail.com</a>&gt; wrote:<br class="">
<blockquote type="cite" class=""><br class="">
Hi Andres,<br class="">
<br class="">
Thanks a lot for your help. I actually record the parameter mds.MDS.mdt.threads_started. But its value never changes. However, I can observe the performance difference (i.e., throughput is increased tremendously) when I set a higher value of threads_max for
 mds. <br class="">
<br class="">
<br class="">
Best regards,<br class="">
Houkun<br class="">
<br class="">
<blockquote type="cite" class="">On 22. Sep 2021, at 07:21, Andreas Dilger &lt;<a href="mailto:adilger@whamcloud.com" class="">adilger@whamcloud.com</a>&gt; wrote:<br class="">
<br class="">
There is actually a parameter for this:<br class="">
<br class="">
$ lctl get_param ost.OSS.*.thread*<br class="">
ost.OSS.ost.threads_max=16<br class="">
ost.OSS.ost.threads_min=3<br class="">
ost.OSS.ost.threads_started=16<br class="">
ost.OSS.ost_create.threads_max=10<br class="">
ost.OSS.ost_create.threads_min=2<br class="">
ost.OSS.ost_create.threads_started=3<br class="">
ost.OSS.ost_io.threads_max=16<br class="">
ost.OSS.ost_io.threads_min=3<br class="">
ost.OSS.ost_io.threads_started=16<br class="">
ost.OSS.ost_out.threads_max=10<br class="">
ost.OSS.ost_out.threads_min=2<br class="">
ost.OSS.ost_out.threads_started=2<br class="">
ost.OSS.ost_seq.threads_max=10<br class="">
ost.OSS.ost_seq.threads_min=2<br class="">
ost.OSS.ost_seq.threads_started=2<br class="">
<br class="">
$ lctl get_param mds.MDS.*.thread*<br class="">
mds.MDS.mdt.threads_max=80<br class="">
mds.MDS.mdt.threads_min=3<br class="">
mds.MDS.mdt.threads_started=11<br class="">
mds.MDS.mdt_fld.threads_max=256<br class="">
mds.MDS.mdt_fld.threads_min=2<br class="">
mds.MDS.mdt_fld.threads_started=3<br class="">
mds.MDS.mdt_io.threads_max=80<br class="">
mds.MDS.mdt_io.threads_min=3<br class="">
mds.MDS.mdt_io.threads_started=4<br class="">
mds.MDS.mdt_out.threads_max=80<br class="">
mds.MDS.mdt_out.threads_min=2<br class="">
mds.MDS.mdt_out.threads_started=2<br class="">
mds.MDS.mdt_readpage.threads_max=56<br class="">
mds.MDS.mdt_readpage.threads_min=2<br class="">
mds.MDS.mdt_readpage.threads_started=3<br class="">
mds.MDS.mdt_seqm.threads_max=256<br class="">
mds.MDS.mdt_seqm.threads_min=2<br class="">
mds.MDS.mdt_seqm.threads_started=2<br class="">
mds.MDS.mdt_seqs.threads_max=256<br class="">
mds.MDS.mdt_seqs.threads_min=2<br class="">
mds.MDS.mdt_seqs.threads_started=2<br class="">
mds.MDS.mdt_setattr.threads_max=56<br class="">
mds.MDS.mdt_setattr.threads_min=2<br class="">
mds.MDS.mdt_setattr.threads_started=2<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On Sep 21, 2021, at 19:21, Patrick Farrell &lt;<a href="mailto:pfarrell@ddn.com" class="">pfarrell@ddn.com</a>&gt; wrote:<br class="">
<br class="">
\u201c<br class="">
<blockquote type="cite" class="">Though I can wait for the number threads to automatically decrease, I didn\u2019t find ways which can really indicate the current running threads. I\u2019ve tried thread_started (e.g., lctl get_param mds.MDS.mdt.threads_,started). But
 this param doesn\u2019t change. \u201d<br class="">
<br class="">
I don\u2019t think Lustre exposes a stat which gives *current* count of worker threads. &nbsp;I\u2019ve always used ps, grep, and wc -l to answer that question :)<br class="">
</blockquote>
From: lustre-discuss &lt;<a href="mailto:lustre-discuss-bounces@lists.lustre.org" class="">lustre-discuss-bounces@lists.lustre.org</a>&gt; on behalf of Andreas Dilger via lustre-discuss &lt;<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a>&gt;<br class="">
Sent: Tuesday, September 21, 2021 8:03 PM<br class="">
To: Houkun Zhu &lt;<a href="mailto:diskun.zhu@gmail.com" class="">diskun.zhu@gmail.com</a>&gt;<br class="">
Cc: <a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a> &lt;<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a>&gt;<br class="">
Subject: Re: [lustre-discuss] Question about max service threads<br class="">
<br class="">
Hello Houkun,<br class="">
There was patch <a href="https://review.whamcloud.com/34400" class="">https://review.whamcloud.com/34400</a> &quot;LU-947 ptlrpc: allow stopping threads above threads_max&quot; landed for the 2.13 release. You could apply this patch to your 2.12 release, or test with
 2.14.0. Note that this patch only lazily stops threads as they become idle, so there is no guarantee that they will all stop immediately when the parameter is changed. It may be some time and processed RPCs before the higher-numbered threads exit.
<br class="">
<br class="">
It might be possible to wake up all of the threads when the threads_max parameter is reduced, to have them check for this condition and exit. However, this is a very unlikely condition under normal usage.
<br class="">
<br class="">
I would recommend to test with increasing the thread count, rather than decreasing it...<br class="">
<br class="">
Cheers, Andreas<br class="">
<br class="">
<blockquote type="cite" class="">On Sep 20, 2021, at 02:29, Houkun Zhu via lustre-discuss &lt;<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a>&gt; wrote:<br class="">
<br class="">
\ufeff<br class="">
Hi guys,<br class="">
<br class="">
I\u2019m creating an automatic lustre performance tuning system. But I find it\u2019s hard to tune parameter regarding &nbsp;max service threads because it seems there is only guarantee of max threads when we increase the parameter. I\u2019ve found a similar discussion from 2011,
 is there any updates?<br class="">
<br class="">
Though I can wait for the number threads to automatically decrease, I didn\u2019t find ways which can really indicate the current running threads. I\u2019ve tried thread_started (e.g., lctl get_param mds.MDS.mdt.threads_,started). But this param doesn\u2019t change.
<br class="">
<br class="">
Looking forward to your help! Thank you in advance!<br class="">
<br class="">
Best regards,<br class="">
Houkun<br class="">
<br class="">
_______________________________________________<br class="">
lustre-discuss mailing list<br class="">
<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a><br class="">
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org<br class="">
</blockquote>
</blockquote>
<br class="">
Cheers, Andreas<br class="">
--<br class="">
Andreas Dilger<br class="">
Lustre Principal Architect<br class="">
Whamcloud<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</blockquote>
<br class="">
</blockquote>
<br class="">
Cheers, Andreas<br class="">
--<br class="">
Andreas Dilger<br class="">
Lustre Principal Architect<br class="">
Whamcloud<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</blockquote>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div>Cheers, Andreas</div>
<div>--</div>
<div>Andreas Dilger</div>
<div>Lustre&nbsp;Principal Architect</div>
<div>Whamcloud</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>