Comments (6)
This isn't really an "issue", you should take discussion items such as this to the mailing list.
- such a speedup would depend on a lot more factors too than just the buffer size. Latency and bandwidth being two important ones.
- it doesn't, because it is an internal design thing that we don't expose to apps.
- I don't think we should. I think we should make the internals as good as possible and remove the need to expose such internal limits.
- That has been discussed on the list before. We can discuss it further. And it might not be optimal or even perfectly suited for all use cases.
- I note that you speak of SFTP performance, not other kinds of performance. We've discussed this topic many times before on the mailing list so searching the archives may very well give you more insights.
from libssh2.
Regarding 2.
I added some code that avoids small packets in the following commit: 85dbd4c
So the problem with tiny packets causing slowdowns when the buffer isn't a multiple of MAX_SFTP_READ_SIZE shouldn't happen anymore when reading.
from libssh2.
85dbd4c
Hm, why not simply make "ceil(count / MAX_SFTP_READ_SIZE)" number of request, each requesting "MAX_SFTP_READ_SIZE" bytes? The new code using "size" still has loop holes, e.g. when using buffer_size smaller than MAX_SFTP_READ_SIZE.
from libssh2.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from libssh2.
The ticket was automatically closed, but the problem -- libssh2_sftp_write()
being slow -- remains, even with the latest 1.10.0 version (I'm using FreeBSD-11 to send).
Not only is the semantics of the function, unfortunately, more like that of write(2)
, than fwrite(3)
-- returning partial writes for bigger buffers instead of looping internally -- the actual throughput is a lot lower than that of the OpenSSH's sftp
-client.
A single-threaded uploading to localhost
, for example, gets me 11Mb/s at most -- whereas sftp
averages about 80Mb/s on the same machine.
Even if the more complex code of non-blocking writing doubles the throughput, it'll still be subpar.
Is this -- SFTP-uploads -- something, the developers are benchmarking regularly?
from libssh2.
IIRC SFTP download implements a pipelined read while write doesn't pipeline uploads which is the speed difference compared to other clients. This can be pipelined, but someone has to do the work. We are always happy to review PRs.
from libssh2.
Related Issues (20)
- I am trying to compile libssh2 as a static library with openSSL 3 but I am getting a of LNK errors in WINDOWS with cmake. HOT 2
- Add support for "strict KEX" protocol extension HOT 1
- Release request (terrapin) HOT 1
- Make a new release to include fix for CVE-2023-48795 HOT 1
- libssh2 1.11.1 release? (with CVE-2023-48795 fix)
- Encryption failure during handshake when using libssh2 and wolfssl HOT 7
- How can I get more descriptive error messages?
- ssh from docker container on arm64 macos ventura to same mac (docker host) fails, ERROR: SSH handshake failed. HOT 1
- (question) when is the terrapin fix going to be released? HOT 1
- libssh2 in PHP: how can I check the supported ciphers and mac algorithms HOT 1
- compilation error with cmake, without passing -DENABLE_ZLIB_COMPRESSION=ON HOT 2
- Unused code setting channel ignore mode HOT 3
- After running this code, the memory usage continuously spikes. What could be the reason? libssh2-1.10.0 HOT 9
- KEX extension indicators are lost in libssh2_session_method_pref() HOT 3
- libssh2 tests are failing HOT 1
- Encrypt-then-MAC feature should be tested in remote end's configuration when receiving data
- Fix AIX build HOT 1
- SFTP failed with the error -41 working with Openssl HOT 9
- libssh2_session_handshake() hangs HOT 3
- libssh2_session_handshake LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libssh2.