On Sat, 2020-01-04 at 12:17 -0600, Michael Catanzaro wrote:
On Sat, Jan 4, 2020 at 11:38 am, Zbigniew Jędrzejewski-Szmek
> What about using the memory controller for user units to allocate
> memory resources between the processes in the user session? Thanks
> recent developments, the gnome session uses separate systemd units
> (and thus separate cgroups) for various services. We could set
> like memory.low for "the basic components of the user session",
> and on the other hand, memory.swap.max for "the payload", i.e.
> user processes on top.
This looks interesting. I'd love to see more serious discussion of
proposal. Carving out dedicated memory for essential desktop
seems like something we should be able to do in 2020.
And it seems like it is: In the issue about this whole topic some
implemented solutions where mentioned:
But not further commented at least on pagure.
Which I think is quite sad as those seem to be the way better way to
handle those things. Having a daemon that assigns cgroups to processes
seems to let the kernel do its thing and keep us all sane and keeps the
system reasonable responsive.
I guess the important question here is: Does it really prevent hanging
and what's the origin of hanging? Is it that the kernel starts to swap
and therefore eats up all CPU time or is it the programs in foreground
that suddenly all try to get their piece of memory back that forces
kswapd onto the CPU?
My guess would be the latter, but I'm sure the group who did the
research on this topic has a better insight into this.