Skip to content

Simplify apply load limits mode.#5249

Open
dmkozh wants to merge 2 commits intostellar:masterfrom
dmkozh:apply_load_limits
Open

Simplify apply load limits mode.#5249
dmkozh wants to merge 2 commits intostellar:masterfrom
dmkozh:apply_load_limits

Conversation

@dmkozh
Copy link
Copy Markdown
Contributor

@dmkozh dmkozh commented Apr 29, 2026

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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
Comment thread src/simulation/ApplyLoad.cpp
Comment thread src/simulation/ApplyLoad.cpp
Comment thread src/simulation/ApplyLoad.cpp Outdated
@dmkozh dmkozh force-pushed the apply_load_limits branch 2 times, most recently from 6ac4867 to df6aeac Compare April 29, 2026 22:39
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.
@dmkozh dmkozh force-pushed the apply_load_limits branch from e76f223 to a717b54 Compare April 29, 2026 22:46
@dmkozh dmkozh requested a review from marta-lokhova April 29, 2026 22:57
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.
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.

2 participants