<div dir="ltr"><div><div><div>Hello All, hope all is well<br><br></div><div>On arch linux<br>Linux X 4.5.3-1-ARCH #1 SMP PREEMPT Sat May 7 20:43:57 CEST 2016 x86_64 GNU/Linux<br>local/libsystemd 229-3<br>    systemd client libraries<br>local/systemd 229-3<br>    system and service manager<br>local/systemd-sysvcompat 229-3 (base)<br>    sysvinit compat for systemd<br><br></div><div><br>using......<br>systemd-run --user --unit=foo --scope stress -c 1<br></div>I can see the scope created under my user slice<br></div>In top I can see the cpu pegged<br></div><div>I run<br></div><div>systemctl --user set-property foo.scope CPUQuota='5%'<br></div><div>or<br>systemctl set-property --user --runtime foo.scope CPUQuota='5%'<br></div><div>or couple other postitional variations<br></div><div>Also tried CPUShares as the controlling resource knob<br></div><div><br></div><div>However the process remains at 100% usage on top<br><br></div><div>Same multicore host<br>When
 I set resource properties on the fly on a vm in a scope running in the 
machine slice launched by libvirt, I do see cpu usage drop accordingly.<br></div><div>-Fired up an ubu vm ran stress and/or stress-ng -c1 inside the vm<br></div><div>-systemctl set-property 'machine-qemu\x2d68\x2dchhq\x2dvulr6isi02.scope' CPUQuota='5%'<br></div><div>-cpu usage in host drops to the expected amount<br><br><br>CentOS Linux release 7.2.1511 (Core)<br></div><div>On Centos 7u2 , I can't do exactly the same b/c<br></div><div>--no user option in systemd-run<br></div><div>--I am at the version where --slice is not working with setting a scope<br></div><div>So I run as a service <br>systemd-run --unit=foo  --uid=2020 --gid=2020 --slice=user-2020.slice stress -c 1<br>systemctl set-property foo CPUQuota='5%'<br><br></div><div>And I see stress hauled down to 5% usage<br></div><div><br></div><div>Am I doing something wrong for on the fly process corralling that is under the user slice?<br><br></div><div>I can provide more info if needed<br><br></div>thanks for any/all help </div>