Skip to content

make all [build-dependencies] opt-level=3 for release build#18015

Merged
mkurnikov merged 3 commits intomainfrom
build-deps-opt-level-3
Nov 5, 2025
Merged

make all [build-dependencies] opt-level=3 for release build#18015
mkurnikov merged 3 commits intomainfrom
build-deps-opt-level-3

Conversation

@mkurnikov
Copy link
Copy Markdown
Collaborator

@mkurnikov mkurnikov commented Nov 2, 2025

For the release profile (and any others like ci and performance):

  1. removes 335 crates from the dependency tree by allowing cargo to share dependencies between build.rs and runtime,
  2. makes aptos-cached-packages build 3.5 times faster.

By default, all [build-dependencies] are opt-level=0 irrespective of the actual build profile.
See
rust-lang/cargo#8500


Note

Adds [profile.release.build-override] opt-level=3 so build-dependencies compile with opt-level=3 in release builds, improving build performance and dependency sharing.

  • Build system:
    • Configure Cargo to compile build-dependencies with opt-level=3 via [profile.release.build-override] in Cargo.toml (applies to profiles inheriting from release).

Written by Cursor Bugbot for commit 773191e. This will update automatically on new commits. Configure here.

@mkurnikov mkurnikov requested a review from wrwg November 2, 2025 17:40
Comment thread Cargo.toml
@mkurnikov mkurnikov enabled auto-merge (squash) November 4, 2025 23:21
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

✅ Forge suite compat success on fe5575e100e831eea34ac2e123dd7bc0ab4f81f1 ==> 773191e888ea72e69e9b345f261ad4891d2b3990

Compatibility test results for fe5575e100e831eea34ac2e123dd7bc0ab4f81f1 ==> 773191e888ea72e69e9b345f261ad4891d2b3990 (PR)
1. Check liveness of validators at old version: fe5575e100e831eea34ac2e123dd7bc0ab4f81f1
compatibility::simple-validator-upgrade::liveness-check : committed: 14425.33 txn/s, latency: 2391.24 ms, (p50: 2500 ms, p70: 2600, p90: 2700 ms, p99: 3600 ms), latency samples: 479360
2. Upgrading first Validator to new version: 773191e888ea72e69e9b345f261ad4891d2b3990
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 5308.25 txn/s, latency: 6449.83 ms, (p50: 7100 ms, p70: 7200, p90: 7300 ms, p99: 7300 ms), latency samples: 185540
3. Upgrading rest of first batch to new version: 773191e888ea72e69e9b345f261ad4891d2b3990
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 5312.72 txn/s, latency: 6497.26 ms, (p50: 7200 ms, p70: 7300, p90: 7400 ms, p99: 7400 ms), latency samples: 183000
4. upgrading second batch to new version: 773191e888ea72e69e9b345f261ad4891d2b3990
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 8279.48 txn/s, latency: 4123.93 ms, (p50: 4400 ms, p70: 4600, p90: 4700 ms, p99: 4900 ms), latency samples: 275240
5. check swarm health
Compatibility test for fe5575e100e831eea34ac2e123dd7bc0ab4f81f1 ==> 773191e888ea72e69e9b345f261ad4891d2b3990 passed
Test Ok

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

✅ Forge suite realistic_env_max_load success on 773191e888ea72e69e9b345f261ad4891d2b3990

Forge report malformed: Expecting ',' delimiter: line 3 column 6 (char 22)
'{\n  "metrics": [\n[2025-11-04T23:54:55Z INFO  aptos_forge::report] Test Ok\n    {\n      "test_name": "two traffics test: inner traffic",\n      "metric": "submitted_txn",\n      "value": 5048580.0\n    },\n    {\n      "test_name": "two traffics test: inner traffic",\n      "metric": "expired_txn",\n      "value": 0.0\n    },\n    {\n      "test_name": "two traffics test: inner traffic",\n      "metric": "avg_tps",\n      "value": 13555.773571763155\n    },\n    {\n      "test_name": "two traffics test: inner traffic",\n      "metric": "avg_latency",\n      "value": 2779.6283228155244\n    },\n    {\n      "test_name": "two traffics test: inner traffic",\n      "metric": "p50_latency",\n      "value": 2700.0\n    },\n    {\n      "test_name": "two traffics test: inner traffic",\n      "metric": "p90_latency",\n      "value": 3000.0\n    },\n    {\n      "test_name": "two traffics test: inner traffic",\n      "metric": "p99_latency",\n      "value": 6200.0\n    },\n    {\n      "test_name": "two traffics test",\n      "metric": "submitted_txn",\n      "value": 42680.0\n    },\n    {\n      "test_name": "two traffics test",\n      "metric": "expired_txn",\n      "value": 0.0\n    },\n    {\n      "test_name": "two traffics test",\n      "metric": "avg_tps",\n      "value": 99.99416093140762\n    },\n    {\n      "test_name": "two traffics test",\n      "metric": "avg_latency",\n      "value": 847.7360465116279\n    },\n    {\n      "test_name": "two traffics test",\n      "metric": "p50_latency",\n      "value": 800.0\n    },\n    {\n      "test_name": "two traffics test",\n      "metric": "p90_latency",\n      "value": 900.0\n    },\n    {\n      "test_name": "two traffics test",\n      "metric": "p99_latency",\n      "value": 4700.0\n    }\n  ],\n  "text": "two traffics test: inner traffic : committed: 13555.77 txn/s, latency: 2779.63 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 6200 ms), latency samples: 5048580\\ntwo traffics test : committed: 99.99 txn/s, latency: 847.74 ms, (p50: 800 ms, p70: 800, p90: 900 ms, p99: 4700 ms), latency samples: 1720\\nLatency breakdown for phase 0: [\\"MempoolToBlockCreation: max: 2.347, avg: 2.085\\", \\"ConsensusProposalToOrdered: max: 0.166, avg: 0.163\\", \\"ConsensusOrderedToCommit: max: 0.075, avg: 0.067\\", \\"ConsensusProposalToCommit: max: 0.237, avg: 0.231\\"]\\nMax non-epoch-change gap was: 1 rounds at version 1157937 (avg 0.00) [limit 4], 1.16s no progress at version 1883976 (avg 0.07s) [limit 15].\\nMax epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.27s no progress at version 2437150 (avg 0.27s) [limit 16].\\nTest Ok"\n}'
Trailing Log Lines:
networkchaos.chaos-mesh.org "4-gcp--as-southeast1-to-3-gcp--us-east4-netem" deleted
test CompositeNetworkTest ... ok
Test Statistics: 
two traffics test: inner traffic : committed: 13555.77 txn/s, latency: 2779.63 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 6200 ms), latency samples: 5048580
two traffics test : committed: 99.99 txn/s, latency: 847.74 ms, (p50: 800 ms, p70: 800, p90: 900 ms, p99: 4700 ms), latency samples: 1720
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 2.347, avg: 2.085", "ConsensusProposalToOrdered: max: 0.166, avg: 0.163", "ConsensusOrderedToCommit: max: 0.075, avg: 0.067", "ConsensusProposalToCommit: max: 0.237, avg: 0.231"]
Max non-epoch-change gap was: 1 rounds at version 1157937 (avg 0.00) [limit 4], 1.16s no progress at version 1883976 (avg 0.07s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.27s no progress at version 2437150 (avg 0.27s) [limit 16].
Test Ok

=== BEGIN JUNIT ===
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="forge" tests="1" failures="0" errors="0" uuid="47b5fd57-c250-4520-a1ac-16eab6e5c903">
    <testsuite name="local" tests="1" disabled="0" errors="0" failures="0">
        <testcase name="CompositeNetworkTest(network:multi-region-network-emulation(two traffics test)) with ">
        </testcase>
    </testsuite>
</testsuites>
=== END JUNIT ===
[2025-11-04T23:54:55Z INFO  aptos_forge::backend::k8s::cluster_helper] Deleting namespace forge-e2e-pr-18015: Some(NamespaceStatus { conditions: None, phase: Some("Terminating") })
[2025-11-04T23:54:55Z INFO  aptos_forge::backend::k8s::cluster_helper] aptos-node resources for Forge removed in namespace: forge-e2e-pr-18015

test result: ok. 1 passed; 0 soft failed; 0 hard failed; 0 filtered out

Debugging output:
NAME                                         READY   STATUS      RESTARTS   AGE
aptos-node-0-fullnode-eforge39dd8ce1-0       1/1     Running     0          11m
aptos-node-0-validator-0                     1/1     Running     0          11m
aptos-node-1-fullnode-eforge39dd8ce1-0       1/1     Running     0          11m
aptos-node-1-validator-0                     1/1     Running     0          11m
aptos-node-2-fullnode-eforge39dd8ce1-0       1/1     Running     0          11m
aptos-node-2-validator-0                     1/1     Running     0          11m
aptos-node-3-fullnode-eforge39dd8ce1-0       1/1     Running     0          11m
aptos-node-3-validator-0                     1/1     Running     0          11m
aptos-node-4-fullnode-eforge39dd8ce1-0       1/1     Running     0          11m
aptos-node-4-validator-0                     1/1     Running     0          11m
aptos-node-5-validator-0                     1/1     Running     0          11m
aptos-node-6-validator-0                     1/1     Running     0          11m
forge-testnet-deployer-75dwl                 0/1     Completed   0          12m
genesis-aptos-genesis-eforge39dd8ce1-zn4rz   0/1     Completed   0          11m

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 4, 2025

✅ Forge suite framework_upgrade success on fe5575e100e831eea34ac2e123dd7bc0ab4f81f1 ==> 773191e888ea72e69e9b345f261ad4891d2b3990

Compatibility test results for fe5575e100e831eea34ac2e123dd7bc0ab4f81f1 ==> 773191e888ea72e69e9b345f261ad4891d2b3990 (PR)
Upgrade the nodes to version: 773191e888ea72e69e9b345f261ad4891d2b3990
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 2340.29 txn/s, submitted: 2348.93 txn/s, failed submission: 8.64 txn/s, expired: 8.64 txn/s, latency: 1258.21 ms, (p50: 1200 ms, p70: 1400, p90: 1500 ms, p99: 1800 ms), latency samples: 211382
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 2172.42 txn/s, submitted: 2179.14 txn/s, failed submission: 6.72 txn/s, expired: 6.72 txn/s, latency: 1372.70 ms, (p50: 1200 ms, p70: 1500, p90: 1800 ms, p99: 2100 ms), latency samples: 193860
5. check swarm health
Compatibility test for fe5575e100e831eea34ac2e123dd7bc0ab4f81f1 ==> 773191e888ea72e69e9b345f261ad4891d2b3990 passed
Upgrade the remaining nodes to version: 773191e888ea72e69e9b345f261ad4891d2b3990
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 2223.31 txn/s, submitted: 2232.57 txn/s, failed submission: 9.25 txn/s, expired: 9.25 txn/s, latency: 1298.60 ms, (p50: 1200 ms, p70: 1500, p90: 1800 ms, p99: 3000 ms), latency samples: 201801
Test Ok

@mkurnikov mkurnikov merged commit e86983e into main Nov 5, 2025
102 of 103 checks passed
@mkurnikov mkurnikov deleted the build-deps-opt-level-3 branch November 5, 2025 00:09
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