mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
mdbx: relax a bit merge limit (still leave it stronger than default) (#786)
This commit is contained in:
parent
199a9c890d
commit
3b68fec09a
@ -74,7 +74,7 @@ func NewMDBX(log log.Logger) MdbxOpts {
|
|||||||
pageSize: kv.DefaultPageSize(),
|
pageSize: kv.DefaultPageSize(),
|
||||||
dirtySpace: 2 * (memory.TotalMemory() / 42),
|
dirtySpace: 2 * (memory.TotalMemory() / 42),
|
||||||
growthStep: 2 * datasize.GB,
|
growthStep: 2 * datasize.GB,
|
||||||
mergeThreshold: 32768,
|
mergeThreshold: 3 * 8192,
|
||||||
}
|
}
|
||||||
return opts
|
return opts
|
||||||
}
|
}
|
||||||
@ -192,9 +192,6 @@ func (opts MdbxOpts) Open() (kv.RwDB, error) {
|
|||||||
if dbg.MergeTr() > 0 {
|
if dbg.MergeTr() > 0 {
|
||||||
opts = opts.WriteMergeThreshold(uint64(dbg.MergeTr() * 8192)) //nolint
|
opts = opts.WriteMergeThreshold(uint64(dbg.MergeTr() * 8192)) //nolint
|
||||||
}
|
}
|
||||||
if dbg.MergeTr() > 0 {
|
|
||||||
opts = opts.WriteMergeThreshold(uint64(dbg.MergeTr() * 8192)) //nolint
|
|
||||||
}
|
|
||||||
if dbg.MdbxReadAhead() {
|
if dbg.MdbxReadAhead() {
|
||||||
opts = opts.Flags(func(u uint) uint { return u &^ mdbx.NoReadahead }) //nolint
|
opts = opts.Flags(func(u uint) uint { return u &^ mdbx.NoReadahead }) //nolint
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user