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

feat: added ELU metrics #6820

Closed
wants to merge 4 commits into from
Closed

feat: added ELU metrics #6820

wants to merge 4 commits into from

Conversation

jeluard
Copy link
Contributor

@jeluard jeluard commented May 28, 2024

Motivation

Add extra metrics related to Event Loop utilization

Description

Relies on node:perf_hooks to track Event Loop utilization metrics: Adds the following histograms:

  • utilization akin to CPU utilization, but for ELU; between 0 and 1
  • idle how long the ELU was idle since last poll (every 5s by default)
  • active how long the ELU was active since last poll (every 5s by default)

Those metrics are tracked on main thread and currently monitored worker threads.

Copy link
Contributor

github-actions bot commented May 28, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: c8c8528 Previous: a122876 Ratio
computeDeltas 750000 validators 7200 proto nodes 5.2049 ms/op 15.754 ms/op 0.33
Full benchmark results
Benchmark suite Current: c8c8528 Previous: a122876 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 937.34 us/op 932.06 us/op 1.01
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 48.683 us/op 63.329 us/op 0.77
BLS verify - blst-native 1.2387 ms/op 1.7038 ms/op 0.73
BLS verifyMultipleSignatures 3 - blst-native 2.5897 ms/op 4.5114 ms/op 0.57
BLS verifyMultipleSignatures 8 - blst-native 5.7146 ms/op 7.6280 ms/op 0.75
BLS verifyMultipleSignatures 32 - blst-native 21.282 ms/op 24.018 ms/op 0.89
BLS verifyMultipleSignatures 64 - blst-native 41.346 ms/op 52.011 ms/op 0.79
BLS verifyMultipleSignatures 128 - blst-native 81.758 ms/op 100.19 ms/op 0.82
BLS deserializing 10000 signatures 839.38 ms/op 1.0395 s/op 0.81
BLS deserializing 100000 signatures 8.6875 s/op 12.252 s/op 0.71
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.2607 ms/op 1.5704 ms/op 0.80
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4309 ms/op 1.8379 ms/op 0.78
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3737 ms/op 2.8917 ms/op 0.82
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.6948 ms/op 5.7955 ms/op 0.64
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.3748 ms/op 7.8644 ms/op 0.81
BLS aggregatePubkeys 32 - blst-native 25.036 us/op 31.852 us/op 0.79
BLS aggregatePubkeys 128 - blst-native 98.541 us/op 116.55 us/op 0.85
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 58.557 ms/op 83.789 ms/op 0.70
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 56.775 ms/op 101.39 ms/op 0.56
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 31.419 ms/op 59.477 ms/op 0.53
getSlashingsAndExits - default max 97.516 us/op 180.09 us/op 0.54
getSlashingsAndExits - 2k 278.41 us/op 392.30 us/op 0.71
proposeBlockBody type=full, size=empty 5.7271 ms/op 12.519 ms/op 0.46
isKnown best case - 1 super set check 296.00 ns/op 692.00 ns/op 0.43
isKnown normal case - 2 super set checks 332.00 ns/op 649.00 ns/op 0.51
isKnown worse case - 16 super set checks 297.00 ns/op 524.00 ns/op 0.57
InMemoryCheckpointStateCache - add get delete 4.9690 us/op 9.9660 us/op 0.50
validate api signedAggregateAndProof - struct 2.6359 ms/op 5.2413 ms/op 0.50
validate gossip signedAggregateAndProof - struct 2.6700 ms/op 5.7192 ms/op 0.47
validate gossip attestation - vc 640000 1.2812 ms/op 2.3253 ms/op 0.55
batch validate gossip attestation - vc 640000 - chunk 32 151.42 us/op 214.95 us/op 0.70
batch validate gossip attestation - vc 640000 - chunk 64 134.39 us/op 195.28 us/op 0.69
batch validate gossip attestation - vc 640000 - chunk 128 129.04 us/op 162.03 us/op 0.80
batch validate gossip attestation - vc 640000 - chunk 256 122.74 us/op 154.84 us/op 0.79
pickEth1Vote - no votes 1.1397 ms/op 1.6736 ms/op 0.68
pickEth1Vote - max votes 7.3634 ms/op 12.059 ms/op 0.61
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.710 ms/op 24.560 ms/op 0.52
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.389 ms/op 31.134 ms/op 0.53
pickEth1Vote - Eth1Data fastSerialize value x2048 527.07 us/op 868.93 us/op 0.61
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.8408 ms/op 10.140 ms/op 0.38
bytes32 toHexString 452.00 ns/op 764.00 ns/op 0.59
bytes32 Buffer.toString(hex) 248.00 ns/op 423.00 ns/op 0.59
bytes32 Buffer.toString(hex) from Uint8Array 378.00 ns/op 637.00 ns/op 0.59
bytes32 Buffer.toString(hex) + 0x 253.00 ns/op 345.00 ns/op 0.73
Object access 1 prop 0.13900 ns/op 0.19300 ns/op 0.72
Map access 1 prop 0.13600 ns/op 0.18200 ns/op 0.75
Object get x1000 5.8970 ns/op 8.8280 ns/op 0.67
Map get x1000 6.5530 ns/op 10.192 ns/op 0.64
Object set x1000 33.513 ns/op 43.141 ns/op 0.78
Map set x1000 22.463 ns/op 34.027 ns/op 0.66
Return object 10000 times 0.29110 ns/op 0.38220 ns/op 0.76
Throw Error 10000 times 3.3634 us/op 4.4605 us/op 0.75
fastMsgIdFn sha256 / 200 bytes 2.1460 us/op 2.9230 us/op 0.73
fastMsgIdFn h32 xxhash / 200 bytes 221.00 ns/op 315.00 ns/op 0.70
fastMsgIdFn h64 xxhash / 200 bytes 274.00 ns/op 357.00 ns/op 0.77
fastMsgIdFn sha256 / 1000 bytes 7.2660 us/op 9.2750 us/op 0.78
fastMsgIdFn h32 xxhash / 1000 bytes 403.00 ns/op 538.00 ns/op 0.75
fastMsgIdFn h64 xxhash / 1000 bytes 338.00 ns/op 550.00 ns/op 0.61
fastMsgIdFn sha256 / 10000 bytes 64.006 us/op 93.927 us/op 0.68
fastMsgIdFn h32 xxhash / 10000 bytes 1.8560 us/op 2.9630 us/op 0.63
fastMsgIdFn h64 xxhash / 10000 bytes 1.2320 us/op 1.6220 us/op 0.76
send data - 1000 256B messages 13.195 ms/op 16.817 ms/op 0.78
send data - 1000 512B messages 16.908 ms/op 19.543 ms/op 0.87
send data - 1000 1024B messages 25.850 ms/op 31.385 ms/op 0.82
send data - 1000 1200B messages 27.343 ms/op 30.823 ms/op 0.89
send data - 1000 2048B messages 33.160 ms/op 41.383 ms/op 0.80
send data - 1000 4096B messages 28.606 ms/op 46.092 ms/op 0.62
send data - 1000 16384B messages 71.183 ms/op 96.357 ms/op 0.74
send data - 1000 65536B messages 209.82 ms/op 384.31 ms/op 0.55
enrSubnets - fastDeserialize 64 bits 1.1280 us/op 2.4010 us/op 0.47
enrSubnets - ssz BitVector 64 bits 415.00 ns/op 1.0170 us/op 0.41
enrSubnets - fastDeserialize 4 bits 160.00 ns/op 291.00 ns/op 0.55
enrSubnets - ssz BitVector 4 bits 343.00 ns/op 631.00 ns/op 0.54
prioritizePeers score -10:0 att 32-0.1 sync 2-0 154.81 us/op 195.46 us/op 0.79
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 150.71 us/op 317.07 us/op 0.48
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 221.08 us/op 577.79 us/op 0.38
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 382.54 us/op 742.28 us/op 0.52
prioritizePeers score 0:0 att 64-1 sync 4-1 639.23 us/op 1.2730 ms/op 0.50
array of 16000 items push then shift 1.6282 us/op 2.2832 us/op 0.71
LinkedList of 16000 items push then shift 7.2540 ns/op 14.736 ns/op 0.49
array of 16000 items push then pop 125.56 ns/op 178.13 ns/op 0.70
LinkedList of 16000 items push then pop 7.2690 ns/op 10.685 ns/op 0.68
array of 24000 items push then shift 2.4279 us/op 3.0965 us/op 0.78
LinkedList of 24000 items push then shift 7.7300 ns/op 8.9230 ns/op 0.87
array of 24000 items push then pop 159.45 ns/op 307.16 ns/op 0.52
LinkedList of 24000 items push then pop 7.1150 ns/op 12.472 ns/op 0.57
intersect bitArray bitLen 8 6.4180 ns/op 12.864 ns/op 0.50
intersect array and set length 8 47.507 ns/op 86.138 ns/op 0.55
intersect bitArray bitLen 128 29.943 ns/op 48.202 ns/op 0.62
intersect array and set length 128 816.61 ns/op 1.3644 us/op 0.60
bitArray.getTrueBitIndexes() bitLen 128 2.4600 us/op 3.1620 us/op 0.78
bitArray.getTrueBitIndexes() bitLen 248 3.2350 us/op 4.3900 us/op 0.74
bitArray.getTrueBitIndexes() bitLen 512 7.3750 us/op 12.721 us/op 0.58
Buffer.concat 32 items 1.0120 us/op 2.1010 us/op 0.48
Uint8Array.set 32 items 1.5890 us/op 2.3600 us/op 0.67
Buffer.copy 1.8210 us/op 2.8670 us/op 0.64
Uint8Array.set - with subarray 3.4190 us/op 4.6270 us/op 0.74
Uint8Array.set - without subarray 1.7860 us/op 2.0980 us/op 0.85
Set add up to 64 items then delete first 3.2987 us/op 3.9412 us/op 0.84
OrderedSet add up to 64 items then delete first 4.6376 us/op 5.3481 us/op 0.87
Set add up to 64 items then delete last 3.5878 us/op 5.4798 us/op 0.65
OrderedSet add up to 64 items then delete last 5.4175 us/op 8.6402 us/op 0.63
Set add up to 64 items then delete middle 3.5441 us/op 6.4341 us/op 0.55
OrderedSet add up to 64 items then delete middle 7.2295 us/op 8.4479 us/op 0.86
Set add up to 128 items then delete first 7.1295 us/op 8.2149 us/op 0.87
OrderedSet add up to 128 items then delete first 11.163 us/op 17.919 us/op 0.62
Set add up to 128 items then delete last 7.0850 us/op 10.909 us/op 0.65
OrderedSet add up to 128 items then delete last 11.006 us/op 15.470 us/op 0.71
Set add up to 128 items then delete middle 7.0016 us/op 8.4124 us/op 0.83
OrderedSet add up to 128 items then delete middle 17.914 us/op 26.613 us/op 0.67
Set add up to 256 items then delete first 14.739 us/op 22.612 us/op 0.65
OrderedSet add up to 256 items then delete first 23.063 us/op 36.048 us/op 0.64
Set add up to 256 items then delete last 14.456 us/op 19.398 us/op 0.75
OrderedSet add up to 256 items then delete last 22.300 us/op 31.222 us/op 0.71
Set add up to 256 items then delete middle 13.773 us/op 16.712 us/op 0.82
OrderedSet add up to 256 items then delete middle 49.772 us/op 87.938 us/op 0.57
transfer serialized Status (84 B) 1.4370 us/op 3.3120 us/op 0.43
copy serialized Status (84 B) 1.3200 us/op 2.4770 us/op 0.53
transfer serialized SignedVoluntaryExit (112 B) 1.5990 us/op 2.9260 us/op 0.55
copy serialized SignedVoluntaryExit (112 B) 1.3870 us/op 2.4080 us/op 0.58
transfer serialized ProposerSlashing (416 B) 1.9520 us/op 3.1840 us/op 0.61
copy serialized ProposerSlashing (416 B) 1.8870 us/op 3.3510 us/op 0.56
transfer serialized Attestation (485 B) 2.5560 us/op 3.7490 us/op 0.68
copy serialized Attestation (485 B) 2.8020 us/op 3.1960 us/op 0.88
transfer serialized AttesterSlashing (33232 B) 2.6370 us/op 4.2530 us/op 0.62
copy serialized AttesterSlashing (33232 B) 9.8490 us/op 13.243 us/op 0.74
transfer serialized Small SignedBeaconBlock (128000 B) 3.4210 us/op 7.4400 us/op 0.46
copy serialized Small SignedBeaconBlock (128000 B) 25.064 us/op 39.095 us/op 0.64
transfer serialized Avg SignedBeaconBlock (200000 B) 3.8980 us/op 6.4500 us/op 0.60
copy serialized Avg SignedBeaconBlock (200000 B) 33.703 us/op 49.697 us/op 0.68
transfer serialized BlobsSidecar (524380 B) 4.3980 us/op 7.1830 us/op 0.61
copy serialized BlobsSidecar (524380 B) 104.03 us/op 118.32 us/op 0.88
transfer serialized Big SignedBeaconBlock (1000000 B) 4.1420 us/op 8.0190 us/op 0.52
copy serialized Big SignedBeaconBlock (1000000 B) 172.34 us/op 230.63 us/op 0.75
pass gossip attestations to forkchoice per slot 3.2665 ms/op 7.7450 ms/op 0.42
forkChoice updateHead vc 100000 bc 64 eq 0 619.02 us/op 878.47 us/op 0.70
forkChoice updateHead vc 600000 bc 64 eq 0 3.0991 ms/op 5.3049 ms/op 0.58
forkChoice updateHead vc 1000000 bc 64 eq 0 5.4266 ms/op 12.353 ms/op 0.44
forkChoice updateHead vc 600000 bc 320 eq 0 3.8421 ms/op 6.4293 ms/op 0.60
forkChoice updateHead vc 600000 bc 1200 eq 0 3.1929 ms/op 7.5264 ms/op 0.42
forkChoice updateHead vc 600000 bc 7200 eq 0 3.7324 ms/op 8.5520 ms/op 0.44
forkChoice updateHead vc 600000 bc 64 eq 1000 10.642 ms/op 30.491 ms/op 0.35
forkChoice updateHead vc 600000 bc 64 eq 10000 10.644 ms/op 20.856 ms/op 0.51
forkChoice updateHead vc 600000 bc 64 eq 300000 14.895 ms/op 27.098 ms/op 0.55
computeDeltas 500000 validators 300 proto nodes 3.9212 ms/op 6.8130 ms/op 0.58
computeDeltas 500000 validators 1200 proto nodes 4.0136 ms/op 7.6014 ms/op 0.53
computeDeltas 500000 validators 7200 proto nodes 3.9267 ms/op 8.2439 ms/op 0.48
computeDeltas 750000 validators 300 proto nodes 5.5755 ms/op 12.632 ms/op 0.44
computeDeltas 750000 validators 1200 proto nodes 5.5872 ms/op 11.147 ms/op 0.50
computeDeltas 750000 validators 7200 proto nodes 5.2049 ms/op 15.754 ms/op 0.33
computeDeltas 1400000 validators 300 proto nodes 9.5128 ms/op 26.598 ms/op 0.36
computeDeltas 1400000 validators 1200 proto nodes 9.6415 ms/op 21.270 ms/op 0.45
computeDeltas 1400000 validators 7200 proto nodes 9.7724 ms/op 22.615 ms/op 0.43
computeDeltas 2100000 validators 300 proto nodes 16.447 ms/op 27.099 ms/op 0.61
computeDeltas 2100000 validators 1200 proto nodes 17.294 ms/op 23.944 ms/op 0.72
computeDeltas 2100000 validators 7200 proto nodes 16.635 ms/op 20.864 ms/op 0.80
altair processAttestation - 250000 vs - 7PWei normalcase 2.5649 ms/op 2.8226 ms/op 0.91
altair processAttestation - 250000 vs - 7PWei worstcase 3.7522 ms/op 3.2877 ms/op 1.14
altair processAttestation - setStatus - 1/6 committees join 117.05 us/op 156.45 us/op 0.75
altair processAttestation - setStatus - 1/3 committees join 214.44 us/op 280.98 us/op 0.76
altair processAttestation - setStatus - 1/2 committees join 291.73 us/op 429.99 us/op 0.68
altair processAttestation - setStatus - 2/3 committees join 380.58 us/op 533.32 us/op 0.71
altair processAttestation - setStatus - 4/5 committees join 528.60 us/op 725.88 us/op 0.73
altair processAttestation - setStatus - 100% committees join 656.10 us/op 860.95 us/op 0.76
altair processBlock - 250000 vs - 7PWei normalcase 6.4992 ms/op 5.8844 ms/op 1.10
altair processBlock - 250000 vs - 7PWei normalcase hashState 23.277 ms/op 28.379 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase 38.856 ms/op 46.513 ms/op 0.84
altair processBlock - 250000 vs - 7PWei worstcase hashState 76.526 ms/op 94.690 ms/op 0.81
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7223 ms/op 2.2857 ms/op 0.75
phase0 processBlock - 250000 vs - 7PWei worstcase 26.157 ms/op 34.826 ms/op 0.75
altair processEth1Data - 250000 vs - 7PWei normalcase 286.25 us/op 341.20 us/op 0.84
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.0320 us/op 6.9530 us/op 0.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 19.194 us/op 28.346 us/op 0.68
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.2880 us/op 8.8030 us/op 0.83
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.3720 us/op 9.3510 us/op 0.57
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 72.625 us/op 93.074 us/op 0.78
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 664.58 us/op 926.23 us/op 0.72
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 910.91 us/op 1.1889 ms/op 0.77
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 939.62 us/op 1.3220 ms/op 0.71
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.4559 ms/op 3.4293 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6025 ms/op 2.2438 ms/op 0.71
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7431 ms/op 4.5965 ms/op 0.81
Tree 40 250000 create 219.78 ms/op 257.60 ms/op 0.85
Tree 40 250000 get(125000) 140.43 ns/op 167.03 ns/op 0.84
Tree 40 250000 set(125000) 637.70 ns/op 792.55 ns/op 0.80
Tree 40 250000 toArray() 15.073 ms/op 18.550 ms/op 0.81
Tree 40 250000 iterate all - toArray() + loop 14.851 ms/op 18.497 ms/op 0.80
Tree 40 250000 iterate all - get(i) 49.723 ms/op 62.524 ms/op 0.80
MutableVector 250000 create 7.5383 ms/op 15.717 ms/op 0.48
MutableVector 250000 get(125000) 6.7010 ns/op 9.4380 ns/op 0.71
MutableVector 250000 set(125000) 173.76 ns/op 252.09 ns/op 0.69
MutableVector 250000 toArray() 3.1112 ms/op 4.3365 ms/op 0.72
MutableVector 250000 iterate all - toArray() + loop 3.2386 ms/op 4.5860 ms/op 0.71
MutableVector 250000 iterate all - get(i) 1.4880 ms/op 1.7780 ms/op 0.84
Array 250000 create 2.7817 ms/op 3.1335 ms/op 0.89
Array 250000 clone - spread 1.2996 ms/op 1.5148 ms/op 0.86
Array 250000 get(125000) 0.38400 ns/op 0.43800 ns/op 0.88
Array 250000 set(125000) 0.41100 ns/op 0.45500 ns/op 0.90
Array 250000 iterate all - loop 98.268 us/op 102.35 us/op 0.96
effectiveBalanceIncrements clone Uint8Array 300000 24.659 us/op 30.239 us/op 0.82
effectiveBalanceIncrements clone MutableVector 300000 114.00 ns/op 127.00 ns/op 0.90
effectiveBalanceIncrements rw all Uint8Array 300000 189.49 us/op 211.65 us/op 0.90
effectiveBalanceIncrements rw all MutableVector 300000 57.605 ms/op 65.690 ms/op 0.88
phase0 afterProcessEpoch - 250000 vs - 7PWei 82.840 ms/op 92.863 ms/op 0.89
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.662 ms/op 47.844 ms/op 0.89
altair processEpoch - mainnet_e81889 371.19 ms/op 416.77 ms/op 0.89
mainnet_e81889 - altair beforeProcessEpoch 47.131 ms/op 67.138 ms/op 0.70
mainnet_e81889 - altair processJustificationAndFinalization 11.554 us/op 19.518 us/op 0.59
mainnet_e81889 - altair processInactivityUpdates 5.9652 ms/op 6.7292 ms/op 0.89
mainnet_e81889 - altair processRewardsAndPenalties 38.658 ms/op 58.788 ms/op 0.66
mainnet_e81889 - altair processRegistryUpdates 1.6980 us/op 2.7780 us/op 0.61
mainnet_e81889 - altair processSlashings 353.00 ns/op 627.00 ns/op 0.56
mainnet_e81889 - altair processEth1DataReset 348.00 ns/op 490.00 ns/op 0.71
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0541 ms/op 2.9085 ms/op 0.36
mainnet_e81889 - altair processSlashingsReset 2.5430 us/op 4.6650 us/op 0.55
mainnet_e81889 - altair processRandaoMixesReset 3.4760 us/op 5.7050 us/op 0.61
mainnet_e81889 - altair processHistoricalRootsUpdate 356.00 ns/op 483.00 ns/op 0.74
mainnet_e81889 - altair processParticipationFlagUpdates 1.3890 us/op 3.5690 us/op 0.39
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0030 us/op 738.00 ns/op 1.36
mainnet_e81889 - altair afterProcessEpoch 91.420 ms/op 106.37 ms/op 0.86
capella processEpoch - mainnet_e217614 1.3775 s/op 1.3445 s/op 1.02
mainnet_e217614 - capella beforeProcessEpoch 289.86 ms/op 252.22 ms/op 1.15
mainnet_e217614 - capella processJustificationAndFinalization 19.840 us/op 22.240 us/op 0.89
mainnet_e217614 - capella processInactivityUpdates 19.006 ms/op 18.174 ms/op 1.05
mainnet_e217614 - capella processRewardsAndPenalties 243.51 ms/op 289.05 ms/op 0.84
mainnet_e217614 - capella processRegistryUpdates 18.519 us/op 18.948 us/op 0.98
mainnet_e217614 - capella processSlashings 436.00 ns/op 656.00 ns/op 0.66
mainnet_e217614 - capella processEth1DataReset 536.00 ns/op 556.00 ns/op 0.96
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.479 ms/op 3.7327 ms/op 4.41
mainnet_e217614 - capella processSlashingsReset 4.1160 us/op 6.5420 us/op 0.63
mainnet_e217614 - capella processRandaoMixesReset 6.4820 us/op 6.6650 us/op 0.97
mainnet_e217614 - capella processHistoricalRootsUpdate 932.00 ns/op 559.00 ns/op 1.67
mainnet_e217614 - capella processParticipationFlagUpdates 2.3740 us/op 2.2560 us/op 1.05
mainnet_e217614 - capella afterProcessEpoch 295.67 ms/op 282.48 ms/op 1.05
phase0 processEpoch - mainnet_e58758 350.12 ms/op 376.04 ms/op 0.93
mainnet_e58758 - phase0 beforeProcessEpoch 115.31 ms/op 124.26 ms/op 0.93
mainnet_e58758 - phase0 processJustificationAndFinalization 12.970 us/op 23.826 us/op 0.54
mainnet_e58758 - phase0 processRewardsAndPenalties 37.892 ms/op 48.761 ms/op 0.78
mainnet_e58758 - phase0 processRegistryUpdates 7.5470 us/op 11.288 us/op 0.67
mainnet_e58758 - phase0 processSlashings 593.00 ns/op 648.00 ns/op 0.92
mainnet_e58758 - phase0 processEth1DataReset 325.00 ns/op 505.00 ns/op 0.64
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 938.01 us/op 1.6133 ms/op 0.58
mainnet_e58758 - phase0 processSlashingsReset 3.3820 us/op 4.1380 us/op 0.82
mainnet_e58758 - phase0 processRandaoMixesReset 3.5560 us/op 5.6050 us/op 0.63
mainnet_e58758 - phase0 processHistoricalRootsUpdate 336.00 ns/op 525.00 ns/op 0.64
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.7550 us/op 4.0010 us/op 0.69
mainnet_e58758 - phase0 afterProcessEpoch 78.590 ms/op 77.484 ms/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.5998 ms/op 1.1135 ms/op 1.44
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.0837 ms/op 1.9410 ms/op 1.07
altair processInactivityUpdates - 250000 normalcase 17.724 ms/op 22.534 ms/op 0.79
altair processInactivityUpdates - 250000 worstcase 18.099 ms/op 25.041 ms/op 0.72
phase0 processRegistryUpdates - 250000 normalcase 7.3150 us/op 8.4360 us/op 0.87
phase0 processRegistryUpdates - 250000 badcase_full_deposits 287.82 us/op 450.44 us/op 0.64
phase0 processRegistryUpdates - 250000 worstcase 0.5 109.00 ms/op 117.91 ms/op 0.92
altair processRewardsAndPenalties - 250000 normalcase 38.364 ms/op 32.598 ms/op 1.18
altair processRewardsAndPenalties - 250000 worstcase 40.793 ms/op 38.959 ms/op 1.05
phase0 getAttestationDeltas - 250000 normalcase 7.7430 ms/op 7.1288 ms/op 1.09
phase0 getAttestationDeltas - 250000 worstcase 8.7064 ms/op 8.1444 ms/op 1.07
phase0 processSlashings - 250000 worstcase 123.53 us/op 108.07 us/op 1.14
altair processSyncCommitteeUpdates - 250000 135.39 ms/op 167.87 ms/op 0.81
BeaconState.hashTreeRoot - No change 338.00 ns/op 307.00 ns/op 1.10
BeaconState.hashTreeRoot - 1 full validator 110.88 us/op 106.35 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 1.1264 ms/op 1.0588 ms/op 1.06
BeaconState.hashTreeRoot - 512 full validator 10.982 ms/op 10.208 ms/op 1.08
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 177.17 us/op 123.21 us/op 1.44
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6593 ms/op 1.9176 ms/op 0.87
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.916 ms/op 32.737 ms/op 0.58
BeaconState.hashTreeRoot - 1 balances 83.101 us/op 138.40 us/op 0.60
BeaconState.hashTreeRoot - 32 balances 754.88 us/op 1.4592 ms/op 0.52
BeaconState.hashTreeRoot - 512 balances 7.1286 ms/op 13.219 ms/op 0.54
BeaconState.hashTreeRoot - 250000 balances 189.98 ms/op 189.24 ms/op 1.00
aggregationBits - 2048 els - zipIndexesInBitList 25.044 us/op 27.053 us/op 0.93
byteArrayEquals 32 54.973 ns/op 58.160 ns/op 0.95
Buffer.compare 32 50.607 ns/op 51.600 ns/op 0.98
byteArrayEquals 1024 1.6266 us/op 1.7031 us/op 0.96
Buffer.compare 1024 56.937 ns/op 60.383 ns/op 0.94
byteArrayEquals 16384 25.949 us/op 27.121 us/op 0.96
Buffer.compare 16384 231.35 ns/op 265.75 ns/op 0.87
byteArrayEquals 123687377 196.35 ms/op 225.54 ms/op 0.87
Buffer.compare 123687377 8.0542 ms/op 7.6664 ms/op 1.05
byteArrayEquals 32 - diff last byte 53.084 ns/op 56.699 ns/op 0.94
Buffer.compare 32 - diff last byte 46.632 ns/op 51.644 ns/op 0.90
byteArrayEquals 1024 - diff last byte 1.6093 us/op 1.6334 us/op 0.99
Buffer.compare 1024 - diff last byte 58.245 ns/op 58.015 ns/op 1.00
byteArrayEquals 16384 - diff last byte 25.591 us/op 26.646 us/op 0.96
Buffer.compare 16384 - diff last byte 220.67 ns/op 260.08 ns/op 0.85
byteArrayEquals 123687377 - diff last byte 192.81 ms/op 214.50 ms/op 0.90
Buffer.compare 123687377 - diff last byte 8.9173 ms/op 7.1395 ms/op 1.25
byteArrayEquals 32 - random bytes 5.3900 ns/op 6.6990 ns/op 0.80
Buffer.compare 32 - random bytes 48.121 ns/op 52.903 ns/op 0.91
byteArrayEquals 1024 - random bytes 5.4800 ns/op 5.4750 ns/op 1.00
Buffer.compare 1024 - random bytes 47.156 ns/op 50.005 ns/op 0.94
byteArrayEquals 16384 - random bytes 5.2540 ns/op 6.1660 ns/op 0.85
Buffer.compare 16384 - random bytes 46.764 ns/op 59.588 ns/op 0.78
byteArrayEquals 123687377 - random bytes 6.5200 ns/op 8.0300 ns/op 0.81
Buffer.compare 123687377 - random bytes 49.950 ns/op 62.520 ns/op 0.80
regular array get 100000 times 45.082 us/op 36.400 us/op 1.24
wrappedArray get 100000 times 33.735 us/op 34.547 us/op 0.98
arrayWithProxy get 100000 times 14.125 ms/op 18.282 ms/op 0.77
ssz.Root.equals 46.778 ns/op 53.323 ns/op 0.88
byteArrayEquals 45.952 ns/op 53.943 ns/op 0.85
Buffer.compare 10.759 ns/op 11.560 ns/op 0.93
shuffle list - 16384 els 6.5028 ms/op 6.5439 ms/op 0.99
shuffle list - 250000 els 94.519 ms/op 97.996 ms/op 0.96
processSlot - 1 slots 16.463 us/op 16.734 us/op 0.98
processSlot - 32 slots 3.3303 ms/op 2.4860 ms/op 1.34
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.949 ms/op 35.483 ms/op 1.01
getCommitteeAssignments - req 1 vs - 250000 vc 2.1639 ms/op 2.2436 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 4.1641 ms/op 4.3460 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4860 ms/op 4.6088 ms/op 0.97
findModifiedValidators - 10000 modified validators 244.36 ms/op 253.71 ms/op 0.96
findModifiedValidators - 1000 modified validators 162.27 ms/op 190.13 ms/op 0.85
findModifiedValidators - 100 modified validators 185.60 ms/op 184.59 ms/op 1.01
findModifiedValidators - 10 modified validators 178.81 ms/op 191.15 ms/op 0.94
findModifiedValidators - 1 modified validators 169.78 ms/op 190.27 ms/op 0.89
findModifiedValidators - no difference 182.11 ms/op 187.59 ms/op 0.97
compare ViewDUs 2.9852 s/op 3.2765 s/op 0.91
compare each validator Uint8Array 1.1452 s/op 1.6520 s/op 0.69
compare ViewDU to Uint8Array 1.0318 s/op 1.3571 s/op 0.76
migrate state 1000000 validators, 24 modified, 0 new 570.89 ms/op 744.76 ms/op 0.77
migrate state 1000000 validators, 1700 modified, 1000 new 735.31 ms/op 1.1086 s/op 0.66
migrate state 1000000 validators, 3400 modified, 2000 new 924.84 ms/op 1.6235 s/op 0.57
migrate state 1500000 validators, 24 modified, 0 new 585.92 ms/op 707.60 ms/op 0.83
migrate state 1500000 validators, 1700 modified, 1000 new 773.53 ms/op 976.87 ms/op 0.79
migrate state 1500000 validators, 3400 modified, 2000 new 988.56 ms/op 1.1790 s/op 0.84
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3500 ns/op 5.8300 ns/op 0.75
state getBlockRootAtSlot - 250000 vs - 7PWei 787.40 ns/op 717.08 ns/op 1.10
computeProposers - vc 250000 7.5137 ms/op 9.7820 ms/op 0.77
computeEpochShuffling - vc 250000 94.023 ms/op 121.99 ms/op 0.77
getNextSyncCommittee - vc 250000 125.94 ms/op 156.12 ms/op 0.81
computeSigningRoot for AttestationData 19.468 us/op 25.889 us/op 0.75
hash AttestationData serialized data then Buffer.toString(base64) 1.5175 us/op 1.9959 us/op 0.76
toHexString serialized data 889.43 ns/op 1.1242 us/op 0.79
Buffer.toString(base64) 171.06 ns/op 274.92 ns/op 0.62

by benchmarkbot/action

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea for additional metrics

Can you deploy this to a feat group, add panels to a dashboard, and screenshot here?
The idea being to see what this looks like in practice. How useful it is, how the buckets should be tweaked, etc.

packages/beacon-node/src/metrics/nodeJsMetrics.ts Outdated Show resolved Hide resolved
packages/beacon-node/src/metrics/nodeJsMetrics.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 13.79310% with 50 lines in your changes missing coverage. Please review.

Project coverage is 62.70%. Comparing base (95ce044) to head (0b076bc).
Report is 276 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6820      +/-   ##
============================================
+ Coverage     62.21%   62.70%   +0.49%     
============================================
  Files           571      578       +7     
  Lines         60017    61410    +1393     
  Branches       1975     2118     +143     
============================================
+ Hits          37338    38510    +1172     
- Misses        22636    22862     +226     
+ Partials         43       38       -5     

name: `${key}nodejs_eventloop_active`,
help: "Histogram of Event Loop active time between two successive calls.",
registers: [register],
buckets: [1, intervalMs / 10, intervalMs / 2, intervalMs],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all metrics need to be in seconds, including buckets

});

const metricActive = new Histogram({
name: `${key}nodejs_eventloop_active`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is in seconds? sould be reflected in the metric name

Suggested change
name: `${key}nodejs_eventloop_active`,
name: `${key}nodejs_eventloop_active_seconds`,

@jeluard
Copy link
Contributor Author

jeluard commented Jun 21, 2024

Capture d’écran 2024-06-21 à 15 15 48

@nflaig
Copy link
Member

nflaig commented Jun 25, 2024

I think it's not as useful to track this as an average over time or at least I don't see which questions this helps to answer.

What we might be interested in is the event loop utilization (ELU) during a certain time frame of the slot, e.g. 1-4, 4-8, 8-12, or even on a per second basis. Should be able to achieve this via labels on metrics + running an interval on a clock timer.

This could help us analyze what parts of the slot we are overloaded, and if a change improves the ELU for a specific slot frame or not.

@nflaig
Copy link
Member

nflaig commented Oct 10, 2024

can be further discussed in #7147

@nflaig nflaig closed this Oct 10, 2024
@nflaig nflaig deleted the jeluard/metrics-elu branch October 10, 2024 21:05
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