crank up blockstore max readers to 16K, reduce retry delays to 10us
This commit is contained in:
parent
95befa1e41
commit
f6c930d0aa
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user