Skip to content

Commit 93cef94

Browse files
evn flag to: don't merge Hist/II but still merge Domains (#19438)
Run with `NO_MERGE_HISTORY=true`: `11.1blk/sec -> 14.3blk/sec` (measured at 12M block range) `NO_MERGE_HISTORY=1 COMPRESS_WORKERS=15 MERGE_WORKERS=1 COLLATE_WORKERS=4` Reason is unclear: - maybe it's because of less domain files - maybe it's because of less impact of merge to exec will do one more experiment to understand: #19441 <img width="364" height="886" alt="Screenshot 2026-02-24 at 14 31 52" src="https://github.com/user-attachments/assets/3180c708-8851-4a48-a6a7-78ca54bd552c" />
1 parent 54203f3 commit 93cef94

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

common/dbg/experiments.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ var (
5656

5757
//state v3
5858
noPrune = EnvBool("NO_PRUNE", false)
59-
noMerge = EnvBool("NO_MERGE", false)
59+
noMerge = EnvBool("NO_MERGE", false) // don't merge Domain/Hist/II
60+
noMergeHistory = EnvBool("NO_MERGE_HISTORY", false) // don't merge Hist/II but still merge Domain
6061
discardCommitment = EnvBool("DISCARD_COMMITMENT", false)
6162
pruneTotalDifficulty = EnvBool("PRUNE_TOTAL_DIFFICULTY", true)
6263

@@ -120,6 +121,7 @@ func ReadMemStats(m *runtime.MemStats) {
120121
func DiscardCommitment() bool { return discardCommitment }
121122
func NoPrune() bool { return noPrune }
122123
func NoMerge() bool { return noMerge }
124+
func NoMergeHistory() bool { return noMergeHistory }
123125
func PruneTotalDifficulty() bool { return pruneTotalDifficulty }
124126

125127
var (

db/state/merge.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ func (dt *DomainRoTx) findMergeRange(maxEndTxNum, maxSpan uint64) DomainRanges {
147147

148148
func (ht *HistoryRoTx) findMergeRange(maxEndTxNum, maxSpan uint64) HistoryRanges {
149149
var r HistoryRanges
150+
if dbg.NoMergeHistory() {
151+
return r
152+
}
153+
150154
mr := ht.iit.findMergeRange(maxEndTxNum, maxSpan)
151155
r.index = *mr
152156

0 commit comments

Comments
 (0)