Thanks @vanvugt, this was helpful. I'm running ubuntu 23.10. It's been
about a week since I rebooted and I noticed swap usage was quite high.
I've got 32GB of RAM and am a developer with a bunch of stuff open at
once. Decided to investigate. Closed everything, but left just gnome
running and a terminal. Did a swapoff -a to clear swap and dropped
caches to get it as close to just what was allocated as possible. It
still showed 14GB of memory used with 5GB in cache. That seems high.

So, ran this to take a look at VmData for gnome-shell:

  cat /proc/$(pgrep -f /usr/bin/gnome-shell)/status | grep VmData

That reveals:

  VmData:        1231000 kB

That seems a bit excessive.

Full disclosure. I do use extensions. It's too bare-bones without them.

I miss being able to Alt-F2 -> R and reboot gnome, but it appears to not
be possible now with Wayland.



> It's important to remember that RSS increases is no indication of a leak - it 
> will rise and fall according to how busy the machine is and not how much new 
> memory the process has allocated. Please ignore all RSS values as they are 
> going to be unpredictable and misleading.
> 
> As for VSZ, that's kind of related to potential leaks. The problem with VSZ 
> is that it's a measure of the address space mappings size and is also not a 
> measure of regular memory allocated by the process. Although you can use 
> changes in VSZ to detect leaks and bloat, address space used by VSZ is not an 
> indication of the memory requirements of the process.
> 
> Probably a better field to monitor for actual leaks is VmData which you can 
> find in:
>   /proc/PID/status
> 
> VmData is a more realistic indication of memory allocated by the process.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gjs in Ubuntu.
https://bugs.launchpad.net/bugs/1672297

Title:
  gnome-shell uses lots of memory, and grows over time

Status in GNOME Shell:
  Confirmed
Status in gjs package in Ubuntu:
  Fix Released
Status in gjs source package in Bionic:
  Fix Released

Bug description:
  Upstream:
  https://gitlab.gnome.org/GNOME/gnome-shell/issues/64

  ---

  gnome-shell's RSS is growing by 1 MiB every few minutes, and is now at
  almost 2 GiB.

  user      3039  1.8 16.1 4302340 1968476 tty2  Sl+  Mar09 120:17
  /usr/bin/gnome-shell

  strace output is voluminous; here is a representative sample:

  poll([{fd=5, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=5, revents=POLLOUT}])
  writev(5, [{"\231\n\10\0\n\0 
\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0", 32}], 1) = 32
  poll([{fd=5, events=POLLIN}], 1, -1)    = 1 ([{fd=5, revents=POLLIN}])
  recvmsg(5, {msg_name(0)=NULL, 
msg_iov(1)=[{"\1\0{\224\0\0\0\0H\0\0\0\0\23\266\32\0\0\0\0\201\242\204\0\0\0\0\0\261.\0\0",
 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
  recvmsg(5, 0x7fff60efac90, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(5, 0x7fff60efac90, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=5, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=5, revents=POLLOUT}])
  writev(5, [{"\212\5\4\0a\2228\0y\3\5\0%\3\27\4\231\6\5\0\n\0 
\0a\2228\0\0\0\0\0"..., 36}, {NULL, 0}, {"", 0}], 3) = 36
  poll([{fd=5, events=POLLIN}], 1, -1)    = 1 ([{fd=5, revents=POLLIN}])
  recvmsg(5, {msg_name(0)=NULL, 
msg_iov(1)=[{"\1\0}\224\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
  recvmsg(5, 0x7fff60efac90, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=5, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=5, revents=POLLOUT}])
  writev(5, [{"\212\n\2\0a\2228\0", 8}, {NULL, 0}, {"", 0}], 3) = 8
  recvmsg(5, 0x7fff60efb020, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(12, 0x7fff60efb000, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, 
{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16, events=POLLIN}, {fd=26, 
events=POLLIN}, {fd=29, events=POLLIN}, {fd=32, events=POLLIN}, {fd=34, 
events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, 
events=POLLIN}, {fd=42, events=POLLIN}, {fd=43, events=POLLIN}], 15, 0) = 0 
(Timeout)
  recvmsg(5, 0x7fff60efb040, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(5, 0x7fff60efb020, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(12, 0x7fff60efb000, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, 
{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16, events=POLLIN}, {fd=26, 
events=POLLIN}, {fd=29, events=POLLIN}, {fd=32, events=POLLIN}, {fd=34, 
events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, 
events=POLLIN}, {fd=42, events=POLLIN}, {fd=43, events=POLLIN}], 15, 0) = 0 
(Timeout)
  recvmsg(5, 0x7fff60efb040, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  open("/proc/self/stat", O_RDONLY)       = 36
  fstat(36, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  fcntl(36, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
  fstat(36, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  read(36, "3039 (gnome-shell) R 2930 2917 2"..., 4096) = 354
  read(36, "", 3072)                      = 0
  close(36)                               = 0
  recvmsg(5, 0x7fff60efb020, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(12, 0x7fff60efb000, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, 
{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16, events=POLLIN}, {fd=26, 
events=POLLIN}, {fd=29, events=POLLIN}, {fd=32, events=POLLIN}, {fd=34, 
events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, 
events=POLLIN}, {fd=42, events=POLLIN}, {fd=43, events=POLLIN}], 15, 117885) = 
1 ([{fd=4, revents=POLLIN}])
  read(4, "\1\0\0\0\0\0\0\0", 16)         = 8
  recvmsg(5, 0x7fff60efb040, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(5, 0x7fff60efb020, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(12, {msg_name(0)=NULL, 
msg_iov(1)=[{"[\2\327&h\0@\0i\0@\0(nu\22\n\0I\0\336\2\232\1\265\0038\2\362\2\355\1",
 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
  recvmsg(12, 0x7fff60efb000, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, 
{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16, events=POLLIN}, {fd=26, 
events=POLLIN}, {fd=29, events=POLLIN}, {fd=32, events=POLLIN}, {fd=34, 
events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, 
events=POLLIN}, {fd=42, events=POLLIN}, {fd=43, events=POLLIN}], 15, 0) = 0 
(Timeout)
  recvmsg(5, 0x7fff60efb040, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
  recvmsg(12, 0x7fff60efaed0, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(5, 0x7fff60efb020, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(12, 0x7fff60efb000, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, 
{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16, events=POLLIN}, {fd=26, 
events=POLLIN}, {fd=29, events=POLLIN}, {fd=32, events=POLLIN}, {fd=34, 
events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, 
events=POLLIN}, {fd=42, events=POLLIN}, {fd=43, events=POLLIN}], 15, 0) = 1 
([{fd=4, revents=POLLIN}])
  read(4, "\1\0\0\0\0\0\0\0", 16)         = 8
  recvmsg(5, 0x7fff60efb040, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  open("/proc/self/stat", O_RDONLY)       = 36
  fstat(36, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  fcntl(36, F_GETFL)                      = 0x8000 (flags O_RDONLY|O_LARGEFILE)
  fstat(36, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
  read(36, "3039 (gnome-shell) R 2930 2917 2"..., 4096) = 354
  read(36, "", 3072)                      = 0
  close(36)                               = 0
  recvmsg(5, 0x7fff60efb020, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(12, 0x7fff60efb000, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=11, events=POLLIN}, 
{fd=12, events=POLLIN}, {fd=14, events=POLLIN}, {fd=16, events=POLLIN}, {fd=26, 
events=POLLIN}, {fd=29, events=POLLIN}, {fd=32, events=POLLIN}, {fd=34, 
events=POLLIN}, {fd=37, events=POLLIN}, {fd=38, events=POLLIN}, {fd=40, 
events=POLLIN}, {fd=42, events=POLLIN}, {fd=43, events=POLLIN}], 15, 1) = 0 
(Timeout)
  recvmsg(5, 0x7fff60efb040, 0)           = -1 EAGAIN (Resource temporarily 
unavailable)
  poll([{fd=12, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=12, revents=POLLOUT}])
  writev(12, [{"\217\3\4\0i\0@\0\0\0\0\0\0\0\0\0+\0\1\0", 20}, {NULL, 0}, {"", 
0}], 3) = 20
  poll([{fd=12, events=POLLIN}], 1, -1)   = 1 ([{fd=12, revents=POLLIN}])
  recvmsg(12, {msg_name(0)=NULL, 
msg_iov(1)=[{"\1\2\331&\0\0\0\0\250\0`\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",
 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
  recvmsg(12, 0x7fff60efaf60, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  recvmsg(12, 0x7fff60efaf60, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
  ioctl(6, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff60efa960) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_BUSY, 0x7fff60efa910) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff60efa900) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_PWRITE, 0x7fff60efa9b0) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_BUSY, 0x7fff60efac50) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7fff60efaba0) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_SW_FINISH, 0x7fff60efad30) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_SW_FINISH, 0x7fff60efae30) = 0
  ioctl(6, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x69, 0x40), 0x7fff60efadb0) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7fff60efae30) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff60efadb0) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_BUSY, 0x7fff60efad80) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_MADVISE, 0x7fff60efad70) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7fff60efad90) = 0
  ioctl(6, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7fff60efae90) = 0

  ProblemType: Bug
  DistroRelease: Ubuntu 17.04
  Package: gnome-shell 3.23.91-0ubuntu4
  ProcVersionSignature: Ubuntu 4.10.0-11.13-generic 4.10.1
  Uname: Linux 4.10.0-11-generic x86_64
  ApportVersion: 2.20.4-0ubuntu2
  Architecture: amd64
  Date: Mon Mar 13 19:17:51 2017
  DisplayManager: gdm3
  InstallationDate: Installed on 2016-12-02 (100 days ago)
  InstallationMedia: Ubuntu-GNOME 16.10 "Yakkety Yak" - Release amd64 
(20161012.1)
  ProcEnviron:
   LANGUAGE=en_AU:en
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_AU.UTF-8
   SHELL=/bin/bash
  SourcePackage: gnome-shell
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-shell/+bug/1672297/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to