Skip to content

Conversation

@ripatel-fd
Copy link
Contributor

@ripatel-fd ripatel-fd commented Nov 24, 2025

Updates Firedancer's snapshot load topology to run multiple Zstandard decompressor tiles in parallel, taking turns compressing frames produced by the writer in #7401.

This entirely eliminates the Zstandard bottleneck, decompressing a mainnet snapshot in 22 seconds with 16 threads on Zen 4.

@ripatel-fd ripatel-fd force-pushed the ripatel/snapdc-para branch 2 times, most recently from c23da83 to 30da3ff Compare November 24, 2025 23:47
@ripatel-fd ripatel-fd marked this pull request as ready for review November 24, 2025 23:47
@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.077134 s 0.077061 s -0.095%
backtest mainnet-368528500-perf snapshot load 4.843 s 3.105 s -35.887%
backtest mainnet-368528500-perf total elapsed 77.134314 s 77.061334 s -0.095%
firedancer mem usage with mainnet.toml 1001.23 GiB 1001.23 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.073968 s 0.074 s 0.043%
backtest mainnet-368528500-perf snapshot load 3.74 s 3.176 s -15.080%
backtest mainnet-368528500-perf total elapsed 73.968479 s 73.99998 s 0.043%
firedancer mem usage with mainnet.toml 1001.23 GiB 1001.23 GiB 0.000%

Ensures that our streaming Zstandard frame boundary detector
computes the same result as libzstd.
@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.07666 s 0.077271 s 0.797%
backtest mainnet-368528500-perf snapshot load 4.826 s 3.095 s -35.868%
backtest mainnet-368528500-perf total elapsed 76.660004 s 77.271487 s 0.798%
firedancer mem usage with mainnet.toml 1013.23 GiB 1013.23 GiB 0.000%

return;
FD_LOG_WARNING(( "corrupt snapshot: unexpected end of TAR file" ));
transition_malformed( ctx, stem );
return 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

indent

atexit( fd_halt );
//fd_log_level_stderr_set(4);
//fd_log_level_logfile_set(4);
//fd_log_level_core_set(4);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

recomment


if( FD_LIKELY( out_produced ) ) {
fd_stem_publish( stem, 0UL, FD_SNAPSHOT_MSG_DATA, ctx->out.chunk, out_produced, 0UL, 0UL, 0UL );
ulong ctl = fd_frag_meta_ctl( 0UL, 0, frame_res==0UL, 0 );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

separate out into eom var

if( snapwr_tile ) fputs( "--------------", stdout );
if( snapls_tile ) fputs( "[ct],[ld],[dc],[in],[lts]--------[ct],[ld],[dc],[in],[lts]", stdout );
else fputs( "[ct],[ld],[dc],[in]--------[ct],[ld],[dc],[in]", stdout );
if( snapls_tile ) fputs( "[ld],[dc],[in],[lts]--------[ld],[dc],[in],[lts]", stdout );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

lthash and multi dc tiles are incompatible

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