Re: [systemd-devel] systemd219 and Realtime priority

2019-11-08 Thread Jon Sykes
Thanks for the info Lukas; much appreciated. As a side note for this would
it be useful to denote which versions of systemd the page
https://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/ is
valid for? That page cost me a fair amount of time trying to apply the
solutions and trying to work out what I was doing wrong before I managed to
find the information about those options not being applicable anymore

Thanks
Jon

On Fri, 8 Nov 2019 at 10:24, Lukas Nykryn  wrote:

> Hi!
>
> 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.
>
> You also might want to look at https://access.redhat.com/articles/3696121
>
> Lukas
>
>
>
> čt 7. 11. 2019 v 18:15 odesílatel Jon Sykes 
> napsal:
>
>> Hi,
>>
>> 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/ cgroup
>> which by default wont be allocated any rt runtime through
>> the cpu.rt_runtime_us value.
>>
>> I searched for info on how to solve this issue and came across
>> https://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/ 
>> unfortunately
>> 2 of the 3 suggestions don't seem to be valid anymore:
>>
>> - /etc/systemd/system.conf and set DefaultControllers=
>> This appears to have been removed as an option. When I tried this it had
>> no effect
>>
>> - edit your service file, and add ControlGroup=cpu:/ to its [Service]
>>  section
>> This doesn't appear to be a valid option anymore:
>> https://bugzilla.redhat.com/show_bug.cgi?id=86
>>
>> This only leaves the option of setting 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:
>> https://lists.freedesktop.org/archives/systemd-devel/2015-March/029144.html
>> )
>>
>> 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?
>>
>> Thanks
>> Jon
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] systemd219 and Realtime priority

2019-11-07 Thread Jon Sykes
Hi,

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/ cgroup
which by default wont be allocated any rt runtime through
the cpu.rt_runtime_us value.

I searched for info on how to solve this issue and came across
https://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/
unfortunately
2 of the 3 suggestions don't seem to be valid anymore:

- /etc/systemd/system.conf and set DefaultControllers=
This appears to have been removed as an option. When I tried this it had no
effect

- edit your service file, and add ControlGroup=cpu:/ to its [Service]
 section
This doesn't appear to be a valid option anymore:
https://bugzilla.redhat.com/show_bug.cgi?id=86

This only leaves the option of setting 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:
https://lists.freedesktop.org/archives/systemd-devel/2015-March/029144.html)

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?

Thanks
Jon
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel