Skip to content

Simplify apply load limits mode. - #5249

Merged
dmkozh merged 2 commits into
stellar:masterfrom
dmkozh:apply_load_limits
May 4, 2026
Merged

dmkozh merged 2 commits into
stellar:masterfrom
dmkozh:apply_load_limits

Conversation

@dmkozh

@dmkozh dmkozh commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Description

Now that we have a better understand of what works for the benchmark, we can simplify the config and limit it to just the ledger limits + TPL, and derive the transaction profile automatically (initially we planned a capability of using different tx distributions, but that doesn't seem to be too useful and it does add noise to already noisy benchmarks).

Also remove some unused modes from apply load and loadgen.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (via make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copilot AI review requested due to automatic review settings April 29, 2026 22:29

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

This PR simplifies the apply-load “ledger-limits” benchmarking configuration by removing unused modes and per-transaction distribution knobs, and instead deriving a single apply-load transaction profile directly from the configured ledger/tx limits (plus tx count / TPL).

Changes:

  • Remove limits-for-model-tx apply-load mode and the soroban_invoke_apply_load loadgen mode, along with their tests/docs/config parsing.
  • Introduce ApplyLoadTxProfile and derive it automatically in ApplyLoad for LIMIT_BASED mode; thread it through to Soroban load transaction generation.
  • Update example configs/docs and Windows VS project files to reflect removed/added sources.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/simulation/test/LoadGeneratorTests.cpp Removes apply-load/realistic-invoke test paths and config knobs that no longer exist.
src/simulation/TxGenerator.h Adds ApplyLoadTxProfile and updates invoke API to accept it.
src/simulation/TxGenerator.cpp Uses the derived tx profile for Soroban load V2 generation and adjusts padding/auth sizing logic.
src/simulation/LoadGenerator.h Removes SOROBAN_INVOKE_APPLY_LOAD mode from the enum.
src/simulation/LoadGenerator.cpp Removes parsing/execution/status handling for the removed mode.
src/simulation/ApplyLoad.h Removes “find limits for model tx” declarations; adds accessors and tx-profile state.
src/simulation/ApplyLoad.cpp Derives ApplyLoadTxProfile in LIMIT_BASED mode and simplifies hot-archive sizing logic.
src/main/Config.h Removes now-obsolete apply-load config fields and the removed apply-load mode.
src/main/Config.cpp Removes config parsing for deleted apply-load fields/mode and updates validation message.
docs/software/commands.md Updates apply-load mode documentation to remove the deleted mode.
docs/apply-load-limits-for-model-tx.cfg Removes the obsolete example config file.
docs/apply-load-ledger-limits.cfg Updates example config to match the simplified limits-driven approach.
docs/apply-load-for-meta.cfg Updates example config to match the simplified limits-driven approach.
Builds/VisualStudio/stellar-core.vcxproj.filters Updates VS filters to match current ledger/test sources.
Builds/VisualStudio/stellar-core.vcxproj Updates VS project compilation units/headers accordingly.

Comment thread src/simulation/ApplyLoad.cpp Resolved
Comment thread src/simulation/ApplyLoad.cpp Resolved
Comment thread src/simulation/ApplyLoad.cpp Resolved
Comment thread src/simulation/ApplyLoad.cpp Resolved
@dmkozh
dmkozh force-pushed the apply_load_limits branch 3 times, most recently from e76f223 to a717b54 Compare April 29, 2026 22:46
@dmkozh
dmkozh requested a review from marta-lokhova April 29, 2026 22:57
dmkozh added 2 commits May 4, 2026 13:46
Now that we have a better understand of what works for the benchmark, we can simplify the config and limit it to just the ledger limits + TPL, and derive the transaction profile automatically (initially we planned a capability of using different tx distributions, but that doesn't seem to be too useful and it does add noise to already noisy benchmarks).

Also remove some unused modes from apply load and loadgen.
There was relatively high probability that a contract instance is not invoked during the load generation, so increase the number of transactions to reduce it to a small enough value to never happen.
@dmkozh
dmkozh force-pushed the apply_load_limits branch from 0aeb427 to 3f0154a Compare May 4, 2026 17:46
@dmkozh
dmkozh enabled auto-merge May 4, 2026 17:50
@dmkozh
dmkozh added this pull request to the merge queue May 4, 2026
Merged via the queue into stellar:master with commit bab3c6c May 4, 2026
55 checks passed
@dmkozh
dmkozh deleted the apply_load_limits branch May 4, 2026 19:18
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