gnome-shell consumes several GB of RAM

Solution 1:

Memory leaks are a known problem (bug) of gnome-shell.

Three workarounds...

  1. Use Wayland instead of X11/xorg. (Change on your login screen).

  2. In X11/xorg, restart gnome-shell with ALT+F2, then "r", then ENTER.

  3. Update to a newer version of Ubuntu.