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

Update committee cache size to 32 #7018

Merged
merged 7 commits into from
Aug 17, 2020

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Aug 16, 2020

Committee cache size is currently set to 10. This number assumed perfect finality (eg. previous, current and next epoch with a few forks in between 3 * fork_amount)

In the event of no finality for a long time, this assumption quickly breaks and causes the running node to lock up more resources than needed due to shuffling.

A syncing node (before):
Screen Shot 2020-08-16 at 2 25 24 PM

A syncing node (after):
Screen Shot 2020-08-16 at 2 40 10 PM

From the UX perspective, the syncing felt smoother, and the computer didn't get too hot with the loud fan.

Some envelope numbers for the trade offs:
Each cache size is dependent on the number of active validator indices. ShuffledIndices and SortedIndices are the only ones matter, the rest is too small to count. Each list is 30k * 64B = 2MB. This increases the memory usage by ~2MB * 22 = 44MB. It's a very acceptable trade off imo.

@terencechain terencechain requested a review from a team as a code owner August 16, 2020 21:50
@terencechain terencechain self-assigned this Aug 16, 2020
@terencechain terencechain added Ready For Review Enhancement New feature or request labels Aug 16, 2020
@terencechain terencechain added the Priority: Critical Highest, immediate priority item label Aug 16, 2020
prestonvanloon
prestonvanloon previously approved these changes Aug 16, 2020
@prylabs-bulldozer prylabs-bulldozer bot merged commit a2f7815 into master Aug 17, 2020
@farazdagi farazdagi deleted the update-committee-cache-size branch August 18, 2020 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Priority: Critical Highest, immediate priority item
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants