Tweak MaxPieceReaderBurnBytes

This commit is contained in:
Łukasz Magiera 2021-11-26 18:49:41 +01:00
parent 743ce5a40f
commit 331702cd95

View File

@ -11,9 +11,9 @@ import (
"github.com/filecoin-project/go-state-types/abi"
)
// for small read skips, it's faster to "burn" some bytes than to setup new
// sector reader
var MaxPieceReaderBurnBytes int64 = 512 << 10 // 512k
// For small read skips, it's faster to "burn" some bytes than to setup new sector reader.
// Assuming 1ms stream seek latency, and 1G/s stream rate, we're willing to discard up to 1 MiB.
var MaxPieceReaderBurnBytes int64 = 1 << 20 // 1M
type pieceReader struct {
ctx context.Context