Skip to content

snapshot, pool: use acquire_nolock to avoid CAS in snapin - #10589

Merged
mjain-jump merged 1 commit into
mainfrom
mjain/snapshot-acquire-unsafe
Jul 30, 2026
Merged

snapshot, pool: use acquire_nolock to avoid CAS in snapin#10589
mjain-jump merged 1 commit into
mainfrom
mjain/snapshot-acquire-unsafe

Conversation

@mjain-jump

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 29, 2026 20:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an optional non-atomic pool acquisition path to reduce snapshot-loading CAS overhead.

Changes:

  • Implements and tests acquire_nolock for parallel pools.
  • Uses the new API for snapshot account allocation.
  • Adds regression coverage for incremental snapshot retries and pool reuse.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/util/tmpl/fd_pool_para.c Adds optional non-atomic acquisition.
src/util/tmpl/test_pool_para.c Tests nolock pool behavior.
src/flamenco/accdb/fd_accdb_private.h Enables nolock acquisition for the account pool.
src/flamenco/accdb/fd_accdb.c Uses nolock acquisition during snapshot loading.
src/flamenco/accdb/fd_accdb.h Documents exclusive snapshot pool access.
src/flamenco/accdb/test_accdb.c Tests pool reuse across incremental retries.

@github-actions

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.05179 s 0.051932 s 0.274%
backtest mainnet-424669000-perf snapshot load 1.996 s 1.984 s -0.601%
backtest mainnet-424669000-perf total elapsed 67.119315 s 67.304451 s 0.276%
firedancer mem usage with mainnet.toml 317.86 GiB 317.86 GiB 0.000%

@github-actions

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.047952 s 0.048006 s 0.113%
backtest mainnet-424669000-perf snapshot load 1.895 s 1.882 s -0.686%
backtest mainnet-424669000-perf total elapsed 62.146094 s 62.215477 s 0.112%
firedancer mem usage with mainnet.toml 317.86 GiB 317.86 GiB 0.000%

Comment thread src/util/tmpl/fd_pool_para.c Outdated
Copilot AI review requested due to automatic review settings July 30, 2026 16:40
@mjain-jump
mjain-jump force-pushed the mjain/snapshot-acquire-unsafe branch 2 times, most recently from f51fb3c to 0bf1588 Compare July 30, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.048106 s 0.048076 s -0.062%
backtest mainnet-424669000-perf snapshot load 1.904 s 1.875 s -1.523%
backtest mainnet-424669000-perf total elapsed 62.345128 s 62.306676 s -0.062%
firedancer mem usage with mainnet.toml 317.86 GiB 317.86 GiB 0.000%

@mjain-jump
mjain-jump enabled auto-merge (squash) July 30, 2026 16:48
Copilot AI review requested due to automatic review settings July 30, 2026 22:17
@mjain-jump
mjain-jump force-pushed the mjain/snapshot-acquire-unsafe branch from 07ecc9f to 4c27db3 Compare July 30, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.047991 s 0.048033 s 0.088%
backtest mainnet-424669000-perf snapshot load 1.927 s 1.89 s -1.920%
backtest mainnet-424669000-perf total elapsed 62.196001 s 62.251216 s 0.089%
firedancer mem usage with mainnet.toml 317.86 GiB 317.86 GiB 0.000%

@mjain-jump
mjain-jump merged commit 3bd9670 into main Jul 30, 2026
17 checks passed
@mjain-jump
mjain-jump deleted the mjain/snapshot-acquire-unsafe branch July 30, 2026 22:29
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