-
Notifications
You must be signed in to change notification settings - Fork 732
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
Large OnDemandQueue
queue processing leads to up to 10s block import times
#3051
Comments
I'd suspect this call
|
I mean this is for sure this code here: polkadot-sdk/polkadot/runtime/parachains/src/assigner_on_demand/mod.rs Lines 546 to 556 in 50eb12c
We should get rid of |
@antonva how expensive would placing 5000 orders be on Kusama/Polkadot? |
Memo to myself: We should always plan for performance tests, for any non super trivial feature. Especially if we already suspect that there could be issues. For Kusama launch, have to have some solution here. Unfortunately we apparently are only updating the spot traffic once per block. @antonva didn't we agree back then that this is a bad idea? So even if spot price goes up real quick, if it is possible to squeeze in a lot of orders in just one block, we could still be in trouble. |
Lets go with that we can fit all the orders in the same block and that the
We did agree on that, not sure why it didn't get added. Will go do that now. |
Thank you! We need to get better in tracking these things. It is just a bummer if we actually thought of an issue, but forgot to implement the mitigation. My best take on this right now, is making sure there are tickets on the board, then we only need to make sure we are actually checking the board. 🙈 With the spot traffic going up each order - how would the math then end up? |
I will try to find some time today to make the implementation more efficient. |
A bit more analysis: We do have something like 50 on-demand cores on Rococo, which is leading to the following: For each core (there are 50), we call Also Anton: for spot price calculation we fetch the length of the vec - which is also doing a full read. |
Maybe there is some other performance issue somewhere else as well. Nevertheless, we need to fix this until 31.01 to get this stuff into the next release that will then be used by the fellowship. |
Don't think my fix will be fully ready by then, but as mentioned if reduce maximum queue size, don't go crazy with cores (which we should not do anyway) and maybe don't go super dirt cheap we should be fine for Kusama. @ordian any news on measurement front? Do we have a better understanding where we actually spent so much time? |
Still trying to repro the issue with https://github.com/paritytech/polkadot-sdk/compare/ao-bench-on-demand, the problem is that with the removal of the native runtime, running benches even with UPD: manage to make it read from the UPD2: managed to repro and we discussed that in Element |
The issue surfaced on rococo after Parachain
4,343
placed around 5k worth of orders. TheOnDemandQueue
seems to be processed on each block causing very high inherent create and import times, leading to liveness issues due to validators building on same parent multiple times.CC @eskimor @antonva
The text was updated successfully, but these errors were encountered: