From 7d74686698d95718246070ee4708d0594c06d2c9 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 30 Aug 2018 17:24:08 +0100 Subject: [PATCH] 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 --- fs/accounting/token_bucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/accounting/token_bucket.go b/fs/accounting/token_bucket.go index 124deda70..e71091ecf 100644 --- a/fs/accounting/token_bucket.go +++ b/fs/accounting/token_bucket.go @@ -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 {