Re: [systemd-devel] Set cgroup attributes not supported by systemd - what do you recommend?
On Fri 24 Jan 2014 11:37:49 Lennart Poettering wrote: > On Thu, 23.01.14 11:55, Barry Scott (barry.sc...@onelan.co.uk) wrote: > > I am running systemd 208 on Fedora 20. > > > > There are 2 cpu cgroup attributes that I need to set to allow realtime for > > some daemons: cpu.rt_period_us and cpu.rt_runtime_us. > > > > For the memory cgroup I need to set memory.memsw.limit_in_bytes for one of > > my slices. > > > > Do you plan to add support for setting these attributes in a future > > systemd > > update? > > Yes, but don't hold your breath... > > Basically, we are currently only exposing attributes that Tejun (the > kernel cgroups maintainer) considers to be attributes that are going to > be available after the cgroup rework is finished. The memsw and RT stuff > does not really fall into that category, it is not clear that they will > be available after the kernel clean-up, and if they will, then not > necessarily with the same semantics. > Thanks we'll keep track of what Tejun is planning. Just for the record we don't care if cgroups manages the RT stuff all we need to be able to do is have the ability to call setrlimit() and sched_setscheduler(). We have a use case for memsw as a cgroup attribute, however we are open to arguments that its not needed. > > Until there is support I could have a .service run code to setup the > > attributes for the .slice's before services that need the changes. > > > > Would that be a suitable workaround until there is support in systemd? > > For now, I recommend adding a small ExecStartPre= script into the > respective services, that gets passed "%c" which resolves to the cgroup > path. Then, in that script simply echo the values you need into the > right attributes. I have the moral equivalent that I'm getting going now. > Lennart Barry ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Set cgroup attributes not supported by systemd - what do you recommend?
On Thu, 23.01.14 11:55, Barry Scott (barry.sc...@onelan.co.uk) wrote: > I am running systemd 208 on Fedora 20. > > There are 2 cpu cgroup attributes that I need to set to allow realtime for > some daemons: cpu.rt_period_us and cpu.rt_runtime_us. > > For the memory cgroup I need to set memory.memsw.limit_in_bytes for one of > my slices. > > Do you plan to add support for setting these attributes in a future systemd > update? Yes, but don't hold your breath... Basically, we are currently only exposing attributes that Tejun (the kernel cgroups maintainer) considers to be attributes that are going to be available after the cgroup rework is finished. The memsw and RT stuff does not really fall into that category, it is not clear that they will be available after the kernel clean-up, and if they will, then not necessarily with the same semantics. > Until there is support I could have a .service run code to setup the > attributes for the .slice's before services that need the changes. > > Would that be a suitable workaround until there is support in systemd? For now, I recommend adding a small ExecStartPre= script into the respective services, that gets passed "%c" which resolves to the cgroup path. Then, in that script simply echo the values you need into the right attributes. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Set cgroup attributes not supported by systemd - what do you recommend?
Our wiki page on the topic [1] was relevant before, but I'm pretty sure we dropped ControlGroupAttribute= from the options. Any answer to Barry's question here should probably involve an update to that wiki page, too. [1] http://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/ ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Set cgroup attributes not supported by systemd - what do you recommend?
I am running systemd 208 on Fedora 20. There are 2 cpu cgroup attributes that I need to set to allow realtime for some daemons: cpu.rt_period_us and cpu.rt_runtime_us. For the memory cgroup I need to set memory.memsw.limit_in_bytes for one of my slices. Do you plan to add support for setting these attributes in a future systemd update? Until there is support I could have a .service run code to setup the attributes for the .slice's before services that need the changes. Would that be a suitable workaround until there is support in systemd? Barry ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel