<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Andreas. <br>
<br>
Thank you very much, that helps a lot. <br>
Sorry for the confusion, I primarily meant the client. The servers
rarely have to compete with anything else for CPU resources I guess.<br>
<br>
<blockquote type="cite"
cite="mid:ABC8B857-9356-4F6F-B9F2-3E8AC2A21EF5@whamcloud.com">
<div>
The mechanism to start new threads is relatively simple. Before
a server thread is processing a new request, if it is the last
thread available, and not the maximum number of threads are
running, then it will try to launch a new thread; repeat as
needed. So the thread count will depend on the client RPC load
and the RPC processing rate and lock contention on whatever
resources those RPCs are accessing.</div>
</blockquote>
And what conditions are on the client? Are the threads then driven
by the workload of the application somehow?<br>
<br>
Imagine an edge case where all but one core are pinned and at 100%
constant load and one is dumping RAM to Lustre. Presumably, the
available core will be taken. But will Lustre or the kernel then
spawn additional threads and try to somehow interleave them with
those of the application, or will it simply handle it with 1-2
threads on the available core (assume single stream to single OST)?
In any case, I suppose the I/O transfer would suffer under the
resource shortage, but my question would be to what extent it would
(try to) hinder the application. For latency-critical applications,
such small delays can already lead to idle waves. And surely, the
Lustre threads are usually not CPU-hungr, but they will when it
comes to encryption and compression. <br>
<br class="">
<blockquote type="cite"
cite="mid:ABC8B857-9356-4F6F-B9F2-3E8AC2A21EF5@whamcloud.com">
<div>
<blockquote type="cite" class="">
<div class="">
<div class=""><font class="" face="monospace">With <code
class="">max_</code><code class="">rpcs_in_flight = 1</code>,
multiple cores are loaded, presumably alternately, but
the statistics are too inaccurate to capture this. The
distribution of threads to cores is regulated by the
Linux kernel, right? Does anyone have experience with
what happens when all CPUs are under full load with the
application or something else?
<br class="">
</font></div>
</div>
</blockquote>
<div><br class="">
</div>
Note that {osc,mdc}.*.max_rpcs_in_flight is a *per target*
parameter, so a single client can still have tens or hundreds of
RPCs in flight to different servers. The client will send many
RPC types directly from the process context, since they are
waiting on the result anyway. For asynchronous bulk RPCs, the
ptlrpcd thread will try to process the bulk IO on the same CPT
(= Lustre CPU Partition Table, roughly aligned to NUMA nodes) as
the userspace application was running when the request was
created. This minimizes the cross-NUMA traffic when accessing
pages for bulk RPCs, so long as those cores are not busy with
userspace tasks. Otherwise, the ptlrpcd thread on another CPT
will steal RPCs from the queues. </div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div class=""><font class="" face="monospace">Do the Lustre
threads suffer? Is there a prioritization of the Lustre
threads over other tasks?<br class="">
</font></div>
</div>
</blockquote>
<div><br class="">
</div>
Are you asking about the client or the server? Many of the
client RPCs are generated by the client threads, but for the
running ptlrpcd threads do not have a higher priority than
client application threads. If the application threads are
running on some cores, but other cores are idle, then the
ptlrpcd threads on other cores will try to process the RPCs to
allow the application threads to continue running there.
Otherwise, if all cores are busy (as is typical for HPC
applications) then they will be scheduled by the kernel as
needed.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div class=""><font class="" face="monospace">Are there
readily available statistics or tools for this scenario?<br
class="">
</font></div>
</div>
</blockquote>
<br class="">
</div>
<div>What statistics are you looking for? There are
"{osc,mdc}.*.stats" and "{osc,mdc}.*rpc_stats" that have
aggregate information about RPC counts and latency.</div>
</blockquote>
Oh, right, these tell a lot. Isn't there also something to log the
utilization
and location of these threads? Otherwise, I'll continue trying with
perf, which seems to be more complex with kernel threads.<br>
<br>
Thanks for the explanations!<br>
<br>
Anna<br>
<blockquote type="cite"
cite="mid:ABC8B857-9356-4F6F-B9F2-3E8AC2A21EF5@whamcloud.com">
<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 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="">
</blockquote>
<br>
</body>
</html>