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

feat(providers): improve performance of SFTP uploads #3235

Merged
merged 1 commit into from Aug 20, 2023

Conversation

jkowalski
Copy link
Contributor

This improves the performance of gather writes (p and q blobs) in particular on high-latency links by reducing round-trips.

Tested by uploading Kopia working directory
(3 GB, files:32157 dirs:6051) to SFTP server on LAN (TrueNAS) over WiFi:

Before: 2m4s (~24 MB/s)
After: 1m13s (~41 MB/s)

This improves the performance of gather writes (p and q blobs) in
particular on high-latency links by reducing round-trips.

Tested by uploading Kopia working directory
(3 GB, files:32157 dirs:6051) to SFTP server on LAN (TrueNAS) over WiFi:

Before: 2m4s (~24 MB/s)
After: 1m13s (~41 MB/s)
@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Patch coverage: 55.55% and project coverage change: +0.03% 🎉

Comparison is base (bb27e31) 75.38% compared to head (61812c4) 75.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3235      +/-   ##
==========================================
+ Coverage   75.38%   75.41%   +0.03%     
==========================================
  Files         459      459              
  Lines       36498    36506       +8     
==========================================
+ Hits        27514    27532      +18     
+ Misses       7064     7058       -6     
+ Partials     1920     1916       -4     
Files Changed Coverage Δ
repo/blob/sftp/sftp_storage.go 58.83% <42.85%> (-0.15%) ⬇️
internal/gather/gather_write_buffer.go 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jkowalski jkowalski enabled auto-merge (squash) August 20, 2023 00:48
@jkowalski jkowalski merged commit 7eca449 into kopia:master Aug 20, 2023
26 of 27 checks passed
defer contig.Close()

if _, err := data.WriteTo(contig); err != nil {
return errors.Wrap(err, "can't write to comtiguous buffer")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/comtiguous/contiguous/

@julio-lopez
Copy link
Collaborator

@jkowalski I do not understand (yet) where the overhead was coming from or what was causing the slowdown. Could you elaborate?

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.

None yet

2 participants