<div dir="ltr">Hi!<div><br></div><div>I think you should contact the Red Hat support with this question. Most of the distribution have CONFIG_RT_GROUP_SCHED disabled since in the general use cases people don't use it at all. RHEL is an exception here, since we keep that feature on, despite the recommendation of upstream, to cover some weird use-cases.</div><div><br></div><div>You also might want to look at <a href="https://access.redhat.com/articles/3696121">https://access.redhat.com/articles/3696121</a></div><div><br></div><div>Lukas</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">čt 7. 11. 2019 v 18:15 odesílatel Jon Sykes <<a href="mailto:jono.sykes15@gmail.com">jono.sykes15@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><font face="monospace">Hi,</font><div><font face="monospace"><br></font></div><div><font face="monospace">I'm using RHEL7 with systemd-219-62.el7_6.6.x86_64. I've recently hit an issue whereby a process started by a systemd service cannot assign itself realtime priority. Digging into the issue it seems that it is because systemd starts all services within a cpu/system.slice/<service_name> cgroup which by default wont be allocated any rt runtime through the cpu.rt_runtime_us value. </font></div><div><font face="monospace"><br></font></div><div><font face="monospace">I searched for info on how to solve this issue and came across <a href="https://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/" target="_blank">https://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/</a> unfortunately 2 of the 3 suggestions don't seem to be valid anymore:</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">- <code style="color:rgb(46,26,5)">/etc/systemd/system.conf</code><span style="color:rgb(0,0,0)"> and set </span><code style="color:rgb(46,26,5)">DefaultControllers=</code></font></div><div><code style="color:rgb(46,26,5)">This appears to have been removed as an option. When I tried this it had no effect</code></div><div><code style="color:rgb(46,26,5)"><br></code></div><div><code style="color:rgb(46,26,5)">- </code><font face="monospace"><span style="color:rgb(0,0,0)">edit your service file, and add </span><code style="color:rgb(46,26,5)">ControlGroup=cpu:/</code><span style="color:rgb(0,0,0)"> to its </span><code style="color:rgb(46,26,5)">[Service]</code><span style="color:rgb(0,0,0)"> section</span></font></div><div><font face="monospace"><span style="color:rgb(0,0,0)">This doesn't appear to be a valid option anymore: </span><a href="https://bugzilla.redhat.com/show_bug.cgi?id=999986" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=999986</a></font></div><div><font face="monospace"><br></font></div><div><font face="monospace">This only leaves the option of setting <span style="color:rgb(46,26,5)">cpu.rt_runtime_us value for the unit, however, there are a number of reasons why this isn't ideal and if the root cgroup config changes at any point then the value I choose isn't guaranteed to do what I had intended. (as pointed out in: </span><a href="https://lists.freedesktop.org/archives/systemd-devel/2015-March/029144.html" target="_blank">https://lists.freedesktop.org/archives/systemd-devel/2015-March/029144.html</a>)</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">Is there any other way to get my service to run within a cgroup that allows it to assign itself realtime priority? It would seem preferable to be able to just run the service in the root cgroup - is this possible through configuration?</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">Thanks</font></div><div><font face="monospace">Jon</font></div></div>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a></blockquote></div>