e3: reduce reconstitute ram estimation (#5848)

This commit is contained in:
Alex Sharov 2022-10-23 18:49:57 +07:00 committed by GitHub
parent 96233cfa7f
commit a1e21260ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -23,5 +23,5 @@ func (r estimatedRamPerWorker) Workers() int {
const (
IndexSnapshot = estimatedRamPerWorker(2 * datasize.GB) //elias-fano index building is single-threaded
CompressSnapshot = estimatedRamPerWorker(1 * datasize.GB) //1-file-compression is multi-threaded
ReconstituteState = estimatedRamPerWorker(4 * datasize.GB) //state-reconstitution is multi-threaded
ReconstituteState = estimatedRamPerWorker(2 * datasize.GB) //state-reconstitution is multi-threaded
)

View File

@ -57,7 +57,7 @@ func (p *Progress) Log(logPrefix string, rs *state.State22, rws state.TxTaskQueu
currentTime := time.Now()
interval := currentTime.Sub(p.prevTime)
speedTx := float64(count-p.prevCount) / (float64(interval) / float64(time.Second))
speedBlock := float64(outputBlockNum-p.prevOutputBlockNum) / (float64(interval) / float64(time.Second))
//speedBlock := float64(outputBlockNum-p.prevOutputBlockNum) / (float64(interval) / float64(time.Second))
var repeatRatio float64
if count > p.prevCount {
repeatRatio = 100.0 * float64(repeatCount-p.prevRepeatCount) / float64(count-p.prevCount)
@ -66,7 +66,7 @@ func (p *Progress) Log(logPrefix string, rs *state.State22, rws state.TxTaskQueu
//"workers", workerCount,
"at blk", outputBlockNum,
"input blk", atomic.LoadUint64(&inputBlockNum),
"blk/s", fmt.Sprintf("%.1f", speedBlock),
//"blk/s", fmt.Sprintf("%.1f", speedBlock),
"tx/s", fmt.Sprintf("%.1f", speedTx),
"resultCh", fmt.Sprintf("%d/%d", len(resultCh), cap(resultCh)),
"resultQueue", fmt.Sprintf("%d/%d", rws.Len(), queueSize),