Bug 391153 - Creating files takes a lot of time and CPU (spawns many processes)
Summary: Creating files takes a lot of time and CPU (spawns many processes)
Status: RESOLVED WORKSFORME
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Samba (show other bugs)
Version: 17.12.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-27 09:42 UTC by Michael Heidelbach
Modified: 2020-03-08 04:33 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Heidelbach 2018-02-27 09:42:39 UTC
open dolphin
activate konsole panel

$ mkdir /tmp/otto
$ cd /tmp/otto
$ touch {001..500};time read -p "Hit enter when files show up"
Hit enter when files show up

real    1m2,633s
user    0m0,000s
sys     0m0,000s

CPU usage is at maximum during this
Observations in ksysguard:
- dolphin's cpu usage stays normal
- apparently a lot (500 my guess) of net processes are spawned that end immediately

If repeated with files already present the result is about the same, if not worse.
Comment 1 Julian Steinmann 2018-02-27 11:01:51 UTC
Hmm, I cannot reproduce this behavior on KDE Neon 5.12.2 with Dolphin 5.12.2. When following your steps, I get this output:

Hit enter when files show up

real    0m1.237s
user    0m0.000s
sys     0m0.000s

which seems perfectly normal to me. Could this issue be related to the filesystem type?
Comment 2 Michael Heidelbach 2018-02-27 11:41:45 UTC
(In reply to XYQuadrat from comment #1)
> Could this issue be related to the
> filesystem type?
ext4 - probably not.
After your report I suspect it has to with the samba share mounts i have in my fstab.
Did you see those net processes in ksysguard?
Comment 3 Julian Steinmann 2018-02-27 15:56:39 UTC
(In reply to Michael Heidelbach from comment #2)
> (In reply to XYQuadrat from comment #1)
> > Could this issue be related to the
> > filesystem type?
> ext4 - probably not.
> After your report I suspect it has to with the samba share mounts i have in
> my fstab.
> Did you see those net processes in ksysguard?

No, I didn't see those either. Your suspect might easily be true, as I do not have any samba mounts (even though I don't understand how that might affect file creation).
Comment 4 Michael Heidelbach 2018-03-07 08:43:26 UTC
I found the net processes are actually calling 'net usershare info'
I inadvertently had usershares enabled in /etc/samba/smb.conf. 
After removing that the problem was gone.

I don't know if this still is a bug. Somebody else has to decide if those net calls are intended or unavoidable. After all they are slowing down the process considerably.
Comment 5 Nate Graham 2018-03-29 20:25:09 UTC
What do they do? Are they necessary?
Comment 6 Julian Steinmann 2018-04-12 09:21:01 UTC
I found out what "net usershare info" does (it prints information about a specific samba share), but I think the issue we are facing is actually a problem with samba as Dolphin should not explicitly call these functions. I guess we can close this bug & maybe file a report against the samba implementation.
Comment 7 Nate Graham 2018-04-12 18:26:55 UTC
Go ahead and move this to kio-extras then.
Comment 8 Julian Steinmann 2018-04-16 12:21:12 UTC
Moved this bug to kio-extras.
Comment 9 Harald Sitter 2020-02-07 11:25:31 UTC
Looks fairly fixed on latest stable release of everything frameworks. I actually think the only way this could have happened is if KIO's file properties plugins aren't loaded on-demand. I am certain it does these days as I've recently looked at that very code. Besides that there isn't anywhere we call `net` AFAIK.

Can you still reproduce this on KF5.66+?
Comment 10 Bug Janitor Service 2020-02-22 04:33:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2020-03-08 04:33:12 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!