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

Limit concurrent operations for local / sftp backend #3475

Merged
merged 3 commits into from
Apr 9, 2022

Conversation

MichaelEischer
Copy link
Member

What does this PR change? What problem does it solve?

Currently, the local and sftp backend are the only ones which do not limit the number of concurrent operations.
This PR adds a Connections parameter for both backends along with the corresponding limits.

Even though Connections sounds unusual for the local backend, I've kept the name for consistency with the other backends.

Was the change previously discussed in an issue or on the forum?

Partially related to #322 and #2679

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • [ ] I have added tests for all code changes. The backends already have a good test coverage.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I have run gofmt on the code in all commits.
  • All commit messages are formatted in the same style as the other commits in the repo.
  • I'm done! This pull request is ready for review.

Copy link
Member

@fd0 fd0 left a comment

Choose a reason for hiding this comment

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

LGTM, just one question: why is the number of concurrent operations for the local backend 2, but for the sftp backend 5?

@fd0 fd0 merged commit 04e0544 into restic:master Apr 9, 2022
@MichaelEischer
Copy link
Member Author

For the local backend the number is essentially the same as the default from the archiver while reading data. SFTP usually has higher IO latency than a local backend so I've chosen a larger number of connections there. The value 5 is just the number that is also used for all other backends.

@MichaelEischer MichaelEischer deleted the local-sftp-conn-limit branch April 9, 2022 19:59
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.

Globally limit concurrent access to files in the repo
2 participants