Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracking & Design]: FT benchmark workload generation and tooling improvements #12119

Open
10 tasks
mooori opened this issue Sep 20, 2024 · 1 comment
Open
10 tasks
Assignees
Labels
A-benchmark Area: performance benchmarks

Comments

@mooori
Copy link
Contributor

mooori commented Sep 20, 2024

Goals

  • Running the workload should require executing only 2 commands:
    • one command to initialize state
    • one command to run the workload using that state
  • State initialized for a given network should be re-usable in subsequent benchmark runs.
  • Errors and transaction failures should be handled.
  • The code generating the workload should be easy to understand and extend.
  • Modular building blocks reduce the effort of generating new workloads.

Building blocks

The following functionality should be generic enough to allow re-using it for other workloads:

  • Create an account, enable creating multiple in batches
  • Deploy a contract to an account
  • Call a contract method
  • Get the execution outcome of a transaction

FT workload implementation

Above building blocks should be sufficient to implement the ft workload consisting of:

  • Deploy and initialize FT contract(s)
  • Create user accounts
  • Register them with the FT contract
    • Modify the smart contract to enable registering users in batches, i.e. n > 1 users per transaction
  • Mint FT for users
  • Transfer tokens between users with ft_transfer

Principles

Sequential initialization

Contract and state initialization should be sequential, to dedicate all resources to it.

  • After its finalization, all transactions sent to the node should be included in tps measurements. The sequential approach avoids tainting tps measurements.
  • Avoid congestion that currently happens due to the Locust workload sending initialization transactions and ft_transfers at the same time.

Tested workload generation

Executing a command like cargo test should suffice to invoke a test suite for the code that generates the workload.

  • If some functionality is broken, a test failure should pinpoint the problem. Making the test pass again allows to verify a fix works.
  • Working on workload generation becomes more convenient when new functionality can be tested automatically, without requiring manual setup and full workload invocations.
  • Avoid a situation like with the current Locust ft workload that continuously reports errors during "successful" execution.

Use a well maintained RPC library

There are frequent changes to NEAR RPC standards and methods. A well maintained RPC library should handle such changes and minimize the work required to adapt workload generation to RPC changes.

Auto generate tps numbers and further data

After running a workload, a report should be printed containing:

  • tps numbers
  • data regarding node health: e.g. skipped chunks, failed transactions, etc.
  • data regarding node load: e.g. metrics for congestion and factors that limit including transactions or receipts
@mooori mooori added the A-benchmark Area: performance benchmarks label Sep 20, 2024
@mooori mooori self-assigned this Sep 20, 2024
@mooori
Copy link
Contributor Author

mooori commented Oct 4, 2024

A status update is available here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-benchmark Area: performance benchmarks
Projects
None yet
Development

No branches or pull requests

1 participant