Bug 129331 - sftp very slow compared to commandline sftp client
Summary: sftp very slow compared to commandline sftp client
Status: RESOLVED INTENTIONAL
Alias: None
Product: kio
Classification: Unclassified
Component: sftp (show other bugs)
Version: unspecified
Platform: openSUSE RPMs Linux
: NOR normal with 40 votes (vote)
Target Milestone: ---
Assignee: Andreas Schneider
URL:
Keywords:
: 137807 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-17 19:51 UTC by Matthias Wieser
Modified: 2009-09-14 09:21 UTC (History)
6 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 Matthias Wieser 2006-06-17 19:51:32 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    SuSE RPMs
OS:                Linux

kio-sftp is 2.6 (wlan) to 4 (fast ethernet) times slower than commandline sftp client (at least in a local wlan):

With 54mbit wlan:
Commandline sftp:
---
sftp mw@xxxx
cd xyz
get amarok-1.4.0-23.2.i586.rpm
[...]
100%  18MB  2.6MB/s   00:07
---

kio-sftp:
---
~1MByte/second
---

I used IPTraf to count the transfered bytes and packets:

sftp commandline client:
---
Packets incoming:  13312
Bytes incoming: 19795472
(~2000 packets/s)
Packets outgoing:   6814
Bytes outgoing:   499884
(~1000 packets/s)

kio-sftp:
---
Packets incoming:  13978
Bytes incoming: 19821409
(~770 packets/s)
Packets outgoing:   7293
Bytes outgoing:   514770
(~400 packets/s)

Ping is 1.60 ms (== 1/625)

Could it be that kio sftp waits for an ack after each package, while the commandline sftp client does not do that which allows it to reach much higher packet rates?
Comment 1 Stefan Borggraefe 2006-06-29 16:03:17 UTC
Confirming with KDE 3.5.3 on Debian Sid. ep6-062606-ubuntuos.ogg is a 101 MB file that is copied over a 100 MBit Ethernet network with (nearly) no other traffic.

stefan@rattle:~/downloads$ time kioexec touch sftp://hum/home/stefan/ep6-062606-ubuntuos.ogg

real    0m47.180s
user    0m0.276s
sys     0m0.164s

stefan@rattle:~/downloads$ time sftp stefan@hum:/home/stefan/ep6-062606-ubuntuos.ogg .
Connecting to hum...
Fetching /home/stefan/ep6-062606-ubuntuos.ogg to ./ep6-062606-ubuntuos.ogg
/home/stefan/ep6-062606-ubuntuos.ogg                       100%  101MB   9.2MB/s   00:11

real    0m11.939s
user    0m3.260s
sys     0m3.224s

Just for fun, let's see how kio-fish and scp perform.

stefan@rattle:~/downloads$ time kioexec touch fish://stefan@hum/home/stefan/ep6-062606-ubuntuos.ogg

real    0m18.961s
user    0m3.596s
sys     0m2.744s

stefan@rattle:~/downloads$ time scp stefan@hum:/home/stefan/ep6-062606-ubuntuos.ogg .
ep6-062606-ubuntuos.ogg                                    100%  101MB  10.1MB/s   00:10

real    0m10.084s
user    0m2.856s
sys     0m2.292s

According to bug 78256 this should be fixed, but these numbers tell a different story. :-(
Comment 2 Tommi Tervo 2006-11-24 10:06:50 UTC
*** Bug 137807 has been marked as a duplicate of this bug. ***
Comment 3 Mateusz Jędrasik 2007-05-27 20:17:21 UTC
yes.

Still extremely slow, even over a 4mbps dsl link. ~250kB/s through sftp:// over konqueror and ~420kB/s through lftp.

It seems konqueror is doing something evil to saturate the line or maybe just not being able to use it fully.

Regards,

//m.
Comment 4 Mateusz Jędrasik 2007-05-27 20:25:39 UTC
fish:// works great tho. strangely.
Comment 5 Chris Wadge 2007-10-05 05:49:26 UTC
Confirmed in KDE 3.5.5 (Debian Etch). Standard sftp/fish tools are faster by a multiple of 3-5x. See also http://bugs.kde.org/show_bug.cgi?id=103661
Comment 6 Chris Wadge 2008-01-02 19:24:54 UTC
Works for me, same speeds in Konqueror using fish or sftp as sftp client, KDE 3.5.8 (Debian Lenny/Testing). See also http://bugs.kde.org/show_bug.cgi?id=103661
Comment 7 Patrick De Mazière 2008-01-08 10:56:50 UTC
I still experience the problem on KDE 3.5.8-7.fc7
(see also https://bugzilla.redhat.com/show_bug.cgi?id=427963)

I opened two konqueror windows, one with an address on the local computer and one with an address on the remote one using either sftp or fish.
The transfer speeds varied around 600KByte/s in either direction. When I did the same transfer from the command prompt using scp or sftp, I obtained transfer-speeds of 20MByte/s.... 

I have a normal, updated FC7 installation. So, standard ssh installation. Anyone suggestions on how to correct this ? Is it a kioslave and/or ssh setting, or is it a real bug ?

So, for me, this bug is still not resolved !
Comment 8 Andreas Schneider 2009-09-09 11:10:15 UTC
I have to do more tests if kio in KDE still causes problems.
Comment 9 Andreas Schneider 2009-09-14 09:21:17 UTC
The problem is/was that it is a blocking implementation. So you're not able to get higher packet rates. kio_sftp has been rewritten with libssh in KDE trunk. libssh is blocking too but it is under development and will be changed in future.

As this bug is against KDE3 I will close it as WONTFIX. kio_sftp in KDE4 will be improved as soon as libssh offers a non-blocking API.