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 service option
download: download:
# total download limit per second # total download limit per second
totalRateLimit: 200Mi totalRateLimit: 1024Mi
# per peer task download limit per second # per peer task download limit per second
perPeerRateLimit: 20Mi perPeerRateLimit: 512Mi
# download grpc option # download grpc option
downloadGRPC: downloadGRPC:
# security option # security option
@ -79,7 +79,7 @@ download:
# upload service option # upload service option
upload: upload:
# upload limit per second # upload limit per second
rateLimit: 200Mi rateLimit: 1024Mi
security: security:
insecure: true insecure: true
cacert: "" cacert: ""

View File

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

View File

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

View File

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

View File

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

View File

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