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

Increase bls changes queue length to handle expected spikes on capella #5295

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Mar 22, 2023

Increase bls changes queue length to handle expected spikes on capella

Lighthouse Ref: https://github.com/sigp/lighthouse/blob/unstable/beacon_node/network/src/beacon_processor/mod.rs#L177

cc @wemeetagain @philknows

@g11tech g11tech requested a review from a team as a code owner March 22, 2023 12:02
@g11tech g11tech enabled auto-merge (squash) March 22, 2023 12:03
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 61bda80 Previous: f28adf6 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 559.85 us/op 847.25 us/op 0.66
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 47.336 us/op 45.894 us/op 1.03
BLS verify - blst-native 1.2368 ms/op 1.2207 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 2.5539 ms/op 2.4849 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 5.4269 ms/op 5.3419 ms/op 1.02
BLS verifyMultipleSignatures 32 - blst-native 19.818 ms/op 19.312 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 26.402 us/op 26.131 us/op 1.01
BLS aggregatePubkeys 128 - blst-native 103.89 us/op 100.78 us/op 1.03
getAttestationsForBlock 63.005 ms/op 61.390 ms/op 1.03
isKnown best case - 1 super set check 260.00 ns/op 265.00 ns/op 0.98
isKnown normal case - 2 super set checks 264.00 ns/op 258.00 ns/op 1.02
isKnown worse case - 16 super set checks 260.00 ns/op 257.00 ns/op 1.01
CheckpointStateCache - add get delete 5.7820 us/op 5.7450 us/op 1.01
validate gossip signedAggregateAndProof - struct 2.8522 ms/op 2.8214 ms/op 1.01
validate gossip attestation - struct 1.3590 ms/op 1.3259 ms/op 1.02
pickEth1Vote - no votes 1.2986 ms/op 1.4221 ms/op 0.91
pickEth1Vote - max votes 10.331 ms/op 10.344 ms/op 1.00
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.4681 ms/op 9.7374 ms/op 0.97
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.495 ms/op 15.617 ms/op 1.06
pickEth1Vote - Eth1Data fastSerialize value x2048 723.39 us/op 754.58 us/op 0.96
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.1666 ms/op 5.0553 ms/op 1.02
bytes32 toHexString 563.00 ns/op 523.00 ns/op 1.08
bytes32 Buffer.toString(hex) 377.00 ns/op 383.00 ns/op 0.98
bytes32 Buffer.toString(hex) from Uint8Array 611.00 ns/op 614.00 ns/op 1.00
bytes32 Buffer.toString(hex) + 0x 427.00 ns/op 402.00 ns/op 1.06
Object access 1 prop 0.18800 ns/op 0.17800 ns/op 1.06
Map access 1 prop 0.17100 ns/op 0.15800 ns/op 1.08
Object get x1000 7.0390 ns/op 7.0000 ns/op 1.01
Map get x1000 0.63200 ns/op 0.59300 ns/op 1.07
Object set x1000 74.275 ns/op 52.316 ns/op 1.42
Map set x1000 50.416 ns/op 42.850 ns/op 1.18
Return object 10000 times 0.25160 ns/op 0.23800 ns/op 1.06
Throw Error 10000 times 4.3432 us/op 4.2743 us/op 1.02
fastMsgIdFn sha256 / 200 bytes 3.7340 us/op 3.4940 us/op 1.07
fastMsgIdFn h32 xxhash / 200 bytes 302.00 ns/op 306.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 200 bytes 487.00 ns/op 425.00 ns/op 1.15
fastMsgIdFn sha256 / 1000 bytes 12.108 us/op 11.809 us/op 1.03
fastMsgIdFn h32 xxhash / 1000 bytes 467.00 ns/op 428.00 ns/op 1.09
fastMsgIdFn h64 xxhash / 1000 bytes 502.00 ns/op 473.00 ns/op 1.06
fastMsgIdFn sha256 / 10000 bytes 107.19 us/op 103.34 us/op 1.04
fastMsgIdFn h32 xxhash / 10000 bytes 2.0630 us/op 1.9700 us/op 1.05
fastMsgIdFn h64 xxhash / 10000 bytes 1.4350 us/op 1.3870 us/op 1.03
enrSubnets - fastDeserialize 64 bits 1.3720 us/op 1.3090 us/op 1.05
enrSubnets - ssz BitVector 64 bits 528.00 ns/op 516.00 ns/op 1.02
enrSubnets - fastDeserialize 4 bits 182.00 ns/op 170.00 ns/op 1.07
enrSubnets - ssz BitVector 4 bits 611.00 ns/op 497.00 ns/op 1.23
prioritizePeers score -10:0 att 32-0.1 sync 2-0 150.04 us/op 105.20 us/op 1.43
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 174.78 us/op 141.25 us/op 1.24
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 206.54 us/op 166.58 us/op 1.24
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 375.40 us/op 306.54 us/op 1.22
prioritizePeers score 0:0 att 64-1 sync 4-1 446.67 us/op 362.51 us/op 1.23
array of 16000 items push then shift 1.7830 us/op 1.6130 us/op 1.11
LinkedList of 16000 items push then shift 9.3670 ns/op 8.7650 ns/op 1.07
array of 16000 items push then pop 113.76 ns/op 94.508 ns/op 1.20
LinkedList of 16000 items push then pop 9.2810 ns/op 8.3850 ns/op 1.11
array of 24000 items push then shift 2.4107 us/op 2.2946 us/op 1.05
LinkedList of 24000 items push then shift 9.2510 ns/op 8.7410 ns/op 1.06
array of 24000 items push then pop 96.782 ns/op 76.864 ns/op 1.26
LinkedList of 24000 items push then pop 9.2420 ns/op 8.4990 ns/op 1.09
intersect bitArray bitLen 8 14.504 ns/op 13.154 ns/op 1.10
intersect array and set length 8 96.696 ns/op 78.849 ns/op 1.23
intersect bitArray bitLen 128 45.329 ns/op 43.526 ns/op 1.04
intersect array and set length 128 1.2965 us/op 1.0379 us/op 1.25
Buffer.concat 32 items 2.9810 us/op 2.5930 us/op 1.15
Uint8Array.set 32 items 3.2630 us/op 2.4900 us/op 1.31
pass gossip attestations to forkchoice per slot 3.7734 ms/op 3.4252 ms/op 1.10
computeDeltas 3.4237 ms/op 3.3147 ms/op 1.03
computeProposerBoostScoreFromBalances 1.8686 ms/op 1.8275 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei normalcase 2.4140 ms/op 2.6342 ms/op 0.92
altair processAttestation - 250000 vs - 7PWei worstcase 3.8973 ms/op 4.5012 ms/op 0.87
altair processAttestation - setStatus - 1/6 committees join 146.50 us/op 145.80 us/op 1.00
altair processAttestation - setStatus - 1/3 committees join 296.33 us/op 285.45 us/op 1.04
altair processAttestation - setStatus - 1/2 committees join 376.88 us/op 375.59 us/op 1.00
altair processAttestation - setStatus - 2/3 committees join 489.50 us/op 478.12 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 684.21 us/op 667.49 us/op 1.03
altair processAttestation - setStatus - 100% committees join 813.38 us/op 782.37 us/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase 18.301 ms/op 15.259 ms/op 1.20
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.461 ms/op 27.795 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase 49.059 ms/op 48.487 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase hashState 68.455 ms/op 70.837 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0323 ms/op 2.0110 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 30.722 ms/op 29.521 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 484.57 us/op 655.23 us/op 0.74
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 7.6710 us/op 8.5740 us/op 0.89
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 25.266 us/op 29.771 us/op 0.85
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 10.363 us/op 13.661 us/op 0.76
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 7.7140 us/op 9.2090 us/op 0.84
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 92.526 us/op 104.39 us/op 0.89
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 665.37 us/op 696.09 us/op 0.96
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 912.04 us/op 917.26 us/op 0.99
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 920.77 us/op 939.12 us/op 0.98
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.3896 ms/op 2.5742 ms/op 0.93
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.6194 ms/op 1.7572 ms/op 0.92
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 4.2391 ms/op 4.1661 ms/op 1.02
Tree 40 250000 create 362.74 ms/op 320.36 ms/op 1.13
Tree 40 250000 get(125000) 197.58 ns/op 195.32 ns/op 1.01
Tree 40 250000 set(125000) 1.0101 us/op 1.0216 us/op 0.99
Tree 40 250000 toArray() 19.695 ms/op 21.857 ms/op 0.90
Tree 40 250000 iterate all - toArray() + loop 18.368 ms/op 21.899 ms/op 0.84
Tree 40 250000 iterate all - get(i) 70.168 ms/op 73.969 ms/op 0.95
MutableVector 250000 create 11.791 ms/op 11.298 ms/op 1.04
MutableVector 250000 get(125000) 6.7190 ns/op 6.4510 ns/op 1.04
MutableVector 250000 set(125000) 266.68 ns/op 281.24 ns/op 0.95
MutableVector 250000 toArray() 3.2131 ms/op 3.3124 ms/op 0.97
MutableVector 250000 iterate all - toArray() + loop 3.5015 ms/op 2.9701 ms/op 1.18
MutableVector 250000 iterate all - get(i) 1.5530 ms/op 1.5141 ms/op 1.03
Array 250000 create 3.1041 ms/op 2.6770 ms/op 1.16
Array 250000 clone - spread 1.2490 ms/op 1.1126 ms/op 1.12
Array 250000 get(125000) 0.60400 ns/op 0.54700 ns/op 1.10
Array 250000 set(125000) 0.68700 ns/op 1.6010 ns/op 0.43
Array 250000 iterate all - loop 85.953 us/op 147.89 us/op 0.58
effectiveBalanceIncrements clone Uint8Array 300000 34.141 us/op 76.876 us/op 0.44
effectiveBalanceIncrements clone MutableVector 300000 387.00 ns/op 1.6890 us/op 0.23
effectiveBalanceIncrements rw all Uint8Array 300000 172.98 us/op 228.59 us/op 0.76
effectiveBalanceIncrements rw all MutableVector 300000 88.751 ms/op 213.26 ms/op 0.42
phase0 afterProcessEpoch - 250000 vs - 7PWei 118.42 ms/op 161.96 ms/op 0.73
phase0 beforeProcessEpoch - 250000 vs - 7PWei 44.544 ms/op 51.857 ms/op 0.86
altair processEpoch - mainnet_e81889 314.81 ms/op 347.34 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 51.418 ms/op 72.961 ms/op 0.70
mainnet_e81889 - altair processJustificationAndFinalization 17.452 us/op 18.344 us/op 0.95
mainnet_e81889 - altair processInactivityUpdates 5.9227 ms/op 6.5980 ms/op 0.90
mainnet_e81889 - altair processRewardsAndPenalties 76.747 ms/op 72.452 ms/op 1.06
mainnet_e81889 - altair processRegistryUpdates 2.8740 us/op 2.9670 us/op 0.97
mainnet_e81889 - altair processSlashings 543.00 ns/op 587.00 ns/op 0.93
mainnet_e81889 - altair processEth1DataReset 664.00 ns/op 508.00 ns/op 1.31
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2756 ms/op 1.3075 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 4.8090 us/op 4.7550 us/op 1.01
mainnet_e81889 - altair processRandaoMixesReset 5.9020 us/op 8.5480 us/op 0.69
mainnet_e81889 - altair processHistoricalRootsUpdate 740.00 ns/op 1.0080 us/op 0.73
mainnet_e81889 - altair processParticipationFlagUpdates 4.6430 us/op 2.7890 us/op 1.66
mainnet_e81889 - altair processSyncCommitteeUpdates 849.00 ns/op 1.3950 us/op 0.61
mainnet_e81889 - altair afterProcessEpoch 125.08 ms/op 151.87 ms/op 0.82
phase0 processEpoch - mainnet_e58758 338.06 ms/op 371.68 ms/op 0.91
mainnet_e58758 - phase0 beforeProcessEpoch 118.67 ms/op 159.02 ms/op 0.75
mainnet_e58758 - phase0 processJustificationAndFinalization 17.595 us/op 31.672 us/op 0.56
mainnet_e58758 - phase0 processRewardsAndPenalties 55.703 ms/op 69.898 ms/op 0.80
mainnet_e58758 - phase0 processRegistryUpdates 9.5390 us/op 14.855 us/op 0.64
mainnet_e58758 - phase0 processSlashings 628.00 ns/op 1.1780 us/op 0.53
mainnet_e58758 - phase0 processEth1DataReset 1.0400 us/op 1.2600 us/op 0.83
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0631 ms/op 1.5749 ms/op 0.68
mainnet_e58758 - phase0 processSlashingsReset 4.5030 us/op 8.6810 us/op 0.52
mainnet_e58758 - phase0 processRandaoMixesReset 4.4060 us/op 10.428 us/op 0.42
mainnet_e58758 - phase0 processHistoricalRootsUpdate 619.00 ns/op 1.5810 us/op 0.39
mainnet_e58758 - phase0 processParticipationRecordUpdates 8.5110 us/op 7.8420 us/op 1.09
mainnet_e58758 - phase0 afterProcessEpoch 98.649 ms/op 105.93 ms/op 0.93
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2830 ms/op 1.9475 ms/op 0.66
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5208 ms/op 2.1115 ms/op 0.72
altair processInactivityUpdates - 250000 normalcase 22.387 ms/op 26.944 ms/op 0.83
altair processInactivityUpdates - 250000 worstcase 27.514 ms/op 27.800 ms/op 0.99
phase0 processRegistryUpdates - 250000 normalcase 6.9880 us/op 12.826 us/op 0.54
phase0 processRegistryUpdates - 250000 badcase_full_deposits 250.05 us/op 343.04 us/op 0.73
phase0 processRegistryUpdates - 250000 worstcase 0.5 129.53 ms/op 138.76 ms/op 0.93
altair processRewardsAndPenalties - 250000 normalcase 66.439 ms/op 67.720 ms/op 0.98
altair processRewardsAndPenalties - 250000 worstcase 66.465 ms/op 68.603 ms/op 0.97
phase0 getAttestationDeltas - 250000 normalcase 6.9535 ms/op 8.9523 ms/op 0.78
phase0 getAttestationDeltas - 250000 worstcase 6.6017 ms/op 8.9166 ms/op 0.74
phase0 processSlashings - 250000 worstcase 3.5868 ms/op 4.1913 ms/op 0.86
altair processSyncCommitteeUpdates - 250000 168.00 ms/op 195.06 ms/op 0.86
BeaconState.hashTreeRoot - No change 341.00 ns/op 377.00 ns/op 0.90
BeaconState.hashTreeRoot - 1 full validator 53.200 us/op 55.479 us/op 0.96
BeaconState.hashTreeRoot - 32 full validator 536.80 us/op 604.71 us/op 0.89
BeaconState.hashTreeRoot - 512 full validator 6.0598 ms/op 6.3717 ms/op 0.95
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 63.922 us/op 72.064 us/op 0.89
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 881.90 us/op 1.0383 ms/op 0.85
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.233 ms/op 13.444 ms/op 0.84
BeaconState.hashTreeRoot - 1 balances 54.701 us/op 52.327 us/op 1.05
BeaconState.hashTreeRoot - 32 balances 440.22 us/op 483.28 us/op 0.91
BeaconState.hashTreeRoot - 512 balances 4.2271 ms/op 5.1360 ms/op 0.82
BeaconState.hashTreeRoot - 250000 balances 77.394 ms/op 79.619 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 16.581 us/op 21.764 us/op 0.76
regular array get 100000 times 33.583 us/op 38.374 us/op 0.88
wrappedArray get 100000 times 33.594 us/op 36.962 us/op 0.91
arrayWithProxy get 100000 times 17.263 ms/op 17.045 ms/op 1.01
ssz.Root.equals 580.00 ns/op 605.00 ns/op 0.96
byteArrayEquals 553.00 ns/op 613.00 ns/op 0.90
shuffle list - 16384 els 7.0994 ms/op 7.6233 ms/op 0.93
shuffle list - 250000 els 103.98 ms/op 108.70 ms/op 0.96
processSlot - 1 slots 8.5840 us/op 10.435 us/op 0.82
processSlot - 32 slots 1.5794 ms/op 1.4745 ms/op 1.07
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.663 ms/op 39.059 ms/op 0.96
getCommitteeAssignments - req 1 vs - 250000 vc 2.9810 ms/op 3.0259 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 4.2069 ms/op 4.3146 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5583 ms/op 4.6975 ms/op 0.97
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7400 ns/op 5.8600 ns/op 0.81
state getBlockRootAtSlot - 250000 vs - 7PWei 615.50 ns/op 935.64 ns/op 0.66
computeProposers - vc 250000 11.353 ms/op 12.091 ms/op 0.94
computeEpochShuffling - vc 250000 106.76 ms/op 115.36 ms/op 0.93
getNextSyncCommittee - vc 250000 189.52 ms/op 187.26 ms/op 1.01

by benchmarkbot/action

@philknows philknows added this to the v1.7.0 milestone Mar 22, 2023
@g11tech g11tech merged commit 9cc3980 into unstable Mar 22, 2023
@g11tech g11tech deleted the g11tech/bls-changes-qlen branch March 22, 2023 15:25
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.7.0 🎉

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.

3 participants