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

[Consensus Observer] Parallelize message processing logic. #15030

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Conversation

JoshLind
Copy link
Contributor

@JoshLind JoshLind commented Oct 21, 2024

Description

This PR parallelizes message verification steps in consensus observer. Specifically, payload signature verification and payload digest verification. This should save about ~20ms in consensus observer lag for realistic_env_max_load (e.g., see: #15002)

Testing Plan

Existing test infrastructure.

Copy link

trunk-io bot commented Oct 21, 2024

⏱️ 2h 23m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 47m 🟩🟩
test-target-determinator 26m 🟩🟩🟩🟩🟩 (+1 more)
rust-cargo-deny 10m 🟩🟩🟩🟩🟩 (+1 more)
check-dynamic-deps 10m 🟩🟩🟩🟩🟩 (+2 more)
execution-performance / test-target-determinator 9m 🟩🟩
check 7m 🟩🟩
rust-doc-tests 5m 🟩
rust-doc-tests 5m 🟩
fetch-last-released-docker-image-tag 4m 🟩🟩
general-lints 3m 🟩🟩🟩🟩🟩 (+1 more)
semgrep/ci 3m 🟩🟩🟩🟩🟩 (+2 more)
rust-move-tests 2m 🟩
rust-move-tests 2m 🟩
rust-move-tests 2m 🟩
rust-move-tests 2m 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

@JoshLind JoshLind added the CICD:run-forge-e2e-perf Run the e2e perf forge only label Oct 21, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@JoshLind JoshLind marked this pull request as ready for review October 21, 2024 20:34
// Verify all the reconstructed batches (in parallel)
batches_and_transactions
.into_par_iter()
.try_for_each(|(batch_info, transactions)| verify_batch(&batch_info, transactions))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we may want to have a min_len to avoid too many small tasks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done boss 😄

proof_of_store.info(),
payload_proofs
.par_iter()
.try_for_each(|proof| proof.verify(validator_verifier, &proof_cache))
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@JoshLind JoshLind requested review from bchocho and hariria October 22, 2024 18:54
@JoshLind JoshLind enabled auto-merge (rebase) October 22, 2024 20:11

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on b7722208f9637a00747f4af6cbbb351661b44f23

two traffics test: inner traffic : committed: 13751.09 txn/s, latency: 2888.40 ms, (p50: 2700 ms, p70: 3000, p90: 3000 ms, p99: 3600 ms), latency samples: 5228580
two traffics test : committed: 99.91 txn/s, latency: 1659.58 ms, (p50: 1500 ms, p70: 1600, p90: 1700 ms, p99: 9400 ms), latency samples: 1760
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.268, avg: 0.229", "QsPosToProposal: max: 1.275, avg: 1.182", "ConsensusProposalToOrdered: max: 0.331, avg: 0.302", "ConsensusOrderedToCommit: max: 0.425, avg: 0.400", "ConsensusProposalToCommit: max: 0.725, avg: 0.702"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 1.33s no progress at version 33432 (avg 0.21s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.73s no progress at version 2464955 (avg 8.73s) [limit 15].
Test Ok

Copy link
Contributor

✅ Forge suite compat success on b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> b7722208f9637a00747f4af6cbbb351661b44f23

Compatibility test results for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> b7722208f9637a00747f4af6cbbb351661b44f23 (PR)
1. Check liveness of validators at old version: b29f09f57e898d8d211c8bc3e303f6e50bba2266
compatibility::simple-validator-upgrade::liveness-check : committed: 14141.93 txn/s, latency: 2362.83 ms, (p50: 1900 ms, p70: 2100, p90: 3100 ms, p99: 9400 ms), latency samples: 544340
2. Upgrading first Validator to new version: b7722208f9637a00747f4af6cbbb351661b44f23
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 6187.78 txn/s, latency: 4488.72 ms, (p50: 5000 ms, p70: 5300, p90: 5800 ms, p99: 6000 ms), latency samples: 115660
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 6151.14 txn/s, latency: 5171.64 ms, (p50: 5600 ms, p70: 5900, p90: 6300 ms, p99: 7400 ms), latency samples: 207500
3. Upgrading rest of first batch to new version: b7722208f9637a00747f4af6cbbb351661b44f23
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 6704.45 txn/s, latency: 4262.35 ms, (p50: 4900 ms, p70: 5100, p90: 5300 ms, p99: 5400 ms), latency samples: 125080
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 6175.22 txn/s, latency: 5156.09 ms, (p50: 5300 ms, p70: 5400, p90: 7100 ms, p99: 7400 ms), latency samples: 203160
4. upgrading second batch to new version: b7722208f9637a00747f4af6cbbb351661b44f23
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 8870.56 txn/s, latency: 3172.00 ms, (p50: 3400 ms, p70: 3900, p90: 4100 ms, p99: 4500 ms), latency samples: 156960
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 8386.31 txn/s, latency: 3781.12 ms, (p50: 3700 ms, p70: 4200, p90: 5100 ms, p99: 6200 ms), latency samples: 279560
5. check swarm health
Compatibility test for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> b7722208f9637a00747f4af6cbbb351661b44f23 passed
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> b7722208f9637a00747f4af6cbbb351661b44f23

Compatibility test results for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> b7722208f9637a00747f4af6cbbb351661b44f23 (PR)
Upgrade the nodes to version: b7722208f9637a00747f4af6cbbb351661b44f23
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1219.45 txn/s, submitted: 1221.03 txn/s, failed submission: 1.59 txn/s, expired: 1.59 txn/s, latency: 2587.92 ms, (p50: 2400 ms, p70: 2700, p90: 4200 ms, p99: 6000 ms), latency samples: 107680
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1174.25 txn/s, submitted: 1177.11 txn/s, failed submission: 2.87 txn/s, expired: 2.87 txn/s, latency: 2550.40 ms, (p50: 2100 ms, p70: 2700, p90: 4500 ms, p99: 5900 ms), latency samples: 106420
5. check swarm health
Compatibility test for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> b7722208f9637a00747f4af6cbbb351661b44f23 passed
Upgrade the remaining nodes to version: b7722208f9637a00747f4af6cbbb351661b44f23
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1186.27 txn/s, submitted: 1189.42 txn/s, failed submission: 3.15 txn/s, expired: 3.15 txn/s, latency: 2667.64 ms, (p50: 2400 ms, p70: 2700, p90: 4500 ms, p99: 6000 ms), latency samples: 105540
Test Ok

@JoshLind JoshLind merged commit 26286cd into main Oct 22, 2024
48 checks passed
@JoshLind JoshLind deleted the co_opt_lat branch October 22, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CICD:run-forge-e2e-perf Run the e2e perf forge only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants