Skip to content

Fix firedancer-dev bench#8300

Open
ripatel-fd wants to merge 1 commit intomainfrom
ripatel/fix-bench
Open

Fix firedancer-dev bench#8300
ripatel-fd wants to merge 1 commit intomainfrom
ripatel/fix-bench

Conversation

@ripatel-fd
Copy link
Contributor

Fixes bench-zen4-128core. Does 600k TPS on my box, needs further
tuning.

  • Introduce HTTP code 503 for when RPC is not yet ready (no bank),
    fixes crash in bencho
  • Enable sandbox when watch is disabled (seems to work fine)
  • Add support for firedancer-dev mem --topo bench
  • Drop bench genesis account configs to avoid hardcoded limit in
    fd_genesis_parse

@ripatel-fd
Copy link
Contributor Author

image

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.052252 s 0.052069 s -0.350%
backtest mainnet-368528500-perf snapshot load 2.472 s 1.824 s -26.214%
backtest mainnet-368528500-perf total elapsed 52.251574 s 52.069028 s -0.349%
firedancer mem usage with mainnet.toml 987.33 GiB 987.33 GiB 0.000%

cJSON const * id,
cJSON const * params ) {
if( FD_UNLIKELY( ctx->processed_idx==ULONG_MAX || ctx->banks[ ctx->processed_idx ].slot==ULONG_MAX ) ) return (fd_http_server_response_t){ .status = 500 };
if( FD_UNLIKELY( ctx->processed_idx==ULONG_MAX || ctx->banks[ ctx->processed_idx ].slot==ULONG_MAX ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@jherrera-jump is 500 for agave conformance?

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't love using a special code for this though ... we should match agave behavior if the snapshot isn't loaded yet or whatever (probably, the rpc doesn't accept connections until then?)

Copy link
Contributor

@jherrera-jump jherrera-jump Feb 13, 2026

Choose a reason for hiding this comment

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

is 500 for agave conformance

no, I'll change the behavior here to match


[development.genesis]
fund_initial_accounts = 32768
fund_initial_accounts = 1000
Copy link
Contributor

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See commit description

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any larger and fd_genesis_parse.c breaks

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you fix fd_genesis_parse ?

@ripatel-fd
Copy link
Contributor Author

@mmcgee-jump @jherrera-jump Are you ok with merging this as a quick fix? I just wanted a branch with bench working. The HTTP 503 hack is obviously ugly and not conformant, but at least it doesn't crash firedancer-dev bench.

Alternatively, maybe we can fix the underlying bugs properly?

Fixes bench-zen4-128core. Does 600k TPS on my box, needs further
tuning.

- Introduce HTTP code 503 for when RPC is not yet ready (no bank),
  fixes crash in bencho
- Enable sandbox when watch is disabled (seems to work fine)
- Add support for `firedancer-dev mem --topo bench`
- Drop bench genesis account configs to avoid hardcoded limit in
  fd_genesis_parse
@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.052083 s 0.052094 s 0.021%
backtest mainnet-368528500-perf snapshot load 2.502 s 1.818 s -27.338%
backtest mainnet-368528500-perf total elapsed 52.083106 s 52.093693 s 0.020%
firedancer mem usage with mainnet.toml 987.33 GiB 987.33 GiB 0.000%

@mmcgee-jump
Copy link
Contributor

Sure, fine with it if we file an issue to track fix

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.

4 participants