gnome-shell consumes several GB of RAM
Solution 1:
Memory leaks are a known problem (bug) of gnome-shell.
Three workarounds...
-
Use Wayland instead of X11/xorg. (Change on your login screen).
-
In X11/xorg, restart gnome-shell with ALT+F2, then "r", then ENTER.
-
Update to a newer version of Ubuntu.