-
Notifications
You must be signed in to change notification settings - Fork 680
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
Async backing integration & load test suite #706
Comments
Since asynchronous backing is not done yet, we should view this issue in two parts:
|
FYI @bredamatt paritytech/polkadot#6791 would be a good base to test against until that is merged into the feature branch. |
@rphmeier @sandreim the zombienet tests are added in paritytech/polkadot#6314 now. |
The first release of touchstone: https://github.com/paritytech/touchstone allows for runtime configuration of the input parameters:
Just waiting for paritytech/testnet-manager#52 to finish so |
@PierreBesson if we want to support automation in Versi w.r.t:
It would be nice if we could scale these numbers through the testnet-manager. However, I get that this may lead to lack of control over the number of deployments in the Kubernetes cluster as it wouldn't be GitOps based anymore, and hence lead to a lot of overhead wrt. managing the cluster. How about using Kubernetes operators alongside testnet-manager then, such as: https://github.com/swisscom-blockchain/polkadot-k8s-operator for the validators? We could potentially also write a new and simpler Rust based operator for load-testing specific parachains like glutton-parachain, or undying-collator for example as well. This would avoid this extra overhead, and allow for further automation, such as automatic and incremental increases in load during a load-test. Edit: |
This is an edited comment. There was expressed a desire to deploy undying-collator in Versi whilst waiting for the Glutton Parachain runtime to be ready. Undying didn't work as expected in Versi, whilst Glutton appears to be working as of recently. This means we should eventually cojointly deploy the sTPS binaries alongside Glutton parachains to simulate the effects of various network load on TPS measures. |
After discovering that Work is currently being done to support:
the branch is here: https://github.com/paritytech/polkadot-stps/tree/bredamatt/add-helm-charts The most significant hurdle to make The end-goal is to use
A write up will follow containing specifications of underlying VMs, network topology and results accordingly. |
Not sure what is doing it differently, but as you can do all this based on the chain spec. Aka insert the sudo key and pre funded accounts directly into genesis. Whatever tool isn't supporting this, should be "fixed" to support this. |
A quick status update on this:
|
Finalizing the task for a fully automated TPS measurement suite can be described as a script of some sorts (combo of .zndsl and JavaScript / typescript for example, or a crate by itself) which supports zombienet deployments into Kubernetes with adjustable parameters for:
Eventually we could also add these additional parameters to introduce more realism to the tests:
This could potentially also serve as a good initial use-case for the zombienet SDK @pepoviola . Overall I think it is reasonable to have an overarching strategy for this type of observability work and outline a set of clear scenarios we want to test for that are:
I also suggest we define a clear CI strategy for these tests in the future. I would argue that having as much data (ideally distributions) of values can be useful for this purpose as it allows for more granular statistical analysis, but generating that in CI might be slow, so arguably some automated test scripts which can extract such insight could help whilst keeping things more lightweight in CI. For example, tighter distributions are better because performance / behavior is more predictable / reproducible and indicates control. With time we should also evaluate other types of extrinsics and messages rather than solely Balances Transfers (transfer keep alive calls specifically), such as NFTs, XCMP and so forth. |
@rphmeier @sandreim @bkchr Here is an update on some preliminary results for the parachain TPS measurements on sync-backing. SetupHardwareNote that I am running the tests natively on my Macbook M1 Pro (32 GB RAM, 10 CPU) to avoid Kubernetes overhead. This could still introduce other forms of non-determinism, however. Once the Versi deployments work as expected, there may be less environmental overhead from different processes running on the same machine, but we would nevertheless have the Kubernetes overhead to take into account. An option to avoid this type of non-determinism could be to spin up a big Linux VM in GCP and use a deterministic container like Hermit for example to see if it helps, but I would suspect this to not work out-of-the box (I am yet to test). In general, the distributions of TPS is quite varied, which indicates non-determinism, so figuring out what causes this non-detereminism should be investigated going forwards. ...Briefly put, I am running 2x validators, 1x collator, 1x tps monitor, 1x multi-threaded sender binary on one Macbook Pro M1 to execute the tests. I have some infrastructure as code written which can be used to spin up a big GCP VM if necessary. BinariesParachainThere are three different testing parachain collator binaries being used for a comparison of the numbers:
I saw an improvement from a max of 1094 transfers to 1440 transfers per parablock by changing the normal dispatch limit to I also use zombienet to override the genesis configuration for the parachain chainspec to make sure there are 100,000 pre-funded RelaychainThe validator binary is running Polkadot, version I set the OrchestrationZombienetThe way I orchestrate the test is simply by spawning a simple zombienetwork with 2x validators running polkadot, and 1x collator running either of the TPS counterBecause Once the zombienet is spun up (using Once the The command I use looks like this:
Here Transfer senderSimilarly, the To speed up the
If horizontal scaling is desired, then it can be run in this way:
then simply run the second sender in a different process:
The sender first executes some pre-checks on each of the Note that here, a transaction is a Results on Macbook Pro M1 Pro.The logs on the sTPS scraper running in Parachain mode is provided in this section. Note that for these results I solely submit 10k transactions to post the logs here. It is important to highlight that the PoV sizes are low for these tests. The default test PoV sizes range between 400-600 kb, which is ~10% of the maximum PoV size of 5.24MB. Yet the block weights observed range primarily between 50-70%, indicating that neither PoV size, nor execution time seems to be a limiting factor, which is surprising. I was expecting execution time to at least reach 100%. If the FRAME estimated proof size for the Default
The average is 83.342026. The maximum is 91.440994. The minimum is 24.252022, but as is clear, this is due to leftover transfers. The better minimum is 83.34724. Given the maximum TPS number and an expected parablock time of 12s, the maximum number of transfers included is ~1097. We have ~1000 transfers in a single parablock on average. If there are 40 parachains and these numbers scale linearly, then in expectation this would be ~3,333 TPS for parachains. No-max-total
Average is 83.78421. The maximum is 104.25. The minimum is 42.4485 in this case, but such a low figure is also most likely due to leftover transfers as it is the last parablock. It would be more reasonable to use 77.54263 as the minimum here. Given the maximum TPS number and an expected parablock time of 12s, the maximum number of transfers included is ~1251. We have ~1005 transfers in a single parablock on average. If there are 40 parachains and these numbers scale linearly, then in expectation this would be ~3,350 TPS for parachains. No-max-no-reservedHere the debug logs are added.
Average TPS is 92.58239. The maximum TPS observed in this test is: 103.27582. Given the maximum TPS number and an expected parablock time of 12s, the maximum number of transfers included is ~1239. We have ~1111 transfers in a single parablock on average. If there are 40 parachains and these numbers scale linearly, then in expectation this would be ~3,703 TPS for parachains. TODOs
|
If both PoV size and execution time are significantly lower than the cap, but the weights are maxing out, that'd indicate that the weight cap per block is off - which may just be an artifact of benchmarking. |
Is this done? |
Yes. We've figured out how to run sTPS accurately for parachains. As far as the other goal, async backing on Kusama, I think @sandreim has tested 6s block times with somewhere around 50-80 cores and some gluttons. |
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.53 to 0.1.56. - [Release notes](https://github.com/dtolnay/async-trait/releases) - [Commits](dtolnay/async-trait@0.1.53...0.1.56) --- updated-dependencies: - dependency-name: async-trait dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The following need to be covered with Zombienet CI tests:
More advanced load testing on Versi. So far we only tested with empty parachain blocks. We should explore some options to have the parachains fully fill their blocks with transactions or use
undying
test collator to burn CPU and create large PoVs.The load tests need to produce a grid of performance numbers with async backing enabled. The following metrics need to be covered:
The input parameters for this test will be:
Additional input parameters: configuration needs to match kusama as closely as possible for the following:
We need to build some automation if possible so that we can run these tests for different combinations of input parameters.
The text was updated successfully, but these errors were encountered: