Dragonfly2 icon indicating copy to clipboard operation
Dragonfly2 copied to clipboard

upload total rateLimit

Open hyy0322 opened this issue 3 years ago • 1 comments

Feature request:

Currently peer upload rate limit for per peer. In some case, we need to limit total upload rate for one peer download by other peers .

Use case:

UI Example:

hyy0322 avatar Aug 11 '22 09:08 hyy0322

Hi @hyy0322 , I think now what we have is the total rateLimit just like you said. All download requests from other peers will be handled by *uploadManager.getDownload() function in which they will go through the same rate limiter *uploadManager.Limiter regardless of their peerID, you can refer to code below: https://github.com/dragonflyoss/Dragonfly2/blob/fbb6f1d081b4860760640cf345d0286c8b9c51f9/client/daemon/upload/upload_manager.go#L220-L226

greenhandatsjtu avatar Aug 11 '22 10:08 greenhandatsjtu

You can use upload ratelimit in dfget.yaml, refer to https://d7y.io/docs/reference/configuration/dfdaemon.

Ratelimit is 1 MiB: image

Ratelimit is 2 MiB: image

Ratelimit is 3 MiB: image

gaius-qi avatar Aug 18 '22 14:08 gaius-qi