Re: [systemd-devel] how to make systemd ignore the memory cgroup controller and hierarchy

2018-05-10 Thread john terragon
 
  On Wednesday, May 9, 2018, 10:02:14 PM GMT+2, Simon McVittie 
 wrote: 

>I don't think this is supported. systemd behaves as though cgroups v2 is
>in use (single unified cgroup hierarchy) even if you are currently using
>cgroups v1 (one parallel hierarchy per controller).


According to this

https://github.com/systemd/systemd/issues/7624
they seemed to agree to change the behavior of DefaultMemoryAccounting so that, 
if set to "never", systemd should leave the memory controller alone. Did they 
implement it?

For my desktop (or laptop) system I need to implement this simple memory 
resource management:
1) there are two cgroups for the memory controller (globally): swappable, 
nonswappable.
2) in swappable, I have memory.swappiness=100
3) in nonswappable I have memory.swappiness=0 and the oom killer disabled
4) I use cgsendrules to classify 
 a) all the swappables (e.g. firefox) with specific rules
 b) all the unswappables with a last catch-all rule.

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!). 
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.

If this scheme could be implemented with systemd I'd be fine using it also for 
the memory controller. But otherwise I need to
implement it myself. But, as I said, sometimes systemd seems to move processes 
from my memory cgroups. 

John

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


[systemd-devel] how to make systemd ignore the memory cgroup controller and hierarchy

2018-05-09 Thread john terragon
Hi.

I have the memory cgroup controller configured in the kernel. I want to use it 
myself directly without interference from systemd. I tried setting 
DefaultMemoryAccounting=no in system.conf but systemd seems to still interfere 
with the hierarchy for the memory controller (e.g. systemctl daemon-reload for 
some reason removes all tasks from my subgroups in the memory hierarchy). Since 
none of the cgroup controllers are strictly needed by systemd (only the basic 
cgroup infrastructure in the kernel is neede. The single controllers could be 
disabled, if I'm not mistaken.) how do I get systemd to leave the memory 
controller and relative hierarchy alone?

Thanks

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


[systemd-devel] How to change XDG_RUNTIME_DIR permissions

2018-04-09 Thread john terragon
Hi.
As far as I understand the XDG_RUNTIME_DIR (in debian it's /run/user/) is 
created by the logind service.I want to make the socket of the pulseaudio 
server of one particular user available to all the others. In debian that 
socket is in $XDG_RUNTIME_DIR/pulse/. The problem is that $XDG_RUNTIME_DIR is 
created with 700 and even if I change (after it's been created) the permissions 
to 711, they are automatically changed back to 700 after few seconds (security 
feature?). Is there a  way to specify to logind (if that is indeed the service 
responsible) the permissions with which  $XDG_RUNTIME_DIR should be created?
Thanks
John.


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