From 331702cd951e83e144cc2dd37bbb1c5e8c0dbcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 26 Nov 2021 18:49:41 +0100 Subject: [PATCH] Tweak MaxPieceReaderBurnBytes --- markets/dagstore/piecereader.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/markets/dagstore/piecereader.go b/markets/dagstore/piecereader.go index 9b09c50cf..2f6f6fef0 100644 --- a/markets/dagstore/piecereader.go +++ b/markets/dagstore/piecereader.go @@ -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