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

Bug #1657494 reported by naisanza
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Plank
New
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)
summary: - High CPU usage after running for several days
+ High CPU usage after running for several days [$15]
naisanza (naisanza)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
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%.

Revision history for this message
Luca Santarelli (luca-santarelli) wrote :

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
Revision history for this message
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%.

Revision history for this message
Denis Yakovlev (dynia) wrote :

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

Revision history for this message
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.

Revision history for this message
Luca Santarelli (luca-santarelli) wrote :

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

Revision history for this message
Luca Santarelli (luca-santarelli) wrote :

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.

Revision history for this message
Luca Santarelli (luca-santarelli) wrote :

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

Revision history for this message
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

Revision history for this message
thrantir (thrantir) wrote :

Have same problem on Ubuntu 17.10 and plank 0.11.4-1

Revision history for this message
Matt (matt-gatto-o) wrote :

As a person that leaves their PC running for days and doesn't turn it off, I've been noticing this issue for years, it's very annoying.

Plank simply starts using more resources and slowing down over time, it reaches the point that you can literally see it rendering the little requester boxes above each icon.

If I close Plank and start it again everything is fine and it performs as expected. I hope for a resolution to this issue with every update, but nothing ever changes. Leave the PC running for more than two days and I have no doubt the issue will be observed.

Currently running Ubuntu Mate 16.04 LTS.

Revision history for this message
^rooker (rooker) wrote :

I have to second what Matt said:
Exactly same behavior here :(

I've just switched several of my friends from from Docky to Plank, because Plank uses the correct Icons for all programs (e.g. Thunar, xfce4-terminal, etc) and seemed way more stable.

Running Xubuntu 16.04.3, Plank v0.11.1-1.

Is there anything we could do to help localizing/fixing this issue? :)

Revision history for this message
aaaa (aaa123123) wrote :

In my case plank was not shooting more than 2,3% of CPU but the total CPU time over all days running would be comparable to Xorg or irq/38-nvidia !!
e.g. the "TIME+" column of top after 25 days since last boot is:

23:07.23 xfce4-sensors-p
12:22.58 xfce4-terminal
115:28.76 Xorg
41:46.98 irq/38-nvidia

I think I have found the root of my plank woes: the trash can. I have removed it and plank is back to sanity. Before that plank's load was equal to my Xorg's load!!!!

Prior to that I made sure that Clippy was also removed.

(VERSION: I downloaded plank-0.11.4 and compiled locally - fedora, kernel 4.18.)

I am going to make a poisonous comment but it is meant for good: In the olden days we used to make fun at micro$$of programmers who managed to produce crappy code. At first I thought it was a matter of competence but after some years I realised that their total ignoring of all lessons of handling resources as wisely (and miserly) as possible was deliberate. They wanted to, they told them so: waste the resources. The more wasteful your application is the more bonus you will get. Something along these lines. At that time, the free software movement, Linux and the handful of window managers existent, were the exact opposite. They cared about not wasting resources and would be proud to run X11 on a pocket calculator just to prove this point.

But then came exotic linux software and all software engineering gentlemanship went down like a flop. It would be unfair to equate close-source/private companies tactics with linux ecosystem but sure we are catching up on wasting resources! Please please please stop that. Whenever you are spawning a timer think again. Whenever you are working on a feature which keeps checking a folder every 500ms please THINK AGAIN! Or at least give us the option to disable it or warn us that this will be wasting CPU cycles or bomb your harddisk. I feel have woken into a bad dream please can you wake me out of it????

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

So, might I ask: is this fixed yet?

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

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.