<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
On Oct 7, 2021, at 13:19, Md Hasanur Rashid via lustre-discuss <<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a>> wrote:<br class="">
<div>
<blockquote type="cite" class=""><br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="gmail_default" style="font-family:verdana,sans-serif">Hello Everyone,<br class="">
</div>
<div class="gmail_quote">
<div dir="ltr" class="">
<div style="font-family:verdana,sans-serif" class=""><br class="">
I am running the Filebench benchmark in my Lustre cluster. I set the max_rpcs_in_flight value to be 1. Before executing and after executing, I verified that the value of max_rpcs_in_flight is indeed 1. However, when I check the rpc_stats, the stat shows a much
higher value for RPCs in flight. </div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
If by "much higher than 1" you mean "2", then yes it appears there are mostly (95%) 2 RPCs being processed concurrently on this OST.</div>
<div><br class="">
</div>
<div>That might happen if you have 2 clients/mountpoints writing to the same OST, it might be an off-by-one logic error allowing an extra RPC in flight, it might be intentional for some reason (e.g. to avoid deadlock, memory pressure, etc), or it might be accounting
error in the statistics (e.g. counting the next RPC to be sent before the first one is marked finished).</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="gmail_quote">
<div dir="ltr" class="">
<div style="font-family:verdana,sans-serif" class="">Following is the value shown for one OSC just for reference:</div>
<div style="font-family:verdana,sans-serif" class=""><br class="">
</div>
<div style="font-family:verdana,sans-serif" class=""><font size="1" class="">osc.hasanfs-OST0000-osc-ffff882fcf777000.rpc_stats=<br class="">
snapshot_time: 1632483604.967291 (secs.usecs)<br class="">
read RPCs in flight: 0<br class="">
write RPCs in flight: 0<br class="">
pending write pages: 0<br class="">
pending read pages: 0<br class="">
<br class="">
read write<br class="">
pages per rpc rpcs % cum % | rpcs % cum %<br class="">
1: 1 100 100 | 0 0 0<br class="">
2: 0 0 100 | 0 0 0<br class="">
4: 0 0 100 | 0 0 0<br class="">
8: 0 0 100 | 0 0 0<br class="">
16: 0 0 100 | 0 0 0<br class="">
32: 0 0 100 | 0 0 0<br class="">
64: 0 0 100 | 0 0 0<br class="">
128: 0 0 100 | 0 0 0<br class="">
256: 0 0 100 | 9508 100 100<br class="">
<br class="">
read write<br class="">
rpcs in flight rpcs % cum % | rpcs % cum %<br class="">
0: 0 0 0 | 0 0 0<br class="">
1: 1 100 100 | 10 0 0<br class="">
2: 0 0 100 | 9033 95 95<br class="">
3: 0 0 100 | 465 4 100<br class="">
<br class="">
read write<br class="">
offset rpcs % cum % | rpcs % cum %<br class="">
0: 1 100 100 | 725 7 7<br class="">
1: 0 0 100 | 0 0 7<br class="">
2: 0 0 100 | 0 0 7<br class="">
4: 0 0 100 | 0 0 7<br class="">
8: 0 0 100 | 0 0 7<br class="">
16: 0 0 100 | 0 0 7<br class="">
32: 0 0 100 | 0 0 7<br class="">
64: 0 0 100 | 0 0 7<br class="">
128: 0 0 100 | 0 0 7<br class="">
256: 0 0 100 | 718 7 15<br class="">
512: 0 0 100 | 1386 14 29<br class="">
1024: 0 0 100 | 2205 23 52<br class="">
2048: 0 0 100 | 1429 15 67<br class="">
4096: 0 0 100 | 1103 11 79<br class="">
8192: 0 0 100 | 1942 20 100</font><br class="">
</div>
<div style="font-family:verdana,sans-serif" class=""><br class="">
</div>
<div style="font-family:verdana,sans-serif" class="">Can anyone please explain to me why the RPCs in flight shown in the rpc_stats could be higher than the max_rpcs_in_flight?</div>
</div>
</div>
</div>
</div>
</blockquote>
<br class="">
</div>
<div>I do see a similar behavior with the statistics of my home system, which has the default osc.*.max_rpcs_in_flight=8, but shows many cases of 9 RPCs in flight in the statistics for both read and write, and in a few cases 10 or 11:</div>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>read<span class="Apple-tab-span" style="white-space:pre">
</span>write<br class="">
rpcs in flight rpcs % cum % | rpcs % cum %<br class="">
1:<span class="Apple-tab-span" style="white-space:pre"> </span> 121 2 2 | 27831 93 93<br class="">
2:<span class="Apple-tab-span" style="white-space:pre"> </span> 23 0 3 | 108 0 93<br class="">
3:<span class="Apple-tab-span" style="white-space:pre"> </span> 22 0 3 | 19 0 93<br class="">
4:<span class="Apple-tab-span" style="white-space:pre"> </span> 24 0 4 | 15 0 93<br class="">
5:<span class="Apple-tab-span" style="white-space:pre"> </span> 19 0 5 | 10 0 93<br class="">
6:<span class="Apple-tab-span" style="white-space:pre"> </span> 26 0 5 | 13 0 93<br class="">
7:<span class="Apple-tab-span" style="white-space:pre"> </span> 176 4 9 | 39 0 93<br class="">
8:<span class="Apple-tab-span" style="white-space:pre"> </span> 933 22 32 | 75 0 94<br class="">
9:<span class="Apple-tab-span" style="white-space:pre"> </span> 2802 67 99 | 1207 4 98</div>
10:<span class="Apple-tab-span" style="white-space:pre"> </span> 10 0 100 | 543 1 99<br class="">
11:<span class="Apple-tab-span" style="white-space:pre"> </span> 0 0 100 | 1 0 100
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">The good news is that Lustre is open source, so you can look into the lustre/osc code to see why this is happening. The limit is set by cli->cl_max_rpcs_in_flight, and the stats are accounted by cli->cl_write_rpc_hist.</div>
<div class=""><br class="">
</div>
<div class="">Out of curiosity, you don't say _why_ this off-by-one error is of interest? Definitely it seems like a bug that could be fixed, but it doesn't seem too critical to correct functionality.<br class="">
<div class=""><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="">
</div>
</div>
</body>
</html>