[pull] master from nextcloud:master - #1489
Merged
Merged
Conversation
SFTPWriteStream sent a single SSH_FXP_WRITE packet and then blocked on its acknowledgement before sending the next one. That made every write a full round trip, and on low-latency links it additionally triggered a write-then-read (Nagle / delayed-ACK) stall, capping throughput at ~2 MB/s. Mirror phpseclib's SFTP::put() instead: send WRITE packets sized to the negotiated maximum without waiting for each acknowledgement, and drain the acknowledgements in batches (at NET_SFTP_UPLOAD_QUEUE_SIZE, and on flush / close). Throughput becomes bandwidth-bound instead of round-trip-bound. This also fixes a latent issue where the entire flush buffer was sent as a single SSH_FXP_WRITE that could exceed the negotiated maximum packet size. Write throughput, 8 KiB stream chunks, OpenSSH sftp-server (indicative, custom read stream and reads are unchanged as they were already pipelined): | delay | file size | before (sync) | after (pipelined) | phpseclib sftp:// | --------|-----------|---------------|-------------------|-------------------| | LAN | 1 MB | 1.8 MB/s | 307 MB/s | 28 MB/s | | LAN | 8 MB | 1.9 MB/s | 332 MB/s | 38 MB/s | | LAN | 32 MB | 1.9 MB/s | 337 MB/s | 37 MB/s | | ~20ms | 1 MB | 1.3 MB/s | 6.3 MB/s | 0.24 MB/s | | ~20ms | 8 MB | 1.7 MB/s | 20.8 MB/s | 0.24 MB/s | Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
Signed-off-by: provokateurin <kate@provokateurin.de>
refactor(Sharing): Move from OCP to NCU
perf(files_external): pipeline SFTP stream writes
Fixes #61955 Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
fix(encryption): bind personal private key password inputs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )