High CPU usage after running for several days [$15]

Bug #1657494 reported by naisanza on 2017-01-18
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Plank
High
Unassigned

Bug Description

Plank increasingly consumes more CPU cycles over time.

At about ~4613 minutes of runtime, CPU usage by the Plank process sits at around 60~70%
At about ~6118 minutes of runtime, CPU usage by the Plank process sits at 100%

# top output
# 23941 user 20 0 891820 118664 27388 R 100.0 3.4 6118:20 plank

- Plank: 0.11.2-1
- Ubuntu 16.10
- Gnome 3 vanilla
- xserver-common: 2:1.18.4-1ubuntu6.1

Wesley Moore (wjmoore) on 2017-01-20
summary: - High CPU usage after running for several days
+ High CPU usage after running for several days [$15]
naisanza (naisanza) on 2017-01-25
description: updated
description: updated
description: updated
description: updated
Wesley Moore (wjmoore) wrote :

I was encountering this issue in elementary OS 0.4, which is built on Ubuntu 16.04. I'm now running Arch and have built Plank from source and have had it running for over 4 days now and plank idle CPU usage is < 1%.

I have built the 0.11.4 from sources (Gentoo/Sabayon) and the high CPU usage is still here. As 0.11.4 was released on 2017-03-27 (so after wjmoore's comment) I suspect the bug is still present.

I tried it w/ and w/o zooming; w/ the integrated themes (Default, Matte and Transparent) and w/ Gtk (Greybird) and the behaviour is the same.

Is there a way I could be of more assistance in debugging the issue?

Changed in plank:
importance: Undecided → High
Denis Yakovlev (dynia) wrote :

I observe ~20% of CPU load when the system is idl, using fresh install of lubuntu 17.04. When some activity is done, such as apps being opened and closed it raises up to 60% for a short time and then goes back to ~20. it is never getting below 13%.

Denis Yakovlev (dynia) wrote :

apologies, i should have mentioned the versio i use which is 0.11.3 - from the official lubuntu repo.

Denis Yakovlev (dynia) wrote :

that`s what i discovered after some experiments: when i removed trashbin, clocks and clippy docklets CPU usage in idle state goes to less than 1%, but when any minimal activity is being performed such as typing this text in chromium it`s averaging between 2 and 3%. When I launch new app it temporarily raising to 57% or even more and then reduces quickly.

Clippy is a huge cause of CPU usage, as it checks the contents of the clipboard every 500ms (i.e. twice per second). This has been fixed in git.

The issue, however, is somewhere else, as this is the output from "top" after around 18 days of uptime (but I could have killed plank 11 days ago and relaunched it) with 1 Docklet ("Show Desktop"; no Clippy, Trashcan, Clock, ...) and 6 application launchers (Firefox, Thunar, Simple Scan, Libre Office Writer, XFCE Terminal, VLC):

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13369 rina 20 0 673716 61024 11364 S 21.4 3.0 515:32.94 plank
 2501 root 20 0 403316 48324 31160 S 5.6 2.4 273:24.82 X

10 days after the last report, plank has accumulated over 860 hours (!) of CPU time for doing nothing.

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13369 rina 20 0 705428 85864 11780 S 33.7 4.3 1375:47 plank
 2501 root 20 0 410696 76496 32056 S 0.3 3.8 453:29.83 X

Wish I could offer more help, but I am not able to debug Vala applications.

strace output of ~30 seconds of running plank, with all threads in the same file.

Command used: strace -p 13369 -v -f -t -o strace_plank.txt

Szilárd Páll (sin-pecado) wrote :

Is there any progress on this? It's making it pretty much impossible to use without regularly logging in and out (which is not something I would normally do more often than once every week or two).

In my case if I let plank "alone" it lloks like this:

 4410 foooser 20 0 754716 143004 21964 R 27.0 0.9 3776:24 plank

but if move the mouse above the dock, nothing extreme, just slowly cruising up and down this in a few seconds it reaches pack CPU usage:

 4410 pszilard 20 0 754716 143004 21964 R 100.0 0.9 3776:36 plank

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions