<div dir="ltr">Understood. Thank you for the explanation. I'm not familiar with the cgroup rework being done so I don't have any ideas or opinion on that at the moment.<div><br></div><div>I was not aware of %c. It sounds like that might be a reasonable and simple workaround for now.</div>
<div><br></div><div>thanks</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 9:24 AM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, 09.12.13 10:31, Joe Miller (<a href="mailto:joeym@joeym.net">joeym@joeym.net</a>) wrote:<br>
<br>
> It appears that the .slice changed described here[1] removed all ability to<br>
> set low-level cgroups settings, is that correct?<br>
<br>
</div>Yes, that is correct. With the new code only attributes that systemd<br>
understands can be set, nothing else.<br>
<div class="im"><br>
> For cgroup attributes that systemd does not natively support<br>
> (example: cpu.cfs_period_us and cpu.cfs_quota_us) it was previously<br>
> possible to set these<br>
><br>
> 1. via unit files: ControlGroupAttribute=cpu.cfs_period_us 500<br>
> 2. or at runtime: systemctl --runtime set-cgroup-attr thing.service<br>
> cpu.cfs_period_us 500<br>
><br>
> I find the ability to set cgroup attrs not supported natively by systemd<br>
> useful, will this be added back to systemd or will systemd support all<br>
> cgroup attributes?<br>
<br>
</div>The problem with supporting these generic attributes is that they all<br>
have very different semantics how they can be reset and what writing to<br>
them actually does (some overwrite previous settings, others are lists<br>
that the new data you write is appended to, even others work more like a<br>
dictionary). Also, a big chunk of them are going to go away with Tejun's<br>
"sane behaviour" cgroup rework.<br>
<br>
We are happy to support more options high-level in systemd, however,<br>
there needs to be a clear perspective that they are options that are<br>
going to stay. The last time we discussed the cfs attributes in<br>
particular Tejun indicated they wouldn't stay the way they are.<br>
<br>
Now, if there at least is a clear perspective how they are going to look<br>
like in future in the kernel, then we can add support for them now<br>
already and add a bit of compat code that tries to translate them to the<br>
old cgroup kernel api, but I am not sure whether that is possible for<br>
the cfs attributes.<br>
<br>
A dirty work-around for the time being is to simply set these properties<br>
via a shell fragment. You can use the "%c" specifier which will tell you<br>
the cgroup path of a service, use that in some ExecStartPre= script that<br>
initializes these for you.<br>
<br>
If you'd like to see proper support for this stuff (which I certainly<br>
want), then we need to discuss with Tejun how we can expose these props<br>
already now.<br>
<span class="HOEnZb"><font color="#888888"><br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Red Hat<br>
</font></span></blockquote></div><br></div>