On Wed, Jul 28, 2021 at 12:14 PM Aleksei Bavshin
<alebastr(a)fedoraproject.org> wrote:
On 7/27/21 6:23 PM, David Airlie wrote:
> Hi,
>
> I've been using f34 with gnome/wayland session on a 16MB machine which
> has 8GB zram swap configured.
>
> If I build anything large inside my desktop environment (llvm/clang)
> from a gnome-terminal, systemd-oomd blows away my whole desktop slice.
> This seems overly hostile.
>
> Now in theory I can use systemd-run to run a shell but my
> understanding is the DE is meant to be smarter here.
>
> Is it at least launching firefox etc in new cgroups or are all
> processes on my desktop in one big cgroup?
IIRC, gnome-terminal supposed to put each tab into a new cgroup. And
Gnome would create cgroup for each desktop application started via Gnome
shell or glib functions.
While it's still a bit fragile and there's a lot of ways to escape (i.e.
xdg-open, third-party application launchers, starting apps from the
terminal, etc.), normal use in Gnome should work just fine.
---
From your description, something obviously went wrong: either
assignment of cgroups has failed and everything is in the same big
group, or sd-oomd made a bad shot. systemd-cgls should show which it is.
Thanks for the hint, systemd-cgls at least makes it appear as if everything
is in different slice
─user.slice
│ └─user-1000.slice
│ ├─user(a)1000.service
│ │ ├─session.slice
│ │ ├─app.slice
│ │ │ ├─app-org.gnome.Terminal.slice
│ │ │ │ ├─vte-spawn-f4a41678-fa09-4ab7-b6d4-d89e18bdb5f4.scope
I do find it strange it picks
Killed
/user.slice/user-1000.slice/user@1000.service/session.slice/org.gnome.Shell(a)wayland.service
I might have to dig into systemd-oomd to see why it picks totally the
wrong option here.
Is there a command to list the current memory usage for each cgroup?
Dave.