feat: change dfdaemon rate limit (#1661)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2022-09-07 20:06:52 +08:00
parent 15d35b1464
commit 3764af25f3
No known key found for this signature in database
GPG Key ID: 8B4E5D1290FA2FFB
6 changed files with 18 additions and 18 deletions

View File

@ -45,9 +45,9 @@ host:
# download service option
download:
# total download limit per second
totalRateLimit: 200Mi
totalRateLimit: 1024Mi
# per peer task download limit per second
perPeerRateLimit: 20Mi
perPeerRateLimit: 512Mi
# download grpc option
downloadGRPC:
# security option
@ -79,7 +79,7 @@ download:
# upload service option
upload:
# upload limit per second
rateLimit: 200Mi
rateLimit: 1024Mi
security:
insecure: true
cacert: ""

View File

@ -47,9 +47,9 @@ const (
// Download limit.
const (
DefaultPerPeerDownloadLimit = 20 * unit.MB
DefaultTotalDownloadLimit = 100 * unit.MB
DefaultUploadLimit = 100 * unit.MB
DefaultPerPeerDownloadLimit = 512 * unit.MB
DefaultTotalDownloadLimit = 1024 * unit.MB
DefaultUploadLimit = 1024 * unit.MB
DefaultMinRate = 20 * unit.MB
)

View File

@ -294,10 +294,10 @@ func TestPeerHostOption_Load(t *testing.T) {
Download: DownloadOption{
DefaultPattern: PatternP2P,
TotalRateLimit: util.RateLimit{
Limit: 209715200,
Limit: 1024 * 1024 * 1024,
},
PerPeerRateLimit: util.RateLimit{
Limit: 20971520,
Limit: 512 * 1024 * 1024,
},
PieceDownloadTimeout: 30 * time.Second,
DownloadGRPC: ListenOption{
@ -357,7 +357,7 @@ func TestPeerHostOption_Load(t *testing.T) {
},
Upload: UploadOption{
RateLimit: util.RateLimit{
Limit: 104857600,
Limit: 1024 * 1024 * 1024,
},
ListenOption: ListenOption{
Security: SecurityOption{

View File

@ -43,8 +43,8 @@ download:
calculateDigest: true
defaultPattern: p2p
pieceDownloadTimeout: 30s
totalRateLimit: 200Mi
perPeerRateLimit: 20Mi
totalRateLimit: 1024Mi
perPeerRateLimit: 512Mi
downloadGRPC:
security:
insecure: true
@ -85,7 +85,7 @@ download:
maxBackoff: 1
maxAttempts: 1
upload:
rateLimit: 100Mi
rateLimit: 1024Mi
security:
insecure: true
caCert: ./testdata/certs/ca.crt

View File

@ -94,9 +94,9 @@ download:
# calculate digest when transfer files, set false to save memory
calculateDigest: true
# total download limit per second
totalRateLimit: 200Mi
totalRateLimit: 1024Mi
# per peer task download limit per second
perPeerRateLimit: 100Mi
perPeerRateLimit: 512Mi
# download piece timeout
pieceDownloadTimeout: 30s
# golang transport option
@ -152,7 +152,7 @@ download:
# upload service option
upload:
# upload limit per second
rateLimit: 100Mi
rateLimit: 1024Mi
security:
insecure: true
cacert: ""

View File

@ -39,14 +39,14 @@ data:
tcpListen:
listen: 0.0.0.0
port: 65000
perPeerRateLimit: 100Mi
totalRateLimit: 200Mi
perPeerRateLimit: 512Mi
totalRateLimit: 1024Mi
concurrent:
thresholdSize: 10M
thresholdSpeed: 2M
goroutineCount: 4
upload:
rateLimit: 100Mi
rateLimit: 1024Mi
security:
insecure: true
tcpListen: