<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi Steve,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I was having a similar problem in the past months where the MDS servers would go OOM because of SlabUnreclaim. The root cause has not yet been found but we stopped seeing this the day we disabled the NRS TBF (QoS) for any LDLM service (just
 in case you have it enabled). Just in case you have it enabled. It would be good to check as well what’s being consumed in the slab cache. In our case it was mostly kernel objects and not ldlm.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="color:black">Diego</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">lustre-discuss <lustre-discuss-bounces@lists.lustre.org> on behalf of Steve Crusan <stevec@dug.com><br>
<b>Date: </b>Thursday, 2 January 2020 at 20:25<br>
<b>To: </b>"lustre-discuss@lists.lustre.org" <lustre-discuss@lists.lustre.org><br>
<b>Subject: </b>[lustre-discuss] LDLM locks not expiring/cancelling<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">Hi all, <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">We are running into a bizarre situation where we aren't having stale locks cancel themselves, and even worse, it seems as if ldlm.namespaces.*.lru_size is being ignored.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">For instance, I unmount our Lustre file systems on a client machine, then remount. Next, I'll run "lctl set_param ldlm.namespaces.*.lru_max_age=60s, lctl set_param ldlm.namespaces.*.lru_size=1024". This (I believe)
 theoretically would only allow 1024 ldlm locks per osc, and then I'd see a lot of lock cancels (via ldlm.namespaces.${ost}.pool.stats). We also should see cancels if the grant time > lru_max_age.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">We can trigger this simply by running 'find' on the root of our Lustre file system, and waiting for awhile. Eventually the clients SUnreclaim value bloats to 60-70GB (!!!), and each of our OSTs have 30-40k LRU
 locks (via lock_count). This is early in the process:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">"""<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">ldlm.namespaces.h5-OST003f-osc-ffff8802d8559000.lock_count=2090<br>
ldlm.namespaces.h5-OST0040-osc-ffff8802d8559000.lock_count=2127<br>
ldlm.namespaces.h5-OST0047-osc-ffff8802d8559000.lock_count=52<br>
ldlm.namespaces.h5-OST0048-osc-ffff8802d8559000.lock_count=1962<br>
ldlm.namespaces.h5-OST0049-osc-ffff8802d8559000.lock_count=1247<br>
ldlm.namespaces.h5-OST004a-osc-ffff8802d8559000.lock_count=1642<br>
ldlm.namespaces.h5-OST004b-osc-ffff8802d8559000.lock_count=1340<br>
ldlm.namespaces.h5-OST004c-osc-ffff8802d8559000.lock_count=1208<br>
ldlm.namespaces.h5-OST004d-osc-ffff8802d8559000.lock_count=1422<br>
ldlm.namespaces.h5-OST004e-osc-ffff8802d8559000.lock_count=1244<br>
ldlm.namespaces.h5-OST004f-osc-ffff8802d8559000.lock_count=1117<br>
ldlm.namespaces.h5-OST0050-osc-ffff8802d8559000.lock_count=1165<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">"""<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">But this will grow over time, and eventually this compute node gets evicted from the MDS (after 10 minutes of cancelling locks/hanging). The only way we have been able to reduce the slab usage is to drop caches
 and set LRU=clear...but the problem just comes back depending on the workload.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">We are running 2.10.3 client side, 2.10.1 server side. Have there been any fixes added into the codebase for 2.10 that we need to apply? This seems to be the closest to what we are experiencing:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><a href="https://jira.whamcloud.com/browse/LU-11518">https://jira.whamcloud.com/browse/LU-11518</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">    <br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">PS: I've checked other systems across our cluster, and some of them have as many as 50k locks per OST. I am kind of wondering if these locks are staying around much longer than the lru_max_age default (65 minutes),
 but I cannot prove that. Is there a good way to translate held locks to fids? I have been messing around with lctl set_param debug="XXX" and lctl set_param ldlm.namespaces.*.dump_namespace, but I don't feel like I'm getting *all* of the locks.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:36.0pt">~Steve <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>