Skip to content

Fix network processor jobsSubmitted metric - #5354

Merged
twoeths merged 1 commit into
unstablefrom
tuyen/fix_job_submitted_metric
Apr 11, 2023
Merged

Fix network processor jobsSubmitted metric#5354
twoeths merged 1 commit into
unstablefrom
tuyen/fix_job_submitted_metric

Conversation

@twoeths

@twoeths twoeths commented Apr 10, 2023

Copy link
Copy Markdown
Member

Motivation

The network processor jobsSubmitted metric was monitored as 1 while debug showed that it's usually 128 if there are jobs submitted

Description

@twoeths
twoeths requested a review from a team as a code owner April 10, 2023 07:27
@github-actions

Copy link
Copy Markdown
Contributor

Performance Report

鉁旓笍 no performance regression detected

Full benchmark results
Benchmark suite Current: 97c72bb Previous: 2d2d0c0 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 594.09 us/op 690.46 us/op 0.86
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 49.998 us/op 63.441 us/op 0.79
BLS verify - blst-native 1.2380 ms/op 1.5087 ms/op 0.82
BLS verifyMultipleSignatures 3 - blst-native 2.4868 ms/op 2.8253 ms/op 0.88
BLS verifyMultipleSignatures 8 - blst-native 5.4731 ms/op 6.3919 ms/op 0.86
BLS verifyMultipleSignatures 32 - blst-native 19.359 ms/op 22.700 ms/op 0.85
BLS aggregatePubkeys 32 - blst-native 25.818 us/op 30.269 us/op 0.85
BLS aggregatePubkeys 128 - blst-native 100.65 us/op 117.37 us/op 0.86
getAttestationsForBlock 55.618 ms/op 66.213 ms/op 0.84
isKnown best case - 1 super set check 266.00 ns/op 314.00 ns/op 0.85
isKnown normal case - 2 super set checks 264.00 ns/op 314.00 ns/op 0.84
isKnown worse case - 16 super set checks 254.00 ns/op 312.00 ns/op 0.81
CheckpointStateCache - add get delete 5.3660 us/op 6.2870 us/op 0.85
validate gossip signedAggregateAndProof - struct 2.7532 ms/op 3.3443 ms/op 0.82
validate gossip attestation - struct 1.3158 ms/op 1.5871 ms/op 0.83
pickEth1Vote - no votes 1.3188 ms/op 1.5764 ms/op 0.84
pickEth1Vote - max votes 10.048 ms/op 13.452 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot value x2048 8.9398 ms/op 11.489 ms/op 0.78
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 13.891 ms/op 17.732 ms/op 0.78
pickEth1Vote - Eth1Data fastSerialize value x2048 659.08 us/op 754.87 us/op 0.87
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.9149 ms/op 6.8914 ms/op 0.71
bytes32 toHexString 518.00 ns/op 724.00 ns/op 0.72
bytes32 Buffer.toString(hex) 392.00 ns/op 473.00 ns/op 0.83
bytes32 Buffer.toString(hex) from Uint8Array 565.00 ns/op 720.00 ns/op 0.78
bytes32 Buffer.toString(hex) + 0x 347.00 ns/op 482.00 ns/op 0.72
Object access 1 prop 0.16100 ns/op 0.19400 ns/op 0.83
Map access 1 prop 0.16100 ns/op 0.18600 ns/op 0.87
Object get x1000 6.9810 ns/op 8.1070 ns/op 0.86
Map get x1000 0.61800 ns/op 0.78000 ns/op 0.79
Object set x1000 53.044 ns/op 65.912 ns/op 0.80
Map set x1000 43.549 ns/op 53.124 ns/op 0.82
Return object 10000 times 0.23840 ns/op 0.26990 ns/op 0.88
Throw Error 10000 times 4.2653 us/op 5.0691 us/op 0.84
fastMsgIdFn sha256 / 200 bytes 3.5520 us/op 4.3490 us/op 0.82
fastMsgIdFn h32 xxhash / 200 bytes 317.00 ns/op 380.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 200 bytes 474.00 ns/op 568.00 ns/op 0.83
fastMsgIdFn sha256 / 1000 bytes 11.741 us/op 14.754 us/op 0.80
fastMsgIdFn h32 xxhash / 1000 bytes 443.00 ns/op 522.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 1000 bytes 529.00 ns/op 612.00 ns/op 0.86
fastMsgIdFn sha256 / 10000 bytes 102.43 us/op 125.10 us/op 0.82
fastMsgIdFn h32 xxhash / 10000 bytes 1.9780 us/op 2.4270 us/op 0.81
fastMsgIdFn h64 xxhash / 10000 bytes 1.4360 us/op 1.7190 us/op 0.84
enrSubnets - fastDeserialize 64 bits 1.3140 us/op 1.6140 us/op 0.81
enrSubnets - ssz BitVector 64 bits 505.00 ns/op 639.00 ns/op 0.79
enrSubnets - fastDeserialize 4 bits 177.00 ns/op 242.00 ns/op 0.73
enrSubnets - ssz BitVector 4 bits 511.00 ns/op 719.00 ns/op 0.71
prioritizePeers score -10:0 att 32-0.1 sync 2-0 124.05 us/op 141.45 us/op 0.88
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 136.29 us/op 188.90 us/op 0.72
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 172.70 us/op 236.95 us/op 0.73
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 342.96 us/op 406.24 us/op 0.84
prioritizePeers score 0:0 att 64-1 sync 4-1 373.29 us/op 514.75 us/op 0.73
array of 16000 items push then shift 1.6198 us/op 1.9635 us/op 0.82
LinkedList of 16000 items push then shift 8.7850 ns/op 10.643 ns/op 0.83
array of 16000 items push then pop 73.885 ns/op 122.05 ns/op 0.61
LinkedList of 16000 items push then pop 8.5040 ns/op 10.344 ns/op 0.82
array of 24000 items push then shift 2.3345 us/op 2.9052 us/op 0.80
LinkedList of 24000 items push then shift 8.6470 ns/op 10.313 ns/op 0.84
array of 24000 items push then pop 76.705 ns/op 104.91 ns/op 0.73
LinkedList of 24000 items push then pop 8.4950 ns/op 9.9920 ns/op 0.85
intersect bitArray bitLen 8 13.026 ns/op 15.758 ns/op 0.83
intersect array and set length 8 80.913 ns/op 103.92 ns/op 0.78
intersect bitArray bitLen 128 43.625 ns/op 53.785 ns/op 0.81
intersect array and set length 128 1.1573 us/op 1.3924 us/op 0.83
Buffer.concat 32 items 3.0020 us/op 3.9110 us/op 0.77
Uint8Array.set 32 items 2.3510 us/op 3.0990 us/op 0.76
pass gossip attestations to forkchoice per slot 2.9881 ms/op 3.5716 ms/op 0.84
computeDeltas 2.9527 ms/op 3.8211 ms/op 0.77
computeProposerBoostScoreFromBalances 1.7828 ms/op 2.2433 ms/op 0.79
altair processAttestation - 250000 vs - 7PWei normalcase 2.2271 ms/op 3.6431 ms/op 0.61
altair processAttestation - 250000 vs - 7PWei worstcase 3.4810 ms/op 5.5196 ms/op 0.63
altair processAttestation - setStatus - 1/6 committees join 143.34 us/op 181.23 us/op 0.79
altair processAttestation - setStatus - 1/3 committees join 276.30 us/op 445.41 us/op 0.62
altair processAttestation - setStatus - 1/2 committees join 366.75 us/op 611.28 us/op 0.60
altair processAttestation - setStatus - 2/3 committees join 471.10 us/op 594.05 us/op 0.79
altair processAttestation - setStatus - 4/5 committees join 652.74 us/op 1.0174 ms/op 0.64
altair processAttestation - setStatus - 100% committees join 757.88 us/op 1.1421 ms/op 0.66
altair processBlock - 250000 vs - 7PWei normalcase 14.788 ms/op 23.846 ms/op 0.62
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.079 ms/op 35.485 ms/op 0.68
altair processBlock - 250000 vs - 7PWei worstcase 45.817 ms/op 62.191 ms/op 0.74
altair processBlock - 250000 vs - 7PWei worstcase hashState 63.918 ms/op 108.93 ms/op 0.59
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9241 ms/op 4.2328 ms/op 0.45
phase0 processBlock - 250000 vs - 7PWei worstcase 26.443 ms/op 52.440 ms/op 0.50
altair processEth1Data - 250000 vs - 7PWei normalcase 448.58 us/op 913.55 us/op 0.49
vc - 250000 eb 1 eth1 1 we 0 wn 0 - smpl 15 6.5600 us/op 12.598 us/op 0.52
vc - 250000 eb 0.95 eth1 0.1 we 0.05 wn 0 - smpl 219 24.038 us/op 23.794 us/op 1.01
vc - 250000 eb 0.95 eth1 0.3 we 0.05 wn 0 - smpl 42 9.6100 us/op 17.923 us/op 0.54
vc - 250000 eb 0.95 eth1 0.7 we 0.05 wn 0 - smpl 18 7.6100 us/op 14.874 us/op 0.51
vc - 250000 eb 0.1 eth1 0.1 we 0 wn 0 - smpl 1020 98.835 us/op 112.01 us/op 0.88
vc - 250000 eb 0.03 eth1 0.03 we 0 wn 0 - smpl 11777 639.24 us/op 1.2656 ms/op 0.51
vc - 250000 eb 0.01 eth1 0.01 we 0 wn 0 - smpl 16384 905.31 us/op 1.4583 ms/op 0.62
vc - 250000 eb 0 eth1 0 we 0 wn 0 - smpl 16384 873.85 us/op 1.3839 ms/op 0.63
vc - 250000 eb 0 eth1 0 we 0 wn 0 nocache - smpl 16384 2.2980 ms/op 4.8982 ms/op 0.47
vc - 250000 eb 0 eth1 1 we 0 wn 0 - smpl 16384 1.6751 ms/op 2.6146 ms/op 0.64
vc - 250000 eb 0 eth1 1 we 0 wn 0 nocache - smpl 16384 3.9070 ms/op 9.2971 ms/op 0.42
Tree 40 250000 create 294.74 ms/op 808.94 ms/op 0.36
Tree 40 250000 get(125000) 181.36 ns/op 352.36 ns/op 0.51
Tree 40 250000 set(125000) 926.44 ns/op 2.3899 us/op 0.39
Tree 40 250000 toArray() 17.272 ms/op 36.575 ms/op 0.47
Tree 40 250000 iterate all - toArray() + loop 17.070 ms/op 37.865 ms/op 0.45
Tree 40 250000 iterate all - get(i) 66.972 ms/op 140.42 ms/op 0.48
MutableVector 250000 create 10.469 ms/op 19.739 ms/op 0.53
MutableVector 250000 get(125000) 6.2950 ns/op 13.627 ns/op 0.46
MutableVector 250000 set(125000) 273.48 ns/op 843.83 ns/op 0.32
MutableVector 250000 toArray() 2.7348 ms/op 6.6664 ms/op 0.41
MutableVector 250000 iterate all - toArray() + loop 2.8379 ms/op 8.5615 ms/op 0.33
MutableVector 250000 iterate all - get(i) 1.4994 ms/op 3.4302 ms/op 0.44
Array 250000 create 2.7540 ms/op 5.6726 ms/op 0.49
Array 250000 clone - spread 1.0709 ms/op 1.9861 ms/op 0.54
Array 250000 get(125000) 0.50300 ns/op 1.2340 ns/op 0.41
Array 250000 set(125000) 0.59200 ns/op 1.4810 ns/op 0.40
Array 250000 iterate all - loop 81.511 us/op 183.84 us/op 0.44
effectiveBalanceIncrements clone Uint8Array 300000 22.777 us/op 56.458 us/op 0.40
effectiveBalanceIncrements clone MutableVector 300000 312.00 ns/op 623.00 ns/op 0.50
effectiveBalanceIncrements rw all Uint8Array 300000 165.32 us/op 331.69 us/op 0.50
effectiveBalanceIncrements rw all MutableVector 300000 79.730 ms/op 114.16 ms/op 0.70
phase0 afterProcessEpoch - 250000 vs - 7PWei 112.29 ms/op 224.98 ms/op 0.50
phase0 beforeProcessEpoch - 250000 vs - 7PWei 42.627 ms/op 64.526 ms/op 0.66
altair processEpoch - mainnet_e81889 333.51 ms/op 642.32 ms/op 0.52
mainnet_e81889 - altair beforeProcessEpoch 65.258 ms/op 131.62 ms/op 0.50
mainnet_e81889 - altair processJustificationAndFinalization 17.022 us/op 65.947 us/op 0.26
mainnet_e81889 - altair processInactivityUpdates 5.2161 ms/op 11.690 ms/op 0.45
mainnet_e81889 - altair processRewardsAndPenalties 61.459 ms/op 106.26 ms/op 0.58
mainnet_e81889 - altair processRegistryUpdates 2.9860 us/op 11.061 us/op 0.27
mainnet_e81889 - altair processSlashings 438.00 ns/op 2.4520 us/op 0.18
mainnet_e81889 - altair processEth1DataReset 503.00 ns/op 3.5900 us/op 0.14
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2159 ms/op 3.3276 ms/op 0.37
mainnet_e81889 - altair processSlashingsReset 4.8220 us/op 24.382 us/op 0.20
mainnet_e81889 - altair processRandaoMixesReset 4.6550 us/op 17.041 us/op 0.27
mainnet_e81889 - altair processHistoricalRootsUpdate 667.00 ns/op 1.4700 us/op 0.45
mainnet_e81889 - altair processParticipationFlagUpdates 2.5430 us/op 6.2410 us/op 0.41
mainnet_e81889 - altair processSyncCommitteeUpdates 613.00 ns/op 1.0900 us/op 0.56
mainnet_e81889 - altair afterProcessEpoch 116.39 ms/op 226.36 ms/op 0.51
phase0 processEpoch - mainnet_e58758 308.97 ms/op 551.00 ms/op 0.56
mainnet_e58758 - phase0 beforeProcessEpoch 116.00 ms/op 162.90 ms/op 0.71
mainnet_e58758 - phase0 processJustificationAndFinalization 15.776 us/op 20.363 us/op 0.77
mainnet_e58758 - phase0 processRewardsAndPenalties 52.838 ms/op 67.839 ms/op 0.78
mainnet_e58758 - phase0 processRegistryUpdates 7.2850 us/op 9.6170 us/op 0.76
mainnet_e58758 - phase0 processSlashings 626.00 ns/op 710.00 ns/op 0.88
mainnet_e58758 - phase0 processEth1DataReset 666.00 ns/op 584.00 ns/op 1.14
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.0387 ms/op 1.2301 ms/op 0.84
mainnet_e58758 - phase0 processSlashingsReset 3.6510 us/op 4.2800 us/op 0.85
mainnet_e58758 - phase0 processRandaoMixesReset 4.4640 us/op 6.6480 us/op 0.67
mainnet_e58758 - phase0 processHistoricalRootsUpdate 780.00 ns/op 1.3710 us/op 0.57
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.1220 us/op 5.2880 us/op 1.16
mainnet_e58758 - phase0 afterProcessEpoch 94.569 ms/op 114.38 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1752 ms/op 1.5483 ms/op 0.76
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5000 ms/op 1.8479 ms/op 0.81
altair processInactivityUpdates - 250000 normalcase 20.026 ms/op 30.339 ms/op 0.66
altair processInactivityUpdates - 250000 worstcase 22.381 ms/op 35.264 ms/op 0.63
phase0 processRegistryUpdates - 250000 normalcase 7.1290 us/op 12.615 us/op 0.57
phase0 processRegistryUpdates - 250000 badcase_full_deposits 271.42 us/op 303.42 us/op 0.89
phase0 processRegistryUpdates - 250000 worstcase 0.5 112.28 ms/op 164.83 ms/op 0.68
altair processRewardsAndPenalties - 250000 normalcase 49.120 ms/op 79.283 ms/op 0.62
altair processRewardsAndPenalties - 250000 worstcase 46.990 ms/op 96.012 ms/op 0.49
phase0 getAttestationDeltas - 250000 normalcase 6.9924 ms/op 12.130 ms/op 0.58
phase0 getAttestationDeltas - 250000 worstcase 7.0123 ms/op 10.857 ms/op 0.65
phase0 processSlashings - 250000 worstcase 3.6528 ms/op 4.3121 ms/op 0.85
altair processSyncCommitteeUpdates - 250000 186.77 ms/op 228.43 ms/op 0.82
BeaconState.hashTreeRoot - No change 266.00 ns/op 421.00 ns/op 0.63
BeaconState.hashTreeRoot - 1 full validator 52.940 us/op 70.397 us/op 0.75
BeaconState.hashTreeRoot - 32 full validator 542.57 us/op 696.56 us/op 0.78
BeaconState.hashTreeRoot - 512 full validator 5.1305 ms/op 6.5053 ms/op 0.79
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 60.348 us/op 80.731 us/op 0.75
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 873.76 us/op 1.0877 ms/op 0.80
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 11.354 ms/op 13.804 ms/op 0.82
BeaconState.hashTreeRoot - 1 balances 51.214 us/op 57.465 us/op 0.89
BeaconState.hashTreeRoot - 32 balances 458.52 us/op 593.60 us/op 0.77
BeaconState.hashTreeRoot - 512 balances 4.2965 ms/op 6.1290 ms/op 0.70
BeaconState.hashTreeRoot - 250000 balances 79.554 ms/op 99.783 ms/op 0.80
aggregationBits - 2048 els - zipIndexesInBitList 16.581 us/op 21.112 us/op 0.79
regular array get 100000 times 45.111 us/op 42.266 us/op 1.07
wrappedArray get 100000 times 43.369 us/op 41.979 us/op 1.03
arrayWithProxy get 100000 times 15.787 ms/op 18.687 ms/op 0.84
ssz.Root.equals 554.00 ns/op 639.00 ns/op 0.87
byteArrayEquals 534.00 ns/op 634.00 ns/op 0.84
shuffle list - 16384 els 6.9036 ms/op 8.0419 ms/op 0.86
shuffle list - 250000 els 101.06 ms/op 122.11 ms/op 0.83
processSlot - 1 slots 8.5830 us/op 11.786 us/op 0.73
processSlot - 32 slots 1.3504 ms/op 1.8922 ms/op 0.71
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 32.266 ms/op 40.566 ms/op 0.80
getCommitteeAssignments - req 1 vs - 250000 vc 2.9058 ms/op 3.2848 ms/op 0.88
getCommitteeAssignments - req 100 vs - 250000 vc 4.1812 ms/op 4.5979 ms/op 0.91
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4713 ms/op 5.0048 ms/op 0.89
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8300 ns/op 5.3700 ns/op 0.90
state getBlockRootAtSlot - 250000 vs - 7PWei 867.83 ns/op 851.32 ns/op 1.02
computeProposers - vc 250000 10.470 ms/op 12.091 ms/op 0.87
computeEpochShuffling - vc 250000 103.19 ms/op 115.15 ms/op 0.90
getNextSyncCommittee - vc 250000 171.50 ms/op 195.28 ms/op 0.88
computeSigningRoot for AttestationData 13.063 us/op 14.285 us/op 0.91
hash AttestationData serialized data then Buffer.toString(base64) 2.4383 us/op 2.6953 us/op 0.90
toHexString serialized data 1.0937 us/op 1.1814 us/op 0.93
Buffer.toString(base64) 321.44 ns/op 354.41 ns/op 0.91

by benchmarkbot/action

@dapplion dapplion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the problem with observing the case of no jobs submitted?

@twoeths

twoeths commented Apr 10, 2023

Copy link
Copy Markdown
Member Author

What's the problem with observing the case of no jobs submitted?

@dapplion most of the time it does not accept work, there is already canNotAcceptWork metric for that, I only want to monitor non-zero jobsSubmitted

Screenshot 2023-04-10 at 19 58 57

@twoeths
twoeths merged commit c65e1a4 into unstable Apr 11, 2023
@twoeths
twoeths deleted the tuyen/fix_job_submitted_metric branch April 11, 2023 01:25
@wemeetagain

Copy link
Copy Markdown
Member

馃帀 This PR is included in v1.8.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