Bug 337797

Summary: Heavy CPU usage if there are many mount points (e.g. ZFS)
Product: [Applications] dolphin Reporter: Chris Kerr <chris.kerr>
Component: panels: placesAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: mail
Priority: NOR    
Version First Reported In: 16.12.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Chris Kerr 2014-07-25 11:35:40 UTC
I use ZFS (http://zfsonlinux.org/faq.html) - all my /, /usr, /home /var and so on are on the same disk partition, but as different ZFS 'filesystems'.

I use ZFS snapshots as a first line backup system. Because snapshots work on a 'filesystem' basis, and because ZFS 'filesystems' are much lighter-weight than the equivalent with e.g. ext4 where you have to allocate space specifically for that FS, I have lots of 'filesystems' for e.g /home/me/Documents, /home/me/Videos etc, because I want to have different backup policies for music vs normal documents. Including things like /proc, /tmp etc, I have 89 mountpoints as opposed to the 12 or so that a normal system would have.

Whenever I plug in, mount, unmount or remove a USB stick, and whenever a new ZFS snapshot is created, my system becomes slow or even unresponsive for a few tens of seconds. Looking at `top`, it is apparent that every `dolphin` process is using 100% CPU (or as much as it can, when there are more `dolphin` processes than cores). `udisksd` is also using 100% CPU.

Could it be possible to do either/both of:
1) Cache the results of whatever calculation is happening so that only the newly added / removed partition needs to be probed?
2) Do the calculation once and share the results rather than repeating in every Dolphin process on the system?
Comment 1 Frank Reininghaus 2014-07-28 15:58:53 UTC
Thanks for the bug report. The root cause of the problem is most likely not in Dolphin itself, but in some library that deals with the ZFS file system in an inefficient way.

Before anything can be done to fix the problem, we must know what part of the code is responsible for the heavy CPU usage. Please follow the instructions at

https://community.kde.org/Dolphin/FAQ/Freeze

and attach one or more backtraces that you obtain while Dolphin keeps the CPU busy. Thanks for your help!
Comment 2 Julian Steinmann 2018-03-31 16:13:29 UTC
Is this still a problem with Dolphin 17.12.3? If not, I'll close this bug soon.
Comment 3 Julian Steinmann 2018-04-15 16:16:14 UTC
No response -> closing. Thanks for reporting this bug, please reopen the report if you can still reproduce this behavior with newer versions of Dolphin.