-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix large SFTP reads #638
base: devel
Are you sure you want to change the base?
Fix large SFTP reads #638
Conversation
Quality Gate failedFailed conditions |
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Fixes: ansible#341 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Thanks @kucharskim for the report and testing! Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Quality Gate failedFailed conditions |
This version works, but it is much slower comparing to SCP version.
Above we see approx 80 seconds vs 4 seconds. I've bumped all
and this improved time significantly:
|
Yes, your observations are right. Buffer of 16k is recommended by the the libssh documentation to have some reasonable performance: https://api.libssh.org/master/libssh_tutor_sftp.html I can change it as part of this PR or separate, but the PRs are starting to depend on each other, making the changes hard. |
Using 64k chunks might be problematic as the SSH specification suggests maximum packet size. Most of the implementation work with larger ones, but if they do not, it causes hard to debug issues, such as curl/curl#11804. I would go ahead with 32k as libssh will split large chunks anyway to this size. |
Sure, whatever works. Just to make sftp faster. |
If you want to get even better performance, you can try #641. Its still in draft as it requires libssh 0.11 and I am not sure how to support at the same time also old version, but it should get even larger speeds. |
Filled #664 for increasing the chunk size (on top of this PR). |
SUMMARY
Fixes and reproducers for large SFTP reads that truncate file with the second chunk.
Fixes: #341
ISSUE TYPE