RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1168773 - sftp upload is very slow
Summary: sftp upload is very slow
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libssh2
Version: 6.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-27 23:23 UTC by Karel Srot
Modified: 2017-07-03 12:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 950358
Environment:
Last Closed: 2017-07-03 12:48:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Srot 2014-11-27 23:23:50 UTC
seems to be present on rhel-6.6. too, 
tested with libssh2-1.4.2-1.el6 and curl-7.19.7-40.el6_6.1.

The sftp upload of 500MB large file takes ~7 minutes on localhost with average speed 780k per sec.

+++ This bug was initially created as a clone of Bug #950358 +++

Description of problem:

Not sure whether this is libssh2/curl/openssh problem, pls. feel free to reassign.

I have a test that transfers huge file in various ways. I have managed that sftp upload takes significantly more time on RHEL7 than on RHEL6.

Executed command:
curl -T ~curltestuser/hugefile -u curltestuser: --key /root/.ssh/id_rsa --pubkey /root/.ssh/id_rsa.pub sftp://localhost/home/curltestuser/uploadedfile

transferred file is 5120 MB large.

on RHEL6.4:
 99 5120M    0     0   99 5109M      0  8947k  0:09:45  0:09:44  0:00:01 12.8M
100 5120M    0     0  100 5120M      0  8957k  0:09:45  0:09:45 --:--:-- 16.8M
100 5120M    0     0  100 5120M      0  8957k  0:09:45  0:09:45 --:--:-- 8957k

on RHEL7:
 32 5120M    0     0   32 1673M      0   840k  1:43:54  0:33:57  1:09:57  777k
 32 5120M    0     0   32 1673M      0   840k  1:43:54  0:33:58  1:09:56  773k
 32 5120M    0     0   32 1674M      0   840k  1:43:55  0:33:59  1:09:56  771k
an this moment the test was killed since it took too much time.


Version-Release number of selected component (if applicable):
openssh-6.1p1-7.el7.ppc64
libssh2-1.4.3-4.el7.ppc64
curl-7.29.0-4.el7.ppc64


How reproducible:
always for me


Steps to Reproduce:
1. use curl to upload huge file through sftp/sshd.
  
Actual results:
transfer speed about 770k/s

Expected results:
transfer speed about 16M/s



Additional info:

--- Additional comment from Kamil Dudka on 2013-07-24 12:57:57 EDT ---

git bisect points to this upstream commit:

http://git.libssh2.org/?p=libssh2.git;a=commitdiff;h=03ca9020

--- Additional comment from Kamil Dudka on 2013-08-09 10:36:49 EDT ---

This partially reverts commit 03ca9020756a4e16f0294e5b35e9826ee6af2364.

The problem was that sftp_read() used a read-ahead logic to figure out
the window_size, but sftp_packet_read() called indirectly from
sftp_write() did not use any read-ahead logic.

--- Additional comment from Kamil Dudka on 2013-08-12 11:50:48 EDT ---

raised upstream:

http://thread.gmane.org/gmane.network.ssh.libssh2.devel/6428

Comment 1 Kamil Dudka 2014-11-28 12:00:22 UTC
The fix for bug #950358 caused bug #1080459.  So we need to pick the bigger upstream patch to fix this properly:

http://pkgs.devel.redhat.com/cgit/rpms/libssh2/commit/?id=ebe41deb

Comment 4 Kamil Dudka 2017-07-03 12:48:02 UTC
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017.  During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification.  Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com


Note You need to log in before you can comment on or make changes to this bug.