Skip to content
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

SftpClient: DowloadFile does not perform well on Sun SSH #292

Closed
drieseng opened this issue Aug 29, 2017 · 0 comments
Closed

SftpClient: DowloadFile does not perform well on Sun SSH #292

drieseng opened this issue Aug 29, 2017 · 0 comments
Assignees

Comments

@drieseng
Copy link
Member

drieseng commented Aug 29, 2017

While I'm seeing throughput increases of up to 50% when used with OpenSSH, the switch to a read-ahead mechanism actually regressed the throughput with Sun SSH (1.1.5).

There appear to be two causes for this:

  • Sun's SSH implementation does not seem to enjoy receiving a SSH_FXP_OPEN and a SSH_FXP_LSTAT request for a given file at the same time.
  • We performing async read-aheads until we've received a zero-length response (signaling EOF).
    This means that we risk having a few SSH_FXP_READ requests with an offset beyond EOF.
    This causes Sun SSH to take a brief moment of reflection.
@drieseng drieseng added this to the 2016.1.0-beta3 milestone Aug 29, 2017
@drieseng drieseng self-assigned this Aug 29, 2017
drieseng added a commit that referenced this issue Sep 15, 2017
…e file as this causes a performance degradation on Sun SSH.

Switch to a single (sync) read-ahead if the file size is known, and we're starting to read (ahead) past that file size.
Harden against exceptions closing the file handle in Dispose

Fixes issue #292.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant