mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 11:41:19 +00:00
estimate: less ram for indexing (#8911)
This commit is contained in:
parent
96bb5ddb81
commit
e11e374f8b
@ -22,9 +22,15 @@ func (r estimatedRamPerWorker) WorkersHalf() int { return cmp.Max(1, r.Worker
|
|||||||
func (r estimatedRamPerWorker) WorkersQuarter() int { return cmp.Max(1, r.Workers()/4) }
|
func (r estimatedRamPerWorker) WorkersQuarter() int { return cmp.Max(1, r.Workers()/4) }
|
||||||
|
|
||||||
const (
|
const (
|
||||||
IndexSnapshot = estimatedRamPerWorker(3 * datasize.GB) //elias-fano index building is single-threaded
|
//elias-fano index building is single-threaded
|
||||||
CompressSnapshot = estimatedRamPerWorker(1 * datasize.GB) //1-file-compression is multi-threaded
|
// when set it to 3GB - observed OOM-kil at server with 128Gb ram and 32CPU
|
||||||
ReconstituteState = estimatedRamPerWorker(512 * datasize.MB) //state-reconstitution is multi-threaded
|
IndexSnapshot = estimatedRamPerWorker(4 * datasize.GB)
|
||||||
|
|
||||||
|
//1-file-compression is multi-threaded
|
||||||
|
CompressSnapshot = estimatedRamPerWorker(1 * datasize.GB)
|
||||||
|
|
||||||
|
//state-reconstitution is multi-threaded
|
||||||
|
ReconstituteState = estimatedRamPerWorker(512 * datasize.MB)
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlmostAllCPUs - return all-but-one cpus. Leaving 1 cpu for "work producer", also cloud-providers do recommend leave 1 CPU for their IO software
|
// AlmostAllCPUs - return all-but-one cpus. Leaving 1 cpu for "work producer", also cloud-providers do recommend leave 1 CPU for their IO software
|
||||||
|
Loading…
Reference in New Issue
Block a user