fs/accounting: increase maximum burst size of token bucket

This stops occasional errors when using --bwlimit which look like this

    Token bucket error: rate: Wait(n=2255475) exceeds limiter's burst 2097152
This commit is contained in:
Nick Craig-Wood 2018-08-30 17:24:08 +01:00
parent 2d7c5ebc7a
commit 7d74686698

View File

@ -21,7 +21,7 @@ var (
currLimit fs.BwTimeSlot
)
const maxBurstSize = 1 * 1024 * 1024 // must be bigger than the biggest request
const maxBurstSize = 4 * 1024 * 1024 // must be bigger than the biggest request
// make a new empty token bucket with the bandwidth given
func newTokenBucket(bandwidth fs.SizeSuffix) *rate.Limiter {