<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
<div><br></div>
<div id="ydpb395d7efyahoo_quoted_6260988518" class="ydpb395d7efyahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">On Wednesday, May 9, 2018, 10:02:14 PM GMT+2, Simon McVittie <smcv@collabora.com> wrote:
<br clear="none"><div><br clear="none">>I don't think this is supported. systemd behaves as though cgroups v2 is<br clear="none">>in use (single unified cgroup hierarchy) even if you are currently using<br clear="none">>cgroups v1 (one parallel hierarchy per controller).<br clear="none"><br><div><div><div><br><span>According to this<br clear="none"><div><div><br clear="none"><a shape="rect" href="https://github.com/systemd/systemd/issues/7624" rel="nofollow" target="_blank">https://github.com/systemd/systemd/issues/7624</a></div></div><div><br clear="none"></div>they seemed to agree to change the behavior of <span>DefaultMemoryAccounting so that, if set to "never", systemd should leave the memory controller alone. Did they implement it?<br clear="none"></span><span></span><div><div><br clear="none"></div></div>For my desktop (or laptop) system I need to implement this simple memory resource management:<br clear="none">1) there are two cgroups for the memory controller (globally): swappable, nonswappable.<br clear="none">2) in swappable, I have memory.swappiness=100<br clear="none">3) in nonswappable I have memory.swappiness=0 and the oom killer disabled<br clear="none">4) I use cgsendrules to classify <br clear="none"> a) all the swappables (e.g. firefox) with specific rules<br clear="none"> b) all the unswappables with a last catch-all rule.<br clear="none"><br clear="none">I
don't know if anyone else has experienced this but in a normal desktop
setting even with a decent amount of RAM, when the kernel starts to hit
the swap it's going to try to swap pages from all the wrong processes,
as far as desktop usage goes, like X, all the pieces of kde etc.
Everything starts stuttering for seconds at a time in the best scenario
and for minutes in the worst one (and with an SSD!). <br clear="none">I've
tested the simple scheme above and it completely solves all my issues,
the memory hogs get their pages swapped and the rest of the processes
stay in memory and everything is smooth as butter.<br clear="none"><br clear="none">If this scheme could be implemented with systemd I'd be fine using it also for the memory controller. But otherwise I need to<br clear="none">implement it myself. But, as I said, sometimes systemd seems to move processes from my memory cgroups. <br clear="none"><br clear="none">John<br clear="none"></span><br></div></div></div></div>
</div>
</div></div></body></html>