Bug 218798 - kio_sftp is much slower than command line scp
Summary: kio_sftp is much slower than command line scp
Status: RESOLVED DUPLICATE of bug 254865
Alias: None
Product: kio
Classification: Unmaintained
Component: sftp (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Andreas Schneider
URL:
Keywords:
: 218845 219532 239824 240814 245204 246557 253430 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-15 15:01 UTC by Todor Buyukliev
Modified: 2011-03-25 09:43 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Use sftp_async_read to speed up get requests (8.57 KB, patch)
2010-09-17 15:28 UTC, Philip Lorenz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Todor Buyukliev 2009-12-15 15:01:56 UTC
Version:            (using KDE 4.3.1)
Compiler:          gcc version 4.4.1 [gcc-4_4-branch revision 150839] (SUSE Linux) Target: x86_64-suse-linux
OS:                Linux
Installed from:    openSUSE RPMs

uploading a file to a server on the lan runs at about 1MB/s through dolphin's sftp. when using command line scp to the same server the speed is 10MB/s. the lan is 100 Mbit/s.

the sftp ioslave is underutilizing the bandwidth to the point of being unusable for large files.

this might be caused by explicit setting of the socket write buffer size to some small value (which disables the kernel autotuning) or by using small buffer when reading the local file.
Comment 1 Andreas Schneider 2009-12-15 21:26:42 UTC
The reason is that the old kio implementation and the current sftp implementation in libssh is a blocking IO. We are working on this so you have to wait for the next libssh version.
Comment 2 Andreas Schneider 2009-12-16 09:34:35 UTC
*** Bug 218845 has been marked as a duplicate of this bug. ***
Comment 3 Tommi Tervo 2009-12-21 13:11:04 UTC
*** Bug 219532 has been marked as a duplicate of this bug. ***
Comment 4 Andreas Schneider 2010-07-21 16:35:12 UTC
*** Bug 245204 has been marked as a duplicate of this bug. ***
Comment 5 Andreas Schneider 2010-07-21 16:35:30 UTC
*** Bug 239824 has been marked as a duplicate of this bug. ***
Comment 6 Philip Lorenz 2010-09-17 15:28:16 UTC
Created attachment 51758 [details]
Use sftp_async_read to speed up get requests

The attached patch uses sftp_async_read to speed up the sftp kioslave. Preliminary testing showed that the transfer speed locally increased from ~3MByte/s to 18-20 MByte/s.

It should apply cleanly to trunk (r1152597) but was developed against the KDE 4.5 branch. 

Let me know if there are any issues with the patch and I will try to fix them.
Comment 7 Andreas Schneider 2010-09-18 10:57:46 UTC
Philip:

Thank you very much for your patch! I haven't implemented this yet cause we plan to have complete async API in libssh 0.5. I think the concept will be much the same how to use it. So it makes probably sense to apply it now.

I will talk to Aris how the API should look like in libssh 0.5, review your patch carefully and come back to you.
Comment 8 Andreas Schneider 2010-10-07 12:25:02 UTC
*** Bug 253430 has been marked as a duplicate of this bug. ***
Comment 9 Dario Andres 2010-11-21 18:10:35 UTC
*** Bug 246557 has been marked as a duplicate of this bug. ***
Comment 10 Dario Andres 2010-11-21 18:20:47 UTC
*** Bug 240814 has been marked as a duplicate of this bug. ***
Comment 11 Andrew Gaydenko 2011-03-25 05:26:51 UTC
4.6.1 is still infected with the issue.
Comment 12 Andrew Gaydenko 2011-03-25 05:28:29 UTC
*** This bug has been confirmed by popular vote. ***
Comment 13 Andreas Schneider 2011-03-25 09:43:00 UTC

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