<html><body><div style="font-family: trebuchet ms,sans-serif; font-size: 11pt; color: #000000"><div>Hi Miguel,<br></div><div><br></div><div> <!--StartFragment--><div class="">>If I understood you correctly your goal was to limit the number of minutes each project can run. By associating each project to a slurm account with a nodecay QoS then you will have achieved your goal.</div><div class=""><br data-mce-bogus="1"></div><div class="">Here is what I what to do :<br></div><div class=""><br data-mce-bogus="1"></div><div class="">"All jobs submitted to an account regardless the QOS they use have to be constrained to a number of minutes set by the limit associated with that account (and not to QOS)." <br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><div class="">>Try a project with a very small limit and you will see that it won’t run</div><div class=""><br data-mce-bogus="1"></div><div class="">I already tested GrpTRESmins limit and confirms it works as expected.<br data-mce-bogus="1"></div><div class="">Then I saw the decay effect on GrpTRESRaw (what I thought first as the right metric to look at) and try to find out a way to fix it.<br><br data-mce-bogus="1"></div><div class=""> <!--StartFragment-->It's really very import for me to trust it, so I need a deterministic test to prove it.<!--EndFragment--> </div><div class=""><br data-mce-bogus="1"></div><div class="">I'm testing this GrpTRESMins limit with NoDecay set on QOS resetting all RawUsage (Account and QOS) to be sure it works as I expect. <br></div><div class="">I print the account GrpTRESRaw (in mn) at the end of my tests job to set a new limits with GrpTRESMins and see how it behaves.<br></div><div class=""><br data-mce-bogus="1"></div><div class=""> I'll get inform on the results. I hope it works.<!--EndFragment--> <br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><div class=""><br data-mce-bogus="1"></div><!--EndFragment--> </div><div data-marker="__SIG_PRE__"><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"> > <!--StartFragment-->You don’t have to add anything. </span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">>Each QoS will accumulate its respective usage, i.e, the usage of all users on that account. Users can even be on different accounts (projects) and charge the respective project with the parameter --account on </span></span><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">sbatch.<!--EndFragment--> </span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"></span></span><br></div><div>If SLURM does it for to manage limit I would also like to obtain the current RawUsage for an account. </div><div><strong>Do you know how to get it ?</strong><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"></span></span><br></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"> <!--StartFragment--></span></span></span><div class="">>The GrpTRESMins is always changed on the QoS with a command like:</div><div class="">><br class=""></div><div class="">>sacctmgr update qos where qos=... set GrpTRESMin=cpu=….</div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><!--EndFragment--> </span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">That's right if you want to set a limit to a QOS. </span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">But I dont know/think the same limit value will also apply to all other QOS, and if I apply the same limit to all QOS.</span></span></div><div><strong><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">Is my account limit the sum of all the QOS limit ?<br data-mce-bogus="1"></span></span></strong></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">Actualy I'm setting the limit to the Account using command:<br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div> <!--StartFragment--><code>sacctmgr modify account myaccount set grptresmins=cpu=60000 qos=...</code><!--EndFragment--> </div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">With this setting I saw the limit is set to the account and not to the QOS. <br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><em><strong>sacctmgr show QOS</strong></em>     command shows an empty field for GrpTRESMins on all QOS<br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">Thanks again form your help.<br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">I hope I'm close to get the answer to my issue.<br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;"><br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">Best,<br data-mce-bogus="1"></span></span></div><div><span style="color: #3333ff;" data-mce-style="color: #3333ff;"><span style="color: #000000;" data-mce-style="color: #000000;">Gérard </span><br></span><a href="http://www.cines.fr" target="_blank" rel="noopener" data-mce-href="http://www.cines.fr"></a><br></div></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Miguel Oliveira" <miguel.oliveira@uc.pt><br><b>À: </b>"Slurm-users" <slurm-users@lists.schedmd.com><br><b>Envoyé: </b>Mercredi 29 Juin 2022 01:28:58<br><b>Objet: </b>Re: [slurm-users] GrpTRESMins and GrpTRESRaw usage<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">Hi Gérard,<div class=""><br class=""></div><div class="">If I understood you correctly your goal was to limit the number of minutes each project can run. By associating each project to a slurm account with a nodecay QoS then you will have achieved your goal.</div><div class="">Try a project with a very small limit and you will see that it won’t run.</div><div class=""><br class=""></div><div class="">You don’t have to add anything. Each QoS will accumulate its respective usage, i.e, the usage of all users on that account. Users can even be on different accounts (projects) and charge the respective project with the parameter --account on sbatch.</div><div class="">The GrpTRESMins is always changed on the QoS with a command like:</div><div class=""><br class=""></div><div class="">sacctmgr update qos where qos=... set GrpTRESMin=cpu=….</div><div class=""><br class=""></div><div class="">Hope that makes sense!</div><div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">MAO</div><div class=""><div><br class=""><blockquote class=""><div class="">On 28 Jun 2022, at 18:30, <a href="mailto:gerard.gil@cines.fr" class="" target="_blank">gerard.gil@cines.fr</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="font-family: "trebuchet ms", sans-serif; font-size: 11pt;" class=""><div class="">Hi Miguel,<br class=""><br class="">OK, I did'nt know this command.<br class=""><br class="">I'm not sure to understand how it works regarding to my goal.<br class=""></div><div class="">I use the following command inspired by the command you gave me and I obtain a UsageRaw for each QOS. <br class=""></div><div class=""><br class=""></div><div class=""><span style="caret-color: rgb(0, 0, 0);" class="">scontrol -o show assoc_mgr</span> -accounts=myaccount Users=" "<br class=""></div><div class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Do I have to sumup all  QOS RawUsage  to obtain the RawUsage of myaccount with NoDecay ?</div><div class="">If I set GrpTRESMins for an Account and not for a QOS, does SLURM handle to sumpup these QOS RawUsage to control if the GrpTRESMins account limit is reach ?<br class=""></div><div class=""><br class=""></div><div class="">Thanks again for your precious help.<br class=""></div><div class=""><br class=""></div><div class=""><span style="color: #3333ff;" class=""><span style="" class="">Gérard </span><br class=""></span><a href="http://www.cines.fr/" target="_blank" class=""></a><br class=""></div></div><div class=""><br class=""></div><hr id="zwchr" class=""><div class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class=""><b class="">De: </b>"Miguel Oliveira" <<a href="mailto:miguel.oliveira@uc.pt" class="" target="_blank">miguel.oliveira@uc.pt</a>><br class=""><b class="">À: </b>"Slurm-users" <<a href="mailto:slurm-users@lists.schedmd.com" class="" target="_blank">slurm-users@lists.schedmd.com</a>><br class=""><b class="">Envoyé: </b>Mardi 28 Juin 2022 17:23:18<br class=""><b class="">Objet: </b>Re: [slurm-users] GrpTRESMins and GrpTRESRaw usage<br class=""></blockquote></div><div class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class="">Hi Gérard,<div class=""><br class=""></div><div class="">The way you are checking is against the association and as such it ought to be decreasing in order to be used by fair share appropriately.</div><div class="">The counter used that does not decrease is on the QoS, not the association. You can check that with:</div><div class=""><br class=""></div><div class=""><span style="caret-color: rgb(0, 0, 0);" class="">scontrol -o show assoc_mgr | grep "^QOS='+account+’</span><font class=""><span style="caret-color: rgb(0, 0, 0);" class="">”</span></font></div><div class=""><font class=""><span style="caret-color: rgb(0, 0, 0);" class=""><br class=""></span></font></div><div class=""><font class="">That ought to give you two numbers. The first is the limit, or N for not limit, and the second in parenthesis the usage.</font></div><div class=""><font class=""><br class=""></font></div><div class=""><font class="">Hope that helps.</font></div><div class=""><font class=""><br class=""></font></div><div class=""><font class="">Best,</font></div><div class=""><font class=""><br class=""></font></div><div class=""><font class="">Miguel Afonso Oliveira<br class=""></font><div class=""><br class=""><blockquote class=""><div class="">On 28 Jun 2022, at 08:58, <a href="mailto:gerard.gil@cines.fr" class="" target="_blank">gerard.gil@cines.fr</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="font-family: "trebuchet ms", sans-serif; font-size: 11pt;" class=""><div class="">Hi Miguel,<br class=""><br class=""><br class="">I modified my test configuration to evaluate the effect of NoDecay.<br class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><br class="">I modified all QOS adding <strong class="">NoDecay</strong> Flag.<br class=""><br class=""><br class="">toto@login1:~/TEST$ sacctmgr show QOS<br class="">      Name   Priority  GraceTime    Preempt   PreemptExemptTime PreemptMode                                    Flags UsageThres UsageFactor       GrpTRES   GrpTRESMins GrpTRESRunMin GrpJobs GrpSubmit     GrpWall       MaxTRES MaxTRESPerNode   MaxTRESMins     MaxWall     MaxTRESPU MaxJobsPU MaxSubmitPU     MaxTRESPA MaxJobsPA MaxSubmitPA       MinTRES <br class="">---------- ---------- ---------- ---------- ------------------- ----------- ---------------------------------------- ---------- ----------- ------------- ------------- ------------- ------- --------- ----------- ------------- -------------- ------------- ----------- ------------- --------- ----------- ------------- --------- ----------- ------------- <br class="">    normal          0   00:00:00                                    cluster                                  NoDecay               1.000000                                                                                                                                                                                                                      <br class="">interactif         10   00:00:00                                    cluster                                  NoDecay               1.000000       node=50                                                                 node=22                               1-00:00:00       node=50                                                                         <br class="">     petit          4   00:00:00                                    cluster                                  NoDecay               1.000000     node=1500                                                                 node=22                               1-00:00:00      node=300                                                                         <br class="">      gros          6   00:00:00                                    cluster                                  NoDecay               1.000000     node=2106                                                                node=700                               1-00:00:00      node=700                                                                         <br class="">     court          8   00:00:00                                    cluster                                  NoDecay               1.000000     node=1100                                                                node=100                                 02:00:00      node=300                                                                         <br class="">      long          4   00:00:00                                    cluster                                  NoDecay               1.000000      node=500                                                                node=200                               5-00:00:00      node=200                                                                         <br class="">   special         10   00:00:00                                    cluster                                  NoDecay               1.000000     node=2106                                                               node=2106                               5-00:00:00     node=2106                                                                         <br class="">   support         10   00:00:00                                    cluster                                  NoDecay               1.000000     node=2106                                                                node=700                               1-00:00:00     node=2106                                                                         <br class="">      visu         10   00:00:00                                    cluster                                  NoDecay               1.000000        node=4                                                                node=700                                 06:00:00        node=4                       <br class=""><br class=""><br class=""><br class="">I submitted a bunch of jobs to control the NoDecay efficiency and I noticed <strong class="">RawUsage</strong> as well as <strong class="">GrpTRESRaw</strong> <strong class="">cpu</strong> is still decreasing.<br class=""><br class=""><br class="">toto@login1:~/TEST$ sshare -A dci -u " " -o account,user,GrpTRESRaw%80,<strong class="">GrpTRESMins</strong>,RawUsage<br class="">             Account       User                                                                       <strong class="">GrpTRESRaw                    GrpTRESMins    RawUsage</strong><br class="">-------------------- ----------                            ----------------------------------------------------- ------------------------------ -----------<br class="">dci                                <strong class="">cpu=6932</strong>,mem=12998963,energy=0,node=216,billing=6932,fs/disk=0,vmem=0,pages=0                      cpu=17150      <strong class="">415966</strong><br class="">toto@login1:~/TEST$ sshare -A dci -u " " -o account,user,GrpTRESRaw%80,<strong class="">GrpTRESMins</strong>,<strong class="">RawUsage</strong><br class="">             Account       User                                                                       <strong class="">GrpTRESRaw                    GrpTRESMins    RawUsage</strong><br class="">-------------------- ----------                            ----------------------------------------------------- ------------------------------ -----------<br class="">dci                                <strong class="">cpu=6931</strong>,mem=12995835,energy=0,node=216,billing=6931,fs/disk=0,vmem=0,pages=0                      cpu=17150      <strong class="">415866</strong><br class="">toto@login1:~/TEST$ sshare -A dci -u " " -o account,user,GrpTRESRaw%80,GrpTRESMins,RawUsage<br class="">             Account       User                                                                       <strong class="">GrpTRESRaw                    GrpTRESMins    RawUsage</strong> <br class="">-------------------- ----------                            ----------------------------------------------------- ------------------------------ ----------- <br class="">dci                                <strong class="">cpu=6929</strong>,mem=12992708,energy=0,node=216,billing=6929,fs/disk=0,vmem=0,pages=0                      cpu=17150      <strong class="">415766</strong> <br class=""><br class=""><br class="">Something I forgot to do ?<br class=""><br class=""><br class="">Best,<br class="">Gérard<br class=""><br class=""></div><div class=""><div class=""><span style="color: #3333ff;" class=""><span style="" class="">Cordialement,</span></span></div><div class=""><span style="color: #3333ff;" class=""><span style="" class="">Gérard Gil</span><br class=""><br class="">Département Calcul Intensif</span><br class="">Centre Informatique National de l'Enseignement Superieur<br class="">950, rue de Saint Priest<br class="">34097 Montpellier CEDEX 5<br class="">FRANCE<br class=""><br class="">tel :  (334) 67 14 14 14<br class="">fax : (334) 67 52 37 63<br class="">web : <a href="http://www.cines.fr/" target="_blank" class="">http://www.cines.fr</a><br class=""></div></div><div class=""><br class=""></div><hr id="zwchr" class=""><div class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class=""><b class="">De: </b>"Gérard Gil" <<a href="mailto:gerard.gil@cines.fr" class="" target="_blank">gerard.gil@cines.fr</a>><br class=""><b class="">À: </b>"Slurm-users" <<a href="mailto:slurm-users@lists.schedmd.com" class="" target="_blank">slurm-users@lists.schedmd.com</a>><br class=""><b class="">Cc: </b>"slurm-users" <<a href="mailto:slurm-users@schedmd.com" class="" target="_blank">slurm-users@schedmd.com</a>><br class=""><b class="">Envoyé: </b>Vendredi 24 Juin 2022 14:52:12<br class=""><b class="">Objet: </b>Re: [slurm-users] GrpTRESMins and GrpTRESRaw usage<br class=""></blockquote></div><div class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class=""> Hi Miguel,<br class=""> <br class=""> Good !!<br class=""> <br class=""> I'll try this options on all existing QOS and see if everything works as<br class=""> expected.<br class=""> I'll inform you on the results.<br class=""> <br class=""> <br class=""> Thanks a lot<br class=""> <br class=""> Best,<br class=""> Gérard<br class=""> <br class=""> <br class=""> ----- Mail original -----<br class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class=""> De: "Miguel Oliveira" <<a href="mailto:miguel.oliveira@uc.pt" class="" target="_blank">miguel.oliveira@uc.pt</a>><br class=""> À: "Slurm-users" <<a href="mailto:slurm-users@lists.schedmd.com" class="" target="_blank">slurm-users@lists.schedmd.com</a>><br class=""> Cc: "slurm-users" <<a href="mailto:slurm-users@schedmd.com" class="" target="_blank">slurm-users@schedmd.com</a>><br class=""> Envoyé: Vendredi 24 Juin 2022 14:07:16<br class=""> Objet: Re: [slurm-users] GrpTRESMins and GrpTRESRaw usage</blockquote><br class=""> <br class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class=""> Hi Gérard,<br class=""> <br class=""> I believe so. All our accounts correspond to one project and all have an<br class=""> associated QoS with NoDecay and DenyOnLimit. This is enough to restrict usage<br class=""> on each individual project.<br class=""> You only need these flags on the QoS. The association will carry on as usual and<br class=""> fairshare will not be impacted.<br class=""> <br class=""> Hope that helps,<br class=""> <br class=""> Miguel Oliveira<br class=""> <br class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class=""> On 24 Jun 2022, at 12:56, <a href="mailto:gerard.gil@cines.fr" class="" target="_blank">gerard.gil@cines.fr</a> wrote:<br class=""> <br class=""> Hi Miguel,<br class=""> <br class=""><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt;" class=""> Why not? You can have multiple QoSs and you have other techniques to change<br class=""> priorities according to your policies.</blockquote><br class=""> <br class=""> Is this answer my question ?<br class=""> <br class=""> "If all configured QOS use NoDecay, we can take advantage of the FairShare<br class=""> priority with Decay and  all jobs GrpTRESRaw with NoDecay ?"<br class=""> <br class=""> Thanks<br class=""> <br class=""> Best,</blockquote></blockquote><br class=""> > > Gérard<br class=""><br class=""></blockquote></div></div></div></div></blockquote></div><br class=""></div><br class=""></blockquote></div></div></div></div></blockquote></div><br class=""></div><br></blockquote></div></div></body></html>