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
<zbyszek(a)in.waw.pl> wrote:
> What about using the memory controller for user units to allocate
> memory resources between the processes in the user session? Thanks
> to
> recent developments, the gnome session uses separate systemd units
> (and thus separate cgroups) for various services. We could set
> attributes
> like memory.low for "the basic components of the user session",
> and on the other hand, memory.swap.max for "the payload", i.e.
> various
> user processes on top.
This looks interesting. I'd love to see more serious discussion of
this
proposal. Carving out dedicated memory for essential desktop
processes
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:
https://github.com/Nefelim4ag/Ananicy
But not further commented at least on pagure.
https://pagure.io/fedora-workstation/issue/98#comment-615424
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.
--
Signed
Sheogorath
OpenPGP:
https://shivering-isles.com/openpgp/0xFCB98C2A3EC6F601.txt