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 issue] Setup a continuous benchmark for single-shard throughput #11348

Closed
7 tasks done
aborg-dev opened this issue May 20, 2024 · 6 comments
Closed
7 tasks done
Assignees

Comments

@aborg-dev
Copy link
Contributor

aborg-dev commented May 20, 2024

This is a tracking issue for setting up the benchmark that runs every day on the latest version of nearcore with a purpose of measuring the throughput that we can achieve on a representative workload.
It is a first step towards #10885

At the moment we are focusing on the following setup:

  • NEAR network with a single-shard
  • Traffic generated with Locust Fungible Token (FT) benchmark
  • The size of the FT contract needs to be big enough to expose costs of storage operations similar to the ones on mainnet
  • Network settings close to mainnet (e.g. epoch length of ~24 hours)

The current findings are described in this document.

@aborg-dev
Copy link
Contributor Author

A related issue about the same benchmark with multiple shards: #11347

github-merge-queue bot pushed a commit that referenced this issue May 24, 2024
This PR aims to MVP FT transfer benchmark (#11348). This `.sh` script
restarts locust and neard if there are changes on remote. It will be
runned on one of our VMs. Later it probably should be triggered by CI
job, but for now we can just make a cron job which will run it time to
time.

Co-authored-by: Viktar Makouski <viktar@neaar.org>
@MCJOHN974 MCJOHN974 self-assigned this May 24, 2024
@MCJOHN974
Copy link
Contributor

Status update:

Currently don't work, hope #11395 will fix that. Setup I'm trying to start is pretty simple -- 1 node, 1 shard, locust and neard on same machine, FT contract state flashing on each commit.

@MCJOHN974
Copy link
Contributor

Upd: now we have continuous benchmark, description: #11404.

@aborg-dev
Copy link
Contributor Author

aborg-dev commented Jun 12, 2024

A summary of the current progress:

  • We have ran the benchmark with multiple configurations:
    • With 1, 2 and 6 shards - the throughput scales roughly linearly for this workload
    • With 10 PGas gas limit - the throughput scales roughly linearly for this workload
    • With in-memory trie enabled - didn't see any noticeable improvement at the current state size, need further investigation
    • On different hardware - the throughput heavily depends on it and has disk and CPU as bottlenecks
  • We have a database to store benchmark results and Grafana dashboard visualizing it
  • Experimented with a creation of a larger state for FT contract, this needed further optimizations to be performant enough
  • Set up automated runs of the benchmark every day

Next steps:

  • Publish benchmark results to DB and Grafana automatically - @MCJOHN974 working on this
  • Make benchmark more representative
    • Larger contract state size - @Ekleog working on this
    • Larger network (>5 validators) - @Akashin working on this
  • Investigate disk bottleneck at high throughput
  • Automate search of optimal gas limit - @mooori working on this
  • Quantify effects of in-memory trie

@aborg-dev
Copy link
Contributor Author

A summary of the current progress:

Next steps:

@aborg-dev
Copy link
Contributor Author

To summarize latest progress:

I think we can close this off and continue the future work in #11680:

  • Running a benchmark with multiple nodes
  • Using optimal gas limit
  • Using appropriate state size

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

No branches or pull requests

2 participants