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

Add FTP maximum limit for concurrent transfers #764

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

kostirez1
Copy link
Contributor

This pull request implements global limit for concurrent FTP transfers. For now, limits are hardcoded, but could become user configurable in the future. This also doesn't impose limit on control connections itself - it's possible to issue non RETR/STOR commands even if the limit has been reached.

MAX_TRANSFERS = 2 seems to be a good tradeoff between large amount of small files speed and small amount of large files, as there isn't an infinite HDD throughput anyways - large transfers have to compete for resources on system calls.

Transfers that are over the MAX_TRANSFERS stay in a queue until either:

  1. Files being currently transfered finish and create an empty space
  2. 15 seconds pass and the client is told to retry later

(Part of #760 FTP improvements.)

@aldostools aldostools merged commit cd55216 into aldostools:master Aug 18, 2022
aldostools added a commit that referenced this pull request Aug 18, 2022
- Compiled binaries for pull-request #764 submitted by @kostirez1
- Fixed compilation errors in ftp.h
@kostirez1 kostirez1 deleted the add_transfer_limit branch September 8, 2022 16:08
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