-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement assynchronous SFTP file transfer #641
base: devel
Are you sure you want to change the base?
Conversation
I applied some CI fixes and now this PR needs to be rebased to pick them up. I'm clicking the rebase button now. |
3c22bba
to
fd42bb2
Compare
Quality Gate failedFailed conditions |
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
Signed-off-by: Jakub Jelen <[email protected]>
for more information, see https://pre-commit.ci
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. |
The testing farm build are failing because the libssh 0.11 did not make it to the stable fedora versions. |
Looks like v0.11.0 should be available now in F41? https://koji.fedoraproject.org/koji/buildinfo?buildID=2524005 |
Correct, but not in RHEL9 and other target architectures, which means this one still need some work to keep this code working also with the older libssh. Either with some conditional compilation or some other tricks... |
@Jakuje So this is what I understood. The async SFTP is only available in Now, the challenge is that An alternative that I can think of is inspect the libssh version and invoke the async implementation is we're running a libssh version that supports the async SFTP API and fallback to the existing implementation if not. That way, older pylibssh SFTP would still work but it'll be terribly slow like it has been so far. Please let me know if what I said above is correct here. |
Quality Gate passedIssues Measures |
All correct. We do not plan to backport this API to older RHELs so if there is a way to implement some fallback, that would be preferred. Hints or pointers welcomed if you know how to approach. I am keeping this as a draft as this is started more like a proof of concept that the new API does what it is supposed to do. To increase the SFTP throughput everywhere, the #664 should get you basically to the same performance for the most common read sizes (up until 32kB. But as you can see in #638, the large (>1kB) reads over SFTP were not working at all so right now, I would rather focus on these PRs. I think the changes there are ready to be merged (or at least reviewed). |
SUMMARY
The SFTP transfers done the way they work now are very slow especially on connections with large latency because each chunk (now 1024B) needs to travel all the way to remote as well as the confirmation (or request + data for the other transfer), before another chunk is sent. This can be improved by two things:
This depends on #636 (libssh 0.11), but also on other platforms having the updated libssh. It will likely need some conditional compilation based on the libssh version, but I did not find a good solution for cython after it was deprecated (cython/cython#4310) so any help/suggestions welcomed.
This PR also reproduces an issue with the new API that it currently hangs waiting for the second message, while it already happily sits in the queue, which is being worked on upstream.
Therefore marking as a draft to collect initial inputs.
ISSUE TYPE