-
Notifications
You must be signed in to change notification settings - Fork 150
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
perf: rework benchmarks #1044
perf: rework benchmarks #1044
Conversation
@radupopa2010 Hey just wanted to give you a heads up as well, I am completely reworking the benchmarks in this PR. I will ping you when I work through the CI portion which should be sometime this week when I get the rest finished cc: @alvicsam |
required: false, | ||
nargs: '?', | ||
type: checkWsType, | ||
default: 'ws://127.0.0.1:9944', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what would happen if we specify one of our public endpoints here (f.e. "wss://rpc.polkadot.io")?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would use the public endpoint with no problem, but it is highly not recommended to use a public endpoint.
Why?: Because the benchmarks will send hundreds of thousands of requests, and we don't want to flood it with storage queries.
Couple of questions before actually running this:
|
So no because we should only be querying a local archive node, and not a public node. Most of the benchmarks work with historic blocks, there are some exceptions though. If the transaction-pool is full or not doesn't have a huge impact in my experience from running the benchmarks for a while now (But if it does it'll have a small impact as the amount of queries are so large that it will be a small outlier).
As mentioned above too we definitely don't want to benchmark against public live nodes because of the stress the benchmarks would impose upon the network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
running benchmarks worked great. lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran benchmarks, checked several lightweight endpoints and errors, everything as expected.
Amazing work!
Sidecar Benchmarks
Sidecar's benchmarks utilize
lua
,wrk
, and an archive node (local). This PR aims at completely a few things:polkadot
archive node.benchmarks.txt
file in the root of the repository.The script
This script's purpose is to run the benchmarks inside of the
<root>/benchmarks
directory. This script requires you to havewrk
,lua
, and a fully synced archive node. Please reference<root>/benchmarks/README.md
for more information on installation.In order to start this script locally, run from the root directory of this repository:
ex1:
ex2:
ex3:
Flags
--ws-url
: The Ws Url to run the benchmarks against. Default isws://127.0.0.1:9944
.--endpoint
: Run a single benchmark by specificing which endpoint to run. If this is absent it will run all benchmarks.--log-level
: The log-level to run the benchmarks in. Defaults tohttp
.--time
: The amount of time each benchmark should run for. Ex:1m
,30s
,15s
. Default is1m
./accounts/{accountId}/balance-info
/accounts/{accountId}/vesting-info
/accounts/{accountId}/validate
/accounts/{accountId}/convert
/accounts/{accountId}/staking-info
/accounts/{accountId}/staking-payouts
/blocks/{blockId}
/pallets/staking/progress
/pallets/{palletId}/storage
/pallets/{palletId}/storage/{storageItemId}
/pallets/nomination-pools/info
/pallets/nomination-pools/{poolId}
/pallets/{palletId}/errors
/pallets/{palletId}/errors/{errorItemId}
/pallets/staking/validators
/transaction/material
/runtime/spec
/paras
/paras/leases/current
/paras/auctions/current
/paras/crowdloans
/paras/{paraId}/crowdloan-info
/paras/{paraId}/lease-info
/blocks/{blockId}/header
/blocks/{blockId}/extrinsics/{extrinsicIndex}
/blocks/head
/blocks/head/header
/node/network
/node/transaction-pool
/node/version
closes: #1050