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

chore: enable network thread #5898

Merged
merged 1 commit into from
Aug 23, 2023
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Aug 22, 2023

Motivation

Enable network thread and batch attestation work, if it works well this is a candidate to release v1.11

Description

Please confirm this is not an issue anymore (on feat3) mainly on the test mainnet #5604 and we have all good metrics in #5896

Closes #5604

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 470e4e5 Previous: 7ee07da Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 778.70 us/op 975.06 us/op 0.80
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 133.85 us/op 139.87 us/op 0.96
BLS verify - blst-native 1.5274 ms/op 1.4819 ms/op 1.03
BLS verifyMultipleSignatures 3 - blst-native 3.8609 ms/op 4.0024 ms/op 0.96
BLS verifyMultipleSignatures 8 - blst-native 6.6037 ms/op 7.3089 ms/op 0.90
BLS verifyMultipleSignatures 32 - blst-native 24.379 ms/op 23.622 ms/op 1.03
BLS verifyMultipleSignatures 64 - blst-native 58.316 ms/op 52.434 ms/op 1.11
BLS verifyMultipleSignatures 128 - blst-native 115.86 ms/op 91.238 ms/op 1.27
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.9027 ms/op 1.4795 ms/op 1.29
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.8203 ms/op 1.6771 ms/op 1.09
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.8272 ms/op 2.6524 ms/op 1.07
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.8566 ms/op 3.7523 ms/op 1.03
BLS verifyMultipleSignatures - same message - 128 - blst-native 8.1517 ms/op 7.0878 ms/op 1.15
BLS aggregatePubkeys 32 - blst-native 28.990 us/op 29.879 us/op 0.97
BLS aggregatePubkeys 128 - blst-native 118.48 us/op 112.69 us/op 1.05
getAttestationsForBlock 124.06 ms/op 81.213 ms/op 1.53
isKnown best case - 1 super set check 675.00 ns/op 511.00 ns/op 1.32
isKnown normal case - 2 super set checks 714.00 ns/op 544.00 ns/op 1.31
isKnown worse case - 16 super set checks 725.00 ns/op 532.00 ns/op 1.36
CheckpointStateCache - add get delete 7.9370 us/op 6.1840 us/op 1.28
validate api signedAggregateAndProof - struct 3.8528 ms/op 3.0083 ms/op 1.28
validate gossip signedAggregateAndProof - struct 3.1302 ms/op 3.0722 ms/op 1.02
validate gossip attestation - vc 640000 1.6533 ms/op 1.4122 ms/op 1.17
batch validate gossip attestation - vc 640000 - chunk 32 195.71 us/op 157.49 us/op 1.24
batch validate gossip attestation - vc 640000 - chunk 64 171.89 us/op 137.93 us/op 1.25
batch validate gossip attestation - vc 640000 - chunk 128 156.92 us/op 131.01 us/op 1.20
batch validate gossip attestation - vc 640000 - chunk 256 153.40 us/op 124.29 us/op 1.23
pickEth1Vote - no votes 1.8350 ms/op 1.4309 ms/op 1.28
pickEth1Vote - max votes 17.263 ms/op 11.762 ms/op 1.47
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.996 ms/op 9.7763 ms/op 1.12
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.992 ms/op 15.376 ms/op 1.50
pickEth1Vote - Eth1Data fastSerialize value x2048 1.1419 ms/op 595.49 us/op 1.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.9217 ms/op 4.3044 ms/op 2.07
bytes32 toHexString 948.00 ns/op 498.00 ns/op 1.90
bytes32 Buffer.toString(hex) 695.00 ns/op 299.00 ns/op 2.32
bytes32 Buffer.toString(hex) from Uint8Array 848.00 ns/op 439.00 ns/op 1.93
bytes32 Buffer.toString(hex) + 0x 621.00 ns/op 294.00 ns/op 2.11
Object access 1 prop 0.32800 ns/op 0.16200 ns/op 2.02
Map access 1 prop 0.29400 ns/op 0.15100 ns/op 1.95
Object get x1000 10.710 ns/op 7.4890 ns/op 1.43
Map get x1000 1.3090 ns/op 0.64900 ns/op 2.02
Object set x1000 88.638 ns/op 50.481 ns/op 1.76
Map set x1000 66.282 ns/op 39.772 ns/op 1.67
Return object 10000 times 0.57820 ns/op 0.26070 ns/op 2.22
Throw Error 10000 times 6.5134 us/op 4.0146 us/op 1.62
fastMsgIdFn sha256 / 200 bytes 4.5940 us/op 3.3940 us/op 1.35
fastMsgIdFn h32 xxhash / 200 bytes 636.00 ns/op 283.00 ns/op 2.25
fastMsgIdFn h64 xxhash / 200 bytes 784.00 ns/op 344.00 ns/op 2.28
fastMsgIdFn sha256 / 1000 bytes 15.840 us/op 11.705 us/op 1.35
fastMsgIdFn h32 xxhash / 1000 bytes 845.00 ns/op 414.00 ns/op 2.04
fastMsgIdFn h64 xxhash / 1000 bytes 909.00 ns/op 421.00 ns/op 2.16
fastMsgIdFn sha256 / 10000 bytes 144.45 us/op 107.10 us/op 1.35
fastMsgIdFn h32 xxhash / 10000 bytes 2.6060 us/op 2.0200 us/op 1.29
fastMsgIdFn h64 xxhash / 10000 bytes 2.0430 us/op 1.3890 us/op 1.47
enrSubnets - fastDeserialize 64 bits 2.3880 us/op 1.2530 us/op 1.91
enrSubnets - ssz BitVector 64 bits 1.0170 us/op 429.00 ns/op 2.37
enrSubnets - fastDeserialize 4 bits 330.00 ns/op 167.00 ns/op 1.98
enrSubnets - ssz BitVector 4 bits 637.00 ns/op 436.00 ns/op 1.46
prioritizePeers score -10:0 att 32-0.1 sync 2-0 207.90 us/op 104.62 us/op 1.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 204.45 us/op 133.81 us/op 1.53
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 296.31 us/op 169.87 us/op 1.74
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 503.17 us/op 301.39 us/op 1.67
prioritizePeers score 0:0 att 64-1 sync 4-1 519.60 us/op 356.32 us/op 1.46
array of 16000 items push then shift 2.1597 us/op 1.7042 us/op 1.27
LinkedList of 16000 items push then shift 16.652 ns/op 9.1480 ns/op 1.82
array of 16000 items push then pop 173.89 ns/op 76.580 ns/op 2.27
LinkedList of 16000 items push then pop 13.657 ns/op 8.9370 ns/op 1.53
array of 24000 items push then shift 3.9949 us/op 2.5611 us/op 1.56
LinkedList of 24000 items push then shift 19.869 ns/op 9.2480 ns/op 2.15
array of 24000 items push then pop 249.88 ns/op 104.93 ns/op 2.38
LinkedList of 24000 items push then pop 13.914 ns/op 9.0380 ns/op 1.54
intersect bitArray bitLen 8 8.6640 ns/op 7.1260 ns/op 1.22
intersect array and set length 8 121.88 ns/op 57.685 ns/op 2.11
intersect bitArray bitLen 128 49.849 ns/op 34.069 ns/op 1.46
intersect array and set length 128 1.4914 us/op 790.16 ns/op 1.89
bitArray.getTrueBitIndexes() bitLen 128 2.4200 us/op 1.5500 us/op 1.56
bitArray.getTrueBitIndexes() bitLen 248 3.8090 us/op 2.5270 us/op 1.51
bitArray.getTrueBitIndexes() bitLen 512 8.2120 us/op 5.1090 us/op 1.61
Buffer.concat 32 items 1.5650 us/op 1.0130 us/op 1.54
Uint8Array.set 32 items 3.3170 us/op 1.7680 us/op 1.88
Set add up to 64 items then delete first 5.4225 us/op 4.4564 us/op 1.22
OrderedSet add up to 64 items then delete first 8.5744 us/op 5.6545 us/op 1.52
Set add up to 64 items then delete last 6.0810 us/op 4.7278 us/op 1.29
OrderedSet add up to 64 items then delete last 7.7975 us/op 6.9488 us/op 1.12
Set add up to 64 items then delete middle 6.5396 us/op 5.0249 us/op 1.30
OrderedSet add up to 64 items then delete middle 11.368 us/op 7.9487 us/op 1.43
Set add up to 128 items then delete first 11.809 us/op 9.8833 us/op 1.19
OrderedSet add up to 128 items then delete first 16.778 us/op 11.941 us/op 1.41
Set add up to 128 items then delete last 11.994 us/op 9.5461 us/op 1.26
OrderedSet add up to 128 items then delete last 16.878 us/op 12.798 us/op 1.32
Set add up to 128 items then delete middle 11.459 us/op 9.4051 us/op 1.22
OrderedSet add up to 128 items then delete middle 24.511 us/op 18.362 us/op 1.33
Set add up to 256 items then delete first 22.708 us/op 18.912 us/op 1.20
OrderedSet add up to 256 items then delete first 30.697 us/op 24.091 us/op 1.27
Set add up to 256 items then delete last 21.369 us/op 18.804 us/op 1.14
OrderedSet add up to 256 items then delete last 28.715 us/op 24.844 us/op 1.16
Set add up to 256 items then delete middle 22.490 us/op 18.577 us/op 1.21
OrderedSet add up to 256 items then delete middle 61.326 us/op 45.747 us/op 1.34
transfer serialized Status (84 B) 2.1780 us/op 1.7910 us/op 1.22
copy serialized Status (84 B) 1.9050 us/op 1.4880 us/op 1.28
transfer serialized SignedVoluntaryExit (112 B) 2.1470 us/op 1.8890 us/op 1.14
copy serialized SignedVoluntaryExit (112 B) 1.7950 us/op 1.5540 us/op 1.16
transfer serialized ProposerSlashing (416 B) 2.5890 us/op 1.9900 us/op 1.30
copy serialized ProposerSlashing (416 B) 3.6610 us/op 1.8120 us/op 2.02
transfer serialized Attestation (485 B) 3.6450 us/op 2.0360 us/op 1.79
copy serialized Attestation (485 B) 3.5550 us/op 1.8950 us/op 1.88
transfer serialized AttesterSlashing (33232 B) 4.0580 us/op 2.1550 us/op 1.88
copy serialized AttesterSlashing (33232 B) 10.602 us/op 4.8050 us/op 2.21
transfer serialized Small SignedBeaconBlock (128000 B) 4.3540 us/op 2.4150 us/op 1.80
copy serialized Small SignedBeaconBlock (128000 B) 23.650 us/op 12.297 us/op 1.92
transfer serialized Avg SignedBeaconBlock (200000 B) 4.3160 us/op 2.7420 us/op 1.57
copy serialized Avg SignedBeaconBlock (200000 B) 35.627 us/op 17.859 us/op 1.99
transfer serialized BlobsSidecar (524380 B) 5.1660 us/op 2.6720 us/op 1.93
copy serialized BlobsSidecar (524380 B) 114.58 us/op 88.157 us/op 1.30
transfer serialized Big SignedBeaconBlock (1000000 B) 4.6030 us/op 2.7800 us/op 1.66
copy serialized Big SignedBeaconBlock (1000000 B) 219.65 us/op 323.93 us/op 0.68
pass gossip attestations to forkchoice per slot 4.6565 ms/op 3.7974 ms/op 1.23
forkChoice updateHead vc 100000 bc 64 eq 0 811.76 us/op 704.15 us/op 1.15
forkChoice updateHead vc 600000 bc 64 eq 0 8.8646 ms/op 4.2876 ms/op 2.07
forkChoice updateHead vc 1000000 bc 64 eq 0 8.8948 ms/op 7.6505 ms/op 1.16
forkChoice updateHead vc 600000 bc 320 eq 0 4.9565 ms/op 4.2539 ms/op 1.17
forkChoice updateHead vc 600000 bc 1200 eq 0 5.5605 ms/op 4.3756 ms/op 1.27
forkChoice updateHead vc 600000 bc 7200 eq 0 6.5652 ms/op 5.6227 ms/op 1.17
forkChoice updateHead vc 600000 bc 64 eq 1000 13.929 ms/op 11.484 ms/op 1.21
forkChoice updateHead vc 600000 bc 64 eq 10000 14.647 ms/op 12.331 ms/op 1.19
forkChoice updateHead vc 600000 bc 64 eq 300000 40.789 ms/op 17.676 ms/op 2.31
computeDeltas 500000 validators 300 proto nodes 7.2279 ms/op 6.4671 ms/op 1.12
computeDeltas 500000 validators 1200 proto nodes 7.2137 ms/op 6.2685 ms/op 1.15
computeDeltas 500000 validators 7200 proto nodes 7.2550 ms/op 6.1867 ms/op 1.17
computeDeltas 750000 validators 300 proto nodes 11.362 ms/op 9.3795 ms/op 1.21
computeDeltas 750000 validators 1200 proto nodes 11.514 ms/op 9.2878 ms/op 1.24
computeDeltas 750000 validators 7200 proto nodes 11.330 ms/op 9.3147 ms/op 1.22
computeDeltas 1400000 validators 300 proto nodes 20.558 ms/op 17.629 ms/op 1.17
computeDeltas 1400000 validators 1200 proto nodes 20.852 ms/op 17.583 ms/op 1.19
computeDeltas 1400000 validators 7200 proto nodes 21.120 ms/op 17.920 ms/op 1.18
computeDeltas 2100000 validators 300 proto nodes 30.199 ms/op 26.707 ms/op 1.13
computeDeltas 2100000 validators 1200 proto nodes 26.694 ms/op 26.891 ms/op 0.99
computeDeltas 2100000 validators 7200 proto nodes 26.461 ms/op 26.843 ms/op 0.99
computeProposerBoostScoreFromBalances 500000 validators 3.2253 ms/op 3.2897 ms/op 0.98
computeProposerBoostScoreFromBalances 750000 validators 3.2370 ms/op 3.2918 ms/op 0.98
computeProposerBoostScoreFromBalances 1400000 validators 3.2037 ms/op 3.2841 ms/op 0.98
computeProposerBoostScoreFromBalances 2100000 validators 3.2745 ms/op 3.2582 ms/op 1.00
altair processAttestation - 250000 vs - 7PWei normalcase 2.7578 ms/op 2.1380 ms/op 1.29
altair processAttestation - 250000 vs - 7PWei worstcase 3.9401 ms/op 3.2039 ms/op 1.23
altair processAttestation - setStatus - 1/6 committees join 191.63 us/op 139.17 us/op 1.38
altair processAttestation - setStatus - 1/3 committees join 348.19 us/op 278.38 us/op 1.25
altair processAttestation - setStatus - 1/2 committees join 467.18 us/op 377.16 us/op 1.24
altair processAttestation - setStatus - 2/3 committees join 589.63 us/op 480.57 us/op 1.23
altair processAttestation - setStatus - 4/5 committees join 820.71 us/op 654.18 us/op 1.25
altair processAttestation - setStatus - 100% committees join 934.50 us/op 762.57 us/op 1.23
altair processBlock - 250000 vs - 7PWei normalcase 9.8000 ms/op 9.9597 ms/op 0.98
altair processBlock - 250000 vs - 7PWei normalcase hashState 17.781 ms/op 17.746 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase 39.060 ms/op 38.809 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase hashState 64.038 ms/op 62.723 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei normalcase 2.9379 ms/op 3.0088 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei worstcase 31.938 ms/op 31.984 ms/op 1.00
altair processEth1Data - 250000 vs - 7PWei normalcase 547.61 us/op 604.47 us/op 0.91
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 13.315 us/op 15.488 us/op 0.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 82.412 us/op 74.741 us/op 1.10
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 26.636 us/op 13.450 us/op 1.98
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 21.164 us/op 12.355 us/op 1.71
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 203.07 us/op 199.08 us/op 1.02
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2389 ms/op 1.3463 ms/op 0.92
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9101 ms/op 1.6298 ms/op 1.17
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5836 ms/op 1.5687 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9104 ms/op 3.5116 ms/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.9419 ms/op 2.4339 ms/op 1.21
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.2680 ms/op 5.4354 ms/op 1.15
Tree 40 250000 create 674.17 ms/op 345.41 ms/op 1.95
Tree 40 250000 get(125000) 234.78 ns/op 202.85 ns/op 1.16
Tree 40 250000 set(125000) 1.6597 us/op 920.84 ns/op 1.80
Tree 40 250000 toArray() 26.972 ms/op 20.224 ms/op 1.33
Tree 40 250000 iterate all - toArray() + loop 29.299 ms/op 20.695 ms/op 1.42
Tree 40 250000 iterate all - get(i) 87.330 ms/op 71.141 ms/op 1.23
MutableVector 250000 create 17.879 ms/op 10.750 ms/op 1.66
MutableVector 250000 get(125000) 7.5130 ns/op 6.5320 ns/op 1.15
MutableVector 250000 set(125000) 565.67 ns/op 280.93 ns/op 2.01
MutableVector 250000 toArray() 4.7751 ms/op 3.5194 ms/op 1.36
MutableVector 250000 iterate all - toArray() + loop 5.3341 ms/op 3.4248 ms/op 1.56
MutableVector 250000 iterate all - get(i) 1.7097 ms/op 1.5434 ms/op 1.11
Array 250000 create 4.0503 ms/op 2.9276 ms/op 1.38
Array 250000 clone - spread 1.2640 ms/op 1.0252 ms/op 1.23
Array 250000 get(125000) 0.63200 ns/op 0.49600 ns/op 1.27
Array 250000 set(125000) 0.78000 ns/op 0.56800 ns/op 1.37
Array 250000 iterate all - loop 100.71 us/op 83.459 us/op 1.21
effectiveBalanceIncrements clone Uint8Array 300000 44.730 us/op 25.758 us/op 1.74
effectiveBalanceIncrements clone MutableVector 300000 290.00 ns/op 261.00 ns/op 1.11
effectiveBalanceIncrements rw all Uint8Array 300000 199.81 us/op 177.22 us/op 1.13
effectiveBalanceIncrements rw all MutableVector 300000 101.72 ms/op 76.613 ms/op 1.33
phase0 afterProcessEpoch - 250000 vs - 7PWei 133.11 ms/op 115.05 ms/op 1.16
phase0 beforeProcessEpoch - 250000 vs - 7PWei 52.317 ms/op 39.645 ms/op 1.32
altair processEpoch - mainnet_e81889 405.33 ms/op 332.14 ms/op 1.22
mainnet_e81889 - altair beforeProcessEpoch 80.001 ms/op 49.140 ms/op 1.63
mainnet_e81889 - altair processJustificationAndFinalization 27.665 us/op 15.518 us/op 1.78
mainnet_e81889 - altair processInactivityUpdates 7.0482 ms/op 5.8721 ms/op 1.20
mainnet_e81889 - altair processRewardsAndPenalties 81.294 ms/op 60.483 ms/op 1.34
mainnet_e81889 - altair processRegistryUpdates 5.4540 us/op 2.4030 us/op 2.27
mainnet_e81889 - altair processSlashings 918.00 ns/op 391.00 ns/op 2.35
mainnet_e81889 - altair processEth1DataReset 604.00 ns/op 495.00 ns/op 1.22
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4379 ms/op 1.2377 ms/op 1.16
mainnet_e81889 - altair processSlashingsReset 5.5220 us/op 3.2980 us/op 1.67
mainnet_e81889 - altair processRandaoMixesReset 7.6690 us/op 4.8710 us/op 1.57
mainnet_e81889 - altair processHistoricalRootsUpdate 736.00 ns/op 752.00 ns/op 0.98
mainnet_e81889 - altair processParticipationFlagUpdates 2.3660 us/op 5.3910 us/op 0.44
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0660 us/op 1.5410 us/op 0.69
mainnet_e81889 - altair afterProcessEpoch 130.92 ms/op 124.20 ms/op 1.05
capella processEpoch - mainnet_e217614 1.0462 s/op 1.0210 s/op 1.02
mainnet_e217614 - capella beforeProcessEpoch 247.27 ms/op 243.03 ms/op 1.02
mainnet_e217614 - capella processJustificationAndFinalization 15.283 us/op 12.962 us/op 1.18
mainnet_e217614 - capella processInactivityUpdates 19.711 ms/op 15.725 ms/op 1.25
mainnet_e217614 - capella processRewardsAndPenalties 300.77 ms/op 275.54 ms/op 1.09
mainnet_e217614 - capella processRegistryUpdates 19.938 us/op 19.817 us/op 1.01
mainnet_e217614 - capella processSlashings 681.00 ns/op 482.00 ns/op 1.41
mainnet_e217614 - capella processEth1DataReset 566.00 ns/op 488.00 ns/op 1.16
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.1885 ms/op 4.2483 ms/op 0.99
mainnet_e217614 - capella processSlashingsReset 2.4000 us/op 2.4670 us/op 0.97
mainnet_e217614 - capella processRandaoMixesReset 4.0950 us/op 4.2150 us/op 0.97
mainnet_e217614 - capella processHistoricalRootsUpdate 466.00 ns/op 519.00 ns/op 0.90
mainnet_e217614 - capella processParticipationFlagUpdates 2.7600 us/op 2.2530 us/op 1.23
mainnet_e217614 - capella afterProcessEpoch 309.61 ms/op 319.10 ms/op 0.97
phase0 processEpoch - mainnet_e58758 345.93 ms/op 339.91 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 129.45 ms/op 139.15 ms/op 0.93
mainnet_e58758 - phase0 processJustificationAndFinalization 20.557 us/op 15.611 us/op 1.32
mainnet_e58758 - phase0 processRewardsAndPenalties 45.297 ms/op 41.924 ms/op 1.08
mainnet_e58758 - phase0 processRegistryUpdates 12.119 us/op 10.480 us/op 1.16
mainnet_e58758 - phase0 processSlashings 588.00 ns/op 549.00 ns/op 1.07
mainnet_e58758 - phase0 processEth1DataReset 559.00 ns/op 509.00 ns/op 1.10
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0674 ms/op 2.0574 ms/op 0.52
mainnet_e58758 - phase0 processSlashingsReset 2.4210 us/op 7.9920 us/op 0.30
mainnet_e58758 - phase0 processRandaoMixesReset 4.0850 us/op 20.876 us/op 0.20
mainnet_e58758 - phase0 processHistoricalRootsUpdate 649.00 ns/op 1.8520 us/op 0.35
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.5750 us/op 12.978 us/op 0.51
mainnet_e58758 - phase0 afterProcessEpoch 105.90 ms/op 133.50 ms/op 0.79
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3743 ms/op 2.1944 ms/op 0.63
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.4696 ms/op 2.4789 ms/op 0.59
altair processInactivityUpdates - 250000 normalcase 29.248 ms/op 26.992 ms/op 1.08
altair processInactivityUpdates - 250000 worstcase 27.277 ms/op 24.472 ms/op 1.11
phase0 processRegistryUpdates - 250000 normalcase 11.790 us/op 9.6880 us/op 1.22
phase0 processRegistryUpdates - 250000 badcase_full_deposits 336.24 us/op 389.76 us/op 0.86
phase0 processRegistryUpdates - 250000 worstcase 0.5 144.26 ms/op 138.56 ms/op 1.04
altair processRewardsAndPenalties - 250000 normalcase 69.406 ms/op 73.141 ms/op 0.95
altair processRewardsAndPenalties - 250000 worstcase 70.013 ms/op 84.164 ms/op 0.83
phase0 getAttestationDeltas - 250000 normalcase 9.6039 ms/op 11.449 ms/op 0.84
phase0 getAttestationDeltas - 250000 worstcase 8.8141 ms/op 11.634 ms/op 0.76
phase0 processSlashings - 250000 worstcase 2.6308 ms/op 3.2964 ms/op 0.80
altair processSyncCommitteeUpdates - 250000 172.06 ms/op 175.41 ms/op 0.98
BeaconState.hashTreeRoot - No change 326.00 ns/op 267.00 ns/op 1.22
BeaconState.hashTreeRoot - 1 full validator 56.793 us/op 57.625 us/op 0.99
BeaconState.hashTreeRoot - 32 full validator 669.51 us/op 557.43 us/op 1.20
BeaconState.hashTreeRoot - 512 full validator 6.9907 ms/op 7.1557 ms/op 0.98
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 78.987 us/op 80.037 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 988.37 us/op 1.0519 ms/op 0.94
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.070 ms/op 14.832 ms/op 0.95
BeaconState.hashTreeRoot - 1 balances 52.608 us/op 62.416 us/op 0.84
BeaconState.hashTreeRoot - 32 balances 574.42 us/op 580.22 us/op 0.99
BeaconState.hashTreeRoot - 512 balances 5.2553 ms/op 5.9085 ms/op 0.89
BeaconState.hashTreeRoot - 250000 balances 83.991 ms/op 86.502 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 21.188 us/op 23.717 us/op 0.89
regular array get 100000 times 45.051 us/op 51.607 us/op 0.87
wrappedArray get 100000 times 43.263 us/op 44.241 us/op 0.98
arrayWithProxy get 100000 times 15.291 ms/op 17.997 ms/op 0.85
ssz.Root.equals 256.00 ns/op 389.00 ns/op 0.66
byteArrayEquals 262.00 ns/op 318.00 ns/op 0.82
shuffle list - 16384 els 7.9837 ms/op 7.6987 ms/op 1.04
shuffle list - 250000 els 111.10 ms/op 116.21 ms/op 0.96
processSlot - 1 slots 10.054 us/op 10.251 us/op 0.98
processSlot - 32 slots 1.5798 ms/op 1.7232 ms/op 0.92
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 64.038 ms/op 66.654 ms/op 0.96
getCommitteeAssignments - req 1 vs - 250000 vc 2.7901 ms/op 2.9142 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 3.8962 ms/op 4.2156 ms/op 0.92
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5849 ms/op 4.5858 ms/op 1.00
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.8100 ns/op 5.8700 ns/op 0.99
state getBlockRootAtSlot - 250000 vs - 7PWei 973.63 ns/op 847.75 ns/op 1.15
computeProposers - vc 250000 10.340 ms/op 10.151 ms/op 1.02
computeEpochShuffling - vc 250000 117.61 ms/op 126.97 ms/op 0.93
getNextSyncCommittee - vc 250000 189.81 ms/op 164.87 ms/op 1.15
computeSigningRoot for AttestationData 15.746 us/op 15.596 us/op 1.01
hash AttestationData serialized data then Buffer.toString(base64) 2.5726 us/op 2.5570 us/op 1.01
toHexString serialized data 1.6444 us/op 1.6669 us/op 0.99
Buffer.toString(base64) 337.35 ns/op 281.94 ns/op 1.20

by benchmarkbot/action

@wemeetagain wemeetagain added this to the v1.11.0 milestone Aug 22, 2023
@twoeths
Copy link
Contributor Author

twoeths commented Aug 23, 2023

Metrics look good, please review on feat3

rss increased and got stablized at ~8.2GB (but it was up to 9GB in my old branch), this is from the test mainnet node
Screenshot 2023-08-23 at 10 16 03

The below is max rss of unstable vs this branch

number of validators per node unstable this branch
mainnet - no validator. 6.3GB. 8.2GB.
goerli - 1k 5.3GB. 6.6GB.
goerli - 16. 5.3GB. 6.8GB
goerli - 64. 5.2GB. 6GB.
goerli - 1. 5.4GB. 6.2GB.
goerli - no validator. 5GB. 6GB.

so it's ~2GB increase on a test mainnet node subscribing to all subnets cc @philknows

@twoeths twoeths marked this pull request as ready for review August 23, 2023 03:24
@twoeths twoeths requested a review from a team as a code owner August 23, 2023 03:24
@philknows
Copy link
Member

LGTM. At least we will be a better network peer for an additional 2GB of memory. Great work!

@wemeetagain wemeetagain merged commit 67d0aea into unstable Aug 23, 2023
11 checks passed
@wemeetagain wemeetagain deleted the tuyen/enable_network_thread branch August 23, 2023 14:27
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.

Network worker extremely busy / high event loop lag / high I/O lag
3 participants