Skip to content

feat(engine): backpressure#23244

Closed
pepyakin wants to merge 5 commits into
mainfrom
pep/backpressure
Closed

feat(engine): backpressure#23244
pepyakin wants to merge 5 commits into
mainfrom
pep/backpressure

Conversation

@pepyakin
Copy link
Copy Markdown
Member

No description provided.

@pepyakin
Copy link
Copy Markdown
Member Author

derek bench blocks=big otlp=false

@decofe
Copy link
Copy Markdown
Member

decofe commented Mar 26, 2026

cc @pepyakin

❌ Benchmark failed while running baseline benchmark (1/2). View logs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 26, 2026

⚠️ Changelog not found.

A changelog entry is required before merging. We've generated a suggested changelog based on your changes:

Preview
---
reth-engine-primitives: minor
reth-engine-tree: minor
reth-bench: minor
---

Added persistence backpressure to the engine tree: when the canonical-minus-persisted block gap reaches a configurable threshold (`DEFAULT_PERSISTENCE_BACKPRESSURE_THRESHOLD = 16`), incoming beacon messages (newPayload, forkchoiceUpdated) are stashed and processing stalls until persistence catches up. Added `backpressure_wait` timing to `NewPayloadTimings` and bench output so the wait is visible in metrics and benchmark CSV results.

Add changelog to commit this to your branch.

@pepyakin
Copy link
Copy Markdown
Member Author

derek bench

@decofe
Copy link
Copy Markdown
Member

decofe commented Mar 26, 2026

cc @pepyakin

✅ Benchmark complete! View job

Benchmark Results

⚠️ Feature is 5 commits behind main. Consider rebasing for accurate results.

Metric main pep/backpressure Change
Mean 22.95ms 23.15ms +0.85% ❌ (±0.51%)
StdDev 13.38ms 13.98ms
P50 20.32ms 20.52ms +0.95% ⚪ (±1.24%)
P90 34.24ms 34.33ms +0.25% ⚪ (±1.89%)
P99 81.04ms 81.47ms +0.53% ⚪ (±7.32%)
Mgas/s 1382.06 1378.09 -0.29% ⚪ (±0.41%)
Wall Clock 23.64s 23.84s +0.85% ❌ (±0.53%)

500 blocks

Wait Time Breakdown

Persistence Wait

Metric main pep/backpressure
Mean 65.59ms 66.31ms
P50 0.00ms 0.00ms
P95 257.63ms 258.38ms

Trie Cache Update Wait

Metric main pep/backpressure
Mean 0.13ms 0.11ms
P50 0.00ms 0.00ms
P95 0.60ms 0.58ms

Execution Cache Update Wait

Metric main pep/backpressure
Mean 0.00ms 0.00ms
P50 0.00ms 0.00ms
P95 0.00ms 0.00ms

Grafana Dashboard

Charts

Latency, Throughput & Diff

Latency, Throughput & Diff

Wait Time Breakdown

Wait Time Breakdown

Gas vs Latency

Gas vs Latency

Grafana Dashboard

View real-time metrics

@pepyakin
Copy link
Copy Markdown
Member Author

derek bench

@decofe
Copy link
Copy Markdown
Member

decofe commented Mar 26, 2026

cc @pepyakin

✅ Benchmark complete! View job

Benchmark Results

Metric main pep/backpressure Change
Mean 22.90ms 22.89ms -0.05% ⚪ (±0.35%)
StdDev 13.39ms 13.34ms
P50 20.46ms 20.37ms -0.47% ⚪ (±1.23%)
P90 34.71ms 34.56ms -0.45% ⚪ (±2.24%)
P99 77.44ms 76.86ms -0.75% ⚪ (±3.85%)
Mgas/s 1385.81 1385.14 -0.05% ⚪ (±0.42%)
Wall Clock 23.61s 23.59s -0.09% ⚪ (±0.39%)

500 blocks

Wait Time Breakdown

Persistence Wait

Metric main pep/backpressure
Mean 64.27ms 64.11ms
P50 0.00ms 0.00ms
P95 252.24ms 250.79ms

Trie Cache Update Wait

Metric main pep/backpressure
Mean 0.10ms 0.10ms
P50 0.00ms 0.00ms
P95 0.54ms 0.50ms

Execution Cache Update Wait

Metric main pep/backpressure
Mean 0.00ms 0.00ms
P50 0.00ms 0.00ms
P95 0.00ms 0.00ms

Grafana Dashboard

Charts

Latency, Throughput & Diff

Latency, Throughput & Diff

Wait Time Breakdown

Wait Time Breakdown

Gas vs Latency

Gas vs Latency

Grafana Dashboard

View real-time metrics

@decofe
Copy link
Copy Markdown
Member

decofe commented Mar 26, 2026

cc @pepyakin

✅ Benchmark complete! View job

Benchmark Results

Metric main pep/backpressure Change
Mean 473.50ms 470.21ms -0.70% ✅ (±0.37%)
StdDev 200.59ms 199.32ms
P50 500.59ms 498.76ms -0.37% ⚪ (±1.86%)
P90 672.13ms 667.74ms -0.65% ⚪ (±1.54%)
P99 949.53ms 945.80ms -0.39% ⚪ (±1.13%)
Mgas/s 2030.91 2048.31 +0.86% ✅ (±0.49%)
Wall Clock 41.06s 40.77s -0.71% ✅ (±0.37%)

43 big blocks

Wait Time Breakdown

Persistence Wait

Metric main pep/backpressure
Mean 517.54ms 517.96ms
P50 0.00ms 0.00ms
P95 1927.80ms 1929.22ms

Trie Cache Update Wait

Metric main pep/backpressure
Mean 0.00ms 0.00ms
P50 0.00ms 0.00ms
P95 0.00ms 0.00ms

Execution Cache Update Wait

Metric main pep/backpressure
Mean 0.00ms 0.00ms
P50 0.00ms 0.00ms
P95 0.00ms 0.00ms

Grafana Dashboard

Charts

Latency, Throughput & Diff

Latency, Throughput & Diff

Wait Time Breakdown

Wait Time Breakdown

Gas vs Latency

Gas vs Latency

Grafana Dashboard

View real-time metrics

let safe_hash = B256::random();
let finalized_hash = B256::random();
let non_matching_hash = B256::random();
let head_hash = B256::with_last_byte(1);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was this about?

}
}

#[cfg(test)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: let's just remove the cfg(test) and not have two methods

@github-project-automation github-project-automation Bot moved this from Backlog to In Progress in Reth Tracker Mar 27, 2026
@pepyakin pepyakin closed this Mar 30, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Reth Tracker Mar 30, 2026
@pepyakin
Copy link
Copy Markdown
Member Author

superseded by #23280

@emmajam emmajam deleted the pep/backpressure branch May 1, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants