Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Cleanup empty scheduler agendas #12977

Closed
ggwpez opened this issue Dec 19, 2022 · 4 comments · Fixed by #12989
Closed

Cleanup empty scheduler agendas #12977

ggwpez opened this issue Dec 19, 2022 · 4 comments · Fixed by #12989

Comments

@ggwpez
Copy link
Member

ggwpez commented Dec 19, 2022

The number of empty agendas of the Kusama scheduler is currently growing with about 137/day since its inception ~3 weeks ago. This is a byproduct of the current scheduler design, since it keeps None-only agendas like [None, None, …] around.
Counting them with a script:

Block height 15500000 has 604 empty agendas
Block height 15550000 has 1008 empty agendas
Block height 15600000 has 1397 empty agendas
Block height 15650000 has 2180 empty agendas
Block height 15700000 has 2723 empty agendas
Block height 15750000 has 2989 empty agendas
Block height 15800000 has 3554 empty agendas
Block height 15818682 has 3652 empty agendas
Average growth rate: 5.74 / h, 137.73 / d

I guess we can create a permissionless cleanup Call and then schedule that periodically.
Any better ideas? Doing in a runtime migration is probably too rare.

Note that Polkadot is unaffected since it is still on the V3 scheduler.

@ruseinov
Copy link
Contributor

Seems like something that should probably be fixed within scheduler eventually?
Could be done on_idle too I guess, but then some monitoring won't hurt to make sure this does not
grow too much.

@ggwpez
Copy link
Member Author

ggwpez commented Dec 20, 2022

Seems like something that should probably be fixed within scheduler eventually? Could be done on_idle too I guess, but then some monitoring won't hurt to make sure this does not grow too much.

Yes we should fix it long-term and have some cleanup short-term.
I think this could help for monitoring #12439, but I will probably do something hacky as short-term monitoring.

@Polkadot-Forum
Copy link

This issue has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-37/1736/1

@ggwpez
Copy link
Member Author

ggwpez commented Mar 9, 2023

Just double-checking on Kusama:

Block height 15950000 has 1546 empty agendas
Block height 16000000 has 1042 empty agendas
Block height 16050000 has 226 empty agendas
Block height 16100000 has 335 empty agendas
Block height 16150000 has 579 empty agendas
Block height 16200000 has 1186 empty agendas
Block height 16250000 has 1506 empty agendas
Block height 16300000 has 1624 empty agendas
Block height 16350000 has 1564 empty agendas
Block height 16400000 has 0 empty agendas
Block height 16450000 has 0 empty agendas
Block height 16500000 has 0 empty agendas

Polkadot was deployed with the fix in place, so should be fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants