Bug 180362 - file deletion in dolphin is expensive
Summary: file deletion in dolphin is expensive
Status: RESOLVED DUPLICATE of bug 179348
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: trash (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-11 19:45 UTC by Ritesh Raj Sarraf
Modified: 2014-03-03 01:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
dmesg log (69.50 KB, text/plain)
2010-01-14 20:56 UTC, Ritesh Raj Sarraf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ritesh Raj Sarraf 2009-01-11 19:45:12 UTC
Version:           1.2 (using 4.1.96 (KDE 4.1.96 (KDE 4.2 RC1)), Debian packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.26-custom

File deletion to Trash operation is very expensive in Dolphin.

I was re-organizing my music collection and had to delete like 400 folders. I selected them in Dolphin and did a "Delete to Trash". It took me around 5 minutes. Dolphin was deleting a single folder one-by-one.

Here's what top showed.
14520 rrs       20   0 43060  13m 3784 R   77  0.7   1:21.16 kio_file
 5342 rrs       20   0 50344  18m  13m S   43  0.9   4:34.34 nepomukservices


kio_file and nepomukservices were to two processes eating up most of the cpu resources.

File deletion should be a lot lot more faster in Dolphin.
Comment 1 Ritesh Raj Sarraf 2009-01-11 19:46:37 UTC
I think the issue should be more related to Nepomuk than to Dolphin.
But then Nepomuk is in not much usable state at the moment.
Comment 2 David Faure 2009-01-13 23:47:00 UTC
Were those files on a different partition than the one where your $HOME is?
Comment 3 Ritesh Raj Sarraf 2009-01-14 09:08:59 UTC
(In reply to comment #2)
> Were those files on a different partition than the one where your $HOME is?
> 

No. They were under the $HOME directory on the same partition.

This must be something in particular to Dolphin/kio_file because if I selected the parent folder (which held the 500+ folders) and deleted it, it was normal. But if the 500+ folders were selected and deleted, it was very very slow. Almost a folder a second.
So I don't think Nepomuk might be involved. But it indeed was using a good chunk of resources during deletion
Comment 4 Martin Ammermüller 2009-06-14 11:09:31 UTC
I can reproduce this:

1. Make a testfolder
2. cd testfolder; for i in 1 2 3 4 5 6 7 8 9 0; do touch $i; done
3. goto the testfolder in dolphin, select all files, right click -> move to trash
4. files get deleted and it takes ~1s a file
5. repeat file creation in step 2.)
6. now go to the parent folder of testfolder and move testfolder to trash
7. also takes ~1s

I'm using Dolphin 1.2.1 with KDE 4.2.4 under Debian testing/unstable
Comment 5 Martin Ammermüller 2009-06-14 12:09:34 UTC
Looks like a problem with nepomuk. After i disabled the nepomuk service in systemsettings, there's no more delay for deleting files in dolphin.
Comment 6 Stephan Burkhardt 2009-06-15 14:16:27 UTC
This might be a duplicate of bug 179348:
https://bugs.kde.org/show_bug.cgi?id=179348
Comment 7 Ritesh Raj Sarraf 2010-01-14 10:00:40 UTC
Am currently running KDE 4.3.4

I was just cleaning up my Juk colleciton, of duplicate entries. When deleting (Move to trash), the deletion is terrible. Looks like it does 1 file at a time and each file deletion takes around 2 seconds.

Here's what was logged in .xsession-errors.


14:24:35 rrs@champaran:~/software/eclipse $ tail -f /home/rrs/.xsession-errors 
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so                              
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so                              
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so                              
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_http.so                               
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so                              
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
QDBusObjectPath: invalid path ""                                                      
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so                              
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
QDBusObjectPath: invalid path ""
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
Object::connect: No such signal SystemTray::Manager::jobStateChanged(SystemTray::Job*)
kdeinit4: preparing to launch /usr/lib/kde4/kio_trash.so
file retriever error: 149
Comment 8 Ritesh Raj Sarraf 2010-01-14 20:56:08 UTC
Created attachment 39898 [details]
dmesg log

I see a lot of these messages when doing a copy.

[ 7200.980459] INFO: task kio_file:11765 blocked for more than 120 seconds.                            
[ 7200.980464] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.               
[ 7200.980488] kio_file      D 00000000     0 11765   3486 0x00000080                                  
[ 7200.980497]  e8dc3300 00000082 e8dc3300 00000000 00000046 c13f4000 c13f4000 efaeb840                
[ 7200.980529]  e8dc34bc c2808000 00000000 f7470e14 0000066d 00000001 e8dc3300 eaacfa80                
[ 7200.980560]  0fc55eeb e8dc34bc 51a5f3b8 00000000 0fc55eeb 00000000 f6c0de18 00311f46                
[ 7200.980591] Call Trace:                                                                             
[ 7200.980618]  [<c1259ce2>] ? io_schedule+0x5f/0x98                                                   
[ 7200.980627]  [<c11232e4>] ? get_request_wait+0xcb/0x146                                             
[ 7200.980654]  [<c10443b2>] ? autoremove_wake_function+0x0/0x2d                                       
[ 7200.980681]  [<c1123780>] ? __make_request+0x2cc/0x3d9                                              
[ 7200.980690]  [<c108710c>] ? find_get_page+0x1f/0x81                                                 
[ 7200.980717]  [<c11223f5>] ? generic_make_request+0x266/0x2b4                                        
[ 7200.980744]  [<c11224ff>] ? submit_bio+0xbc/0xd6                                                    
[ 7200.980753]  [<c10d2b1e>] ? mpage_end_io_read+0x0/0x4e                                              
[ 7200.980778]  [<c10d254b>] ? mpage_bio_submit+0x19/0x1d                                              
[ 7200.980786]  [<c10d295b>] ? __mpage_writepage+0x40c/0x530                                           
[ 7200.980814]  [<c113166f>] ? __lookup_tag+0x8e/0xee                                                  
[ 7200.980841]  [<c108da14>] ? ____pagevec_lru_add+0xf8/0x107                                          
[ 7200.980851]  [<c113a178>] ? __percpu_counter_add+0x52/0x6d                                          
[ 7200.980878]  [<c108c2d7>] ? clear_page_dirty_for_io+0x8c/0xab                                       
[ 7200.980906]  [<c108c58b>] ? write_cache_pages+0x1af/0x29f
[ 7200.980914]  [<c10d254f>] ? __mpage_writepage+0x0/0x530
[ 7200.980941]  [<c10d2bb1>] ? mpage_writepages+0x45/0x61
[ 7200.980971]  [<f7f67689>] ? fat_get_block+0x0/0x21f [fat]
[ 7200.981000]  [<f7f67993>] ? fat_writepages+0x0/0xa [fat]
[ 7200.981009]  [<c108c6b5>] ? do_writepages+0x19/0x25
[ 7200.981036]  [<c10c7565>] ? writeback_single_inode+0xc7/0x273
[ 7200.981064]  [<c10c80a7>] ? writeback_inodes_wb+0x3dd/0x49c
[ 7200.981092]  [<c108cc82>] ? balance_dirty_pages_ratelimited_nr+0x14f/0x2ce
[ 7200.981104]  [<c1087f44>] ? generic_file_buffered_write+0x18a/0x21d
[ 7200.981132]  [<c10883d4>] ? __generic_file_aio_write+0x265/0x28d
[ 7200.981159]  [<c10c03de>] ? touch_atime+0x69/0xd9
[ 7200.981169]  [<c108844d>] ? generic_file_aio_write+0x51/0x93
[ 7200.981196]  [<c10b1aa2>] ? do_sync_write+0xc0/0x107
[ 7200.981223]  [<c1003b35>] ? apic_timer_interrupt+0x31/0x38
[ 7200.981251]  [<c10443b2>] ? autoremove_wake_function+0x0/0x2d
[ 7200.981260]  [<c11061bd>] ? selinux_file_permission+0x40/0x89
[ 7200.981287]  [<c1100558>] ? security_file_permission+0xc/0xd
[ 7200.981296]  [<c10b19e2>] ? do_sync_write+0x0/0x107
[ 7200.981322]  [<c10b23ce>] ? vfs_write+0x7e/0xd6
[ 7200.981348]  [<c10b24be>] ? sys_write+0x3c/0x63
[ 7200.981357]  [<c10030fb>] ? sysenter_do_call+0x12/0x28
[13243.954007] usb 1-3: USB disconnect, address 2
[13243.990865] devkit-disks-da[15153]: segfault at c ip 080660da sp bfe931e0 error 4 in devkit-disks-daemon[8048000+28000]
[14385.441724] tun0: Disabled Privacy Extensions



I don't think this really is a kernel problem because the same is not reproducible if you do a normal cp based copy. The kernel spits these messages when any command goes hung.
The file copy command from KDE seem to be the problem. They are terribly slow.

Full dmesg log is attached.
Comment 9 Dawit Alemayehu 2014-03-03 01:47:52 UTC

*** This bug has been marked as a duplicate of bug 179348 ***