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

Analyze CachedBeaconState memory usage #2936

Merged
merged 1 commit into from
Aug 10, 2021
Merged

Conversation

dapplion
Copy link
Contributor

Motivation

To reduce memory footprint of Lodestar it's important to understand the trade-offs and requirements of the caches and the state.

Description

Commit comments after researching the caches and their implications for the state transition function. I believe they are useful to have a good context when taking decisions around them.

@codeclimate
Copy link

codeclimate bot commented Aug 10, 2021

Code Climate has analyzed commit 8c3f522 and detected 0 issues on this pull request.

View more on Code Climate.

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 0a86840 Previous: 05e8265 Ratio
getCommitteeAssignments - req 1000 vs - 250000 vc 7.8871 ms/op 7.8467 ms/op 1.01
epoch altair - 250000 vs - 7PWei - processInactivityUpdates 2.1328 s/op 2.2111 s/op 0.96
epoch altair - 250000 vs - 7PWei - processRewardsAndPenalties 807.54 ms/op 883.38 ms/op 0.91
epoch altair - 250000 vs - 7PWei - processParticipationFlagUpdates 369.31 ms/op 353.07 ms/op 1.05
Process block - 250000 vs - 7PWei - with 0 validator exit 371.51 us/op 354.94 us/op 1.05
Process block - 250000 vs - 7PWei - with 1 validator exit 31.868 ms/op 32.650 ms/op 0.98
Process block - 250000 vs - 7PWei - with 16 validator exits 25.746 ms/op 26.815 ms/op 0.96
epoch phase0 - 250000 vs - 7PWei - beforeProcessEpoch 665.95 ms/op 634.02 ms/op 1.05
epoch phase0 - 250000 vs - 7PWei - processRewardsAndPenalties 467.87 ms/op 458.47 ms/op 1.02
epoch phase0 - 250000 vs - 7PWei - processEffectiveBalanceUpdates 123.28 ms/op 109.10 ms/op 1.13
getAttestationDeltas - 250000 vs - 7PWei 86.712 ms/op 92.590 ms/op 0.94
processSlots - 250000 vs - 7PWei - 32 empty slots 4.8881 s/op 4.5431 s/op 1.08
shuffle list - 16384 els 1.6833 ms/op 1.5060 ms/op 1.12
shuffle list - 250000 els 42.319 ms/op 21.502 ms/op 1.97
getPubkeys - persistent - req 1000 vs - 250000 vc 16.002 us/op 15.169 us/op 1.05
BLS verify - blst-native 1.6396 ms/op 1.6439 ms/op 1.00
BLS verifyMultipleSignatures 3 - blst-native 3.3682 ms/op 3.3547 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst-native 7.2413 ms/op 7.2510 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst-native 26.348 ms/op 28.700 ms/op 0.92
BLS aggregatePubkeys 32 - blst-native 39.928 us/op 35.819 us/op 1.11
BLS aggregatePubkeys 128 - blst-native 155.53 us/op 137.18 us/op 1.13
getAttestationsForBlock 87.175 ms/op 86.567 ms/op 1.01
validate gossip signedAggregateAndProof - struct 6.0880 ms/op 5.3061 ms/op 1.15
validate gossip signedAggregateAndProof - treeBacked 4.5816 ms/op 4.0418 ms/op 1.13
validate gossip attestation - struct 2.1204 ms/op 1.8708 ms/op 1.13
validate gossip attestation - treeBacked 2.1586 ms/op 1.9100 ms/op 1.13

by benchmarkbot/action

@wemeetagain wemeetagain merged commit c516647 into master Aug 10, 2021
@wemeetagain wemeetagain deleted the dapplion/memory-analysis branch August 10, 2021 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants