I'm seeing moderately high CPU usage from the gnome-shell process as
well. It seems to stay running at at least 5% at all times. I decided to
use strace to see what it was doing:

$ sudo strace -c -p 6916
strace: Process 6916 attached
strace: Process 6916 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 25.38    0.054330           6      9277      8116 recvmsg
 21.45    0.045927          10      4454           ioctl
 18.90    0.040462          12      3295           poll
 11.95    0.025583          24      1045        24 futex
  7.23    0.015478          11      1388           writev
  4.05    0.008663           7      1302           write
  2.82    0.006048           4      1500           getpid
  2.14    0.004579           5       914           mprotect
  2.07    0.004431           7       657           read
  1.11    0.002372          11       212           timerfd_create
  0.94    0.002012           8       251           close
  0.87    0.001859           9       212           timerfd_settime
  0.40    0.000857          22        39           openat
  0.20    0.000437           6        78           fstat
  0.19    0.000413           3       120           getrusage
  0.11    0.000244           7        36           mmap
  0.10    0.000209           5        39           fcntl
  0.06    0.000129         129         1           restart_syscall
  0.02    0.000037          37         1           munmap
  0.01    0.000029           7         4         1 recvfrom
  0.00    0.000000           0        70        60 stat
------ ----------- ----------- --------- --------- ----------------
100.00    0.214099                 24895      8201 total

The strange thing here is the large number of EAGAIN errors from the
recvmsg() syscall. When I run strace without the -c I see output such
as:

recvmsg(12, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(12, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(5, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(12, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily 
unavailable)
recvmsg(12, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily 
unavailable)

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

Title:
  High CPU usage by gnome-shell when only running gnome-terminal

Status in gnome-shell package in Ubuntu:
  Confirmed

Bug description:
  Even when doing nothing but displaying a terminal screen with top
  running gnome-shell uses 10% of a CPU. That seems excessive. I
  disabled all extensions to try and make the test fair. Enabling the
  system monitor extension increases the load to 13-14%. It seems that
  the gnome-shell screen painting is highly CPU consuming even if screen
  updates are infrequent (1 a second for all these cases).

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: gnome-shell 3.28.1-0ubuntu2
  ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
  Uname: Linux 4.15.0-20-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7
  Architecture: amd64
  CurrentDesktop: ubuntu:GNOME
  Date: Tue May 29 11:38:05 2018
  DisplayManager: gdm3
  InstallationDate: Installed on 2016-10-27 (578 days ago)
  InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 
(20160719)
  SourcePackage: gnome-shell
  UpgradeStatus: Upgraded to bionic on 2018-05-19 (9 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1773959/+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