Skip to content

Add FTP maximum limit for concurrent transfers#764

Merged
aldostools merged 1 commit intoaldostools:masterfrom
kostirez1:add_transfer_limit
Aug 18, 2022
Merged

Add FTP maximum limit for concurrent transfers#764
aldostools merged 1 commit intoaldostools:masterfrom
kostirez1:add_transfer_limit

Conversation

@kostirez1
Copy link
Copy Markdown
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