Skip to content

Make the CPU eviction order configurable - #937

Merged
sduchesneau merged 2 commits into
developfrom
feature/eviction-order
Sep 16, 2026
Merged

sduchesneau merged 2 commits into
developfrom
feature/eviction-order

Conversation

@sduchesneau

@sduchesneau sduchesneau commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Adds EvictorConfig.Order, the list of request classes eviction may cancel, least important first (ParseEvictionOrder("dev,prod-cached,prod-catchup")). A class left out is never cancelled. The default is dev,prod-cached,prod-catchup, so live production requests are no longer cancelled unless prod-live is added to the order.

New class prod-cached: a production request that has not processed a block on tier1 yet, meaning it only streams outputs cached by tier2. It runs no wasm on tier1, so:

  • MinBurnCores does not apply to it (MinAge still does).
  • Its CPU cost is unknown, so a round of eviction stops right after cancelling one. The next round, after Cooldown, measures what it freed.

Within a class, requests are still cut highest burn first, now with oldest first on a tie (which is the only ordering among prod-cached requests).

dev-only mode still restricts eviction to dev, whatever the order says.

The --substreams-tier1-cpu-eviction-order flag has to be added in firehose-core.

Adds a prod-cached class for requests that only stream cached outputs, so they can be evicted without a wasm burn rate.
@dfuse-bot

dfuse-bot commented Sep 15, 2026

Copy link
Copy Markdown

🔍 Vulnerabilities of ghcr.io/streamingfast/substreams:ce3bfeb

📦 Image Reference ghcr.io/streamingfast/substreams:ce3bfeb
digestsha256:2d3fe4d100d4f234ab406084704c7dcc86f4490d1e1a077ffb28d18ff5e31e66
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size122 MB
packages380
📦 Base Image ubuntu:24.04
also known as
  • noble
  • noble-20260905
digestsha256:a61567bd31828687156d735ea8eb01ba4e37636e225dd6a48ba94136a70d9d61
vulnerabilitiescritical: 0 high: 0 medium: 13 low: 2

@sduchesneau
sduchesneau requested a review from maoueh September 15, 2026 21:05
@sduchesneau
sduchesneau marked this pull request as ready for review September 15, 2026 21:06
@sduchesneau
sduchesneau merged commit 00f266e into develop Sep 16, 2026
11 checks passed
@sduchesneau
sduchesneau deleted the feature/eviction-order branch September 16, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants