mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
mdbx: reduce 2 times hard dplimit (#9216)
can do it, because we don't do read-after-write in same rwtx
This commit is contained in:
parent
3bb1917e8a
commit
e806db977f
@ -326,8 +326,8 @@ func (opts MdbxOpts) Open(ctx context.Context) (kv.RwDB, error) {
|
|||||||
} else {
|
} else {
|
||||||
dirtySpace = mmap.TotalMemory() / 42 // it's default of mdbx, but our package also supports cgroups and GOMEMLIMIT
|
dirtySpace = mmap.TotalMemory() / 42 // it's default of mdbx, but our package also supports cgroups and GOMEMLIMIT
|
||||||
// clamp to max size
|
// clamp to max size
|
||||||
const dirtySpaceMaxChainDB = uint64(2 * datasize.GB)
|
const dirtySpaceMaxChainDB = uint64(1 * datasize.GB)
|
||||||
const dirtySpaceMaxDefault = uint64(256 * datasize.MB)
|
const dirtySpaceMaxDefault = uint64(128 * datasize.MB)
|
||||||
|
|
||||||
if opts.label == kv.ChainDB && dirtySpace > dirtySpaceMaxChainDB {
|
if opts.label == kv.ChainDB && dirtySpace > dirtySpaceMaxChainDB {
|
||||||
dirtySpace = dirtySpaceMaxChainDB
|
dirtySpace = dirtySpaceMaxChainDB
|
||||||
|
Loading…
Reference in New Issue
Block a user