crank up blockstore max readers to 16K, reduce retry delays to 10us

This commit is contained in:
vyzo
2021-03-05 14:46:17 +02:00
parent 95befa1e41
commit f6c930d0aa
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ func withMaxReadersRetry(f func() error) error {
retry:
err := f()
if err != nil && lmdb.IsErrno(err, lmdb.ReadersFull) {
dt := time.Microsecond + time.Duration(rand.Intn(int(time.Millisecond)))
dt := time.Microsecond + time.Duration(rand.Intn(int(10*time.Microsecond)))
log.Debugf("MDB_READERS_FULL; retrying operation in %s", dt)
time.Sleep(dt)
goto retry
+2 -1
View File
@@ -65,7 +65,8 @@ func NewSplitStore(path string, ds dstore.Datastore, cold bstore.Blockstore) (*S
InitialMmapSize: 4 << 30, // 4GiB.
MmapGrowthStepFactor: 1.25, // scale slower than the default of 1.5
MmapGrowthStepMax: 4 << 30, // 4GiB
RetryDelay: time.Millisecond,
RetryDelay: 10 * time.Microsecond,
MaxReaders: 16384,
})
if err != nil {
return nil, err