Skip to content

Commit 794dd17

Browse files
committed
Increase min read size
1 parent 6a5cf7a commit 794dd17

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/storage/bucket/rate_limited_reader.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ import (
1616

1717
// minReadSize is the minimum chunk size for reading data.
1818
// This ensures we read in reasonable-sized batches rather than very small ones.
19-
const minReadSize = 512
19+
// For typical 1-2MB objects (most of our chunks), 64KB provides a good balance between efficiency
20+
// and rate limiting responsiveness.
21+
// E.g. for 2MB object, 64KB read size is 32 reads, which is reasonable.
22+
const minReadSize = 64 * 1024 // 64KB
2023

2124
type rateLimiterKey struct{}
2225

0 commit comments

Comments
 (0)