Documentation ¶
Index ¶
Constants ¶
View Source
const ( //elias-fano index building is single-threaded // when set it to 3GB - observed OOM-kil at server with 128Gb ram and 32CPU IndexSnapshot = EstimatedRamPerWorker(4 * datasize.GB) //1-file-compression is multi-threaded CompressSnapshot = EstimatedRamPerWorker(1 * datasize.GB) StateV3Collate = EstimatedRamPerWorker(5 * datasize.GB) //BlocksExecution - in multi-threaded mode BlocksExecution = EstimatedRamPerWorker(512 * datasize.MB) )
Variables ¶
This section is empty.
Functions ¶
func AlmostAllCPUs ¶
func AlmostAllCPUs() int
AlmostAllCPUs - return all-but-one cpus. Leaving 1 cpu for "work producer", also cloud-providers do recommend leave 1 CPU for their IO software user can reduce GOMAXPROCS env variable
Types ¶
type EstimatedRamPerWorker ¶
func (EstimatedRamPerWorker) Workers ¶
func (r EstimatedRamPerWorker) Workers() int
Workers - return max workers amount based on total Memory/CPU's and estimated RAM per worker
func (EstimatedRamPerWorker) WorkersByRAMOnly ¶
func (r EstimatedRamPerWorker) WorkersByRAMOnly() int
WorkersByRAMOnly - return max workers amount based on total Memory and estimated RAM per worker
func (EstimatedRamPerWorker) WorkersHalf ¶
func (r EstimatedRamPerWorker) WorkersHalf() int
func (EstimatedRamPerWorker) WorkersQuarter ¶
func (r EstimatedRamPerWorker) WorkersQuarter() int
Click to show internal directories.
Click to hide internal directories.