Skip to content

SFTP Speed#488

Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
ejohnstown:sftp-speed
Jan 20, 2023
Merged

SFTP Speed#488
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
ejohnstown:sftp-speed

Conversation

@ejohnstown
Copy link
Copy Markdown
Contributor

Improve the througput of SFTP. Clients will request a particular size chunk of a file at a time. Most clients are flexible with receiving less than requested. But, sending 1kiB at a time requires many times more messages, encryptions, and transmits than when sending a larger block. One particular client requests 32kiB blocks, always, and expects to get 32kiB at a time. This changes the amount buffered to 32kiB. You can change the value smaller, but may have issues with some clients.

Testing using Windows on VmWare as the client and the echoserver running on the macOS host machine.

1. Improve the througput of SFTP. Clients will request a particular size
   chunk of a file at a time. Most clients are flexible with receiving less
   than requested. But, sending 1kiB at a time requires many times more
   messages, encryptions, and transmits than when sending a larger block.
   One particular client requests 32kiB blocks, always, and expects to get
   32kiB at a time. This changes the amount buffered to 32kiB. You can
   change the value smaller, but may have issues with some clients.
2. The loop on SFTP write needs to take into account WANT_READ while
   trying to write to the client. If it doesn't try again, it'll return
   and lose part of the data causing other issues.
@JacobBarthelmeh JacobBarthelmeh merged commit 4a24202 into wolfSSL:master Jan 20, 2023
@ejohnstown ejohnstown deleted the sftp-speed branch January 21, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants