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

[short][move e2e bench] Add gas metrics and more existing transaction types #15302

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

igor-aptos
Copy link
Contributor

@igor-aptos igor-aptos commented Nov 18, 2024

Description

This allows for easier understanding of gas calibration. Looking at gas/s metrics (and execution and io breakdown) makes it easy to calibrate new constants.

How Has This Been Tested?

used to calibrate vector::move_range native

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Nov 18, 2024

⏱️ 2h 39m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 35m 🟥🟥🟩
rust-move-tests 12m 🟩
rust-move-tests 12m 🟩
rust-move-tests 12m 🟩
rust-move-tests 12m 🟩
rust-move-tests 11m 🟥
check-dynamic-deps 10m 🟩🟩🟩🟩🟩
rust-cargo-deny 9m 🟩🟩🟩🟩🟩
execution-performance / test-target-determinator 9m 🟩🟩
test-target-determinator 9m 🟩🟩
check 7m 🟩🟩
rust-doc-tests 5m 🟩
rust-doc-tests 5m 🟩
fetch-last-released-docker-image-tag 3m 🟩🟩
general-lints 2m 🟩🟩🟩🟩🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

@@ -144,6 +144,13 @@ pub enum GasMeterType {
UnmeteredGasMeter,
}

#[derive(Clone)]
pub struct TimeAndGas {
pub elapsed_micros: u128,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: elapsed_micro_secs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rust uses term micros, i.e. Duration::from_micros

@@ -144,6 +144,13 @@ pub enum GasMeterType {
UnmeteredGasMeter,
}

#[derive(Clone)]
pub struct TimeAndGas {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: calling it Measurement can be more consitent with what you call it in e2e-benchmarks

);

json_lines.push(json!({
"grep": "grep_json_aptos_move_vm_perf",
"transaction_type": entry_point_name,
"wall_time_us": elapsed_micros,
"wall_time_us": measurement.elapsed_micros,
"gps": (measurement.execution_gas + measurement.io_gas) as u128 / measurement.elapsed_micros,
Copy link
Contributor

Choose a reason for hiding this comment

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

gas/us for better readability? Plus it is not seconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

parsing with / in logs can be more complicated - this json is for humio graphs

gas unit is 1/10^6 gas internal units, and same as micros, so this is gas unit / s

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, can you maybe put a comment for that here? gps is ok 👍

Comment on lines 91 to 93
InitializeVectorPicture { length: 128 } 6 0.973 1.066 75.0
VectorPicture { length: 128 } 6 0.955 1.092 22.0
VectorPictureRead { length: 128 } 6 0.952 1.047 21.0
Copy link

Choose a reason for hiding this comment

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

The timing data for InitializeVectorPicture, VectorPicture, and VectorPictureRead operations appears to be using measurements from when length was 40, but the code now tests with length of 128. These calibration values should be regenerated with the new length to maintain benchmark accuracy. Without updated measurements, performance regressions or improvements may go undetected since the baseline values don't reflect the current workload.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@igor-aptos igor-aptos enabled auto-merge (squash) November 19, 2024 19:10

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 compat success on be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 830e5e8e317dd10b5277238a79df4bf3e361c9e8

Compatibility test results for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 830e5e8e317dd10b5277238a79df4bf3e361c9e8 (PR)
1. Check liveness of validators at old version: be3ccc58ef518259d63fab7f3e3613f2a6214268
compatibility::simple-validator-upgrade::liveness-check : committed: 12387.38 txn/s, latency: 2373.79 ms, (p50: 1700 ms, p70: 1900, p90: 2800 ms, p99: 27000 ms), latency samples: 496260
2. Upgrading first Validator to new version: 830e5e8e317dd10b5277238a79df4bf3e361c9e8
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 5188.30 txn/s, latency: 5629.99 ms, (p50: 6100 ms, p70: 6500, p90: 7100 ms, p99: 7300 ms), latency samples: 97740
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 5123.89 txn/s, latency: 6295.16 ms, (p50: 6700 ms, p70: 7100, p90: 7500 ms, p99: 8300 ms), latency samples: 171840
3. Upgrading rest of first batch to new version: 830e5e8e317dd10b5277238a79df4bf3e361c9e8
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 6421.85 txn/s, latency: 4450.92 ms, (p50: 4800 ms, p70: 5100, p90: 5700 ms, p99: 6000 ms), latency samples: 123320
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 6544.36 txn/s, latency: 4944.65 ms, (p50: 5300 ms, p70: 5600, p90: 6600 ms, p99: 7100 ms), latency samples: 221920
4. upgrading second batch to new version: 830e5e8e317dd10b5277238a79df4bf3e361c9e8
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 11100.38 txn/s, latency: 2452.62 ms, (p50: 2400 ms, p70: 2500, p90: 4200 ms, p99: 4400 ms), latency samples: 189920
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 11203.24 txn/s, latency: 2779.77 ms, (p50: 2500 ms, p70: 2600, p90: 5500 ms, p99: 7300 ms), latency samples: 361800
5. check swarm health
Compatibility test for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 830e5e8e317dd10b5277238a79df4bf3e361c9e8 passed
Test Ok

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 830e5e8e317dd10b5277238a79df4bf3e361c9e8

two traffics test: inner traffic : committed: 13379.60 txn/s, submitted: 13380.23 txn/s, expired: 0.63 txn/s, latency: 2949.16 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 12700 ms), latency samples: 5087220
two traffics test : committed: 99.92 txn/s, latency: 1536.91 ms, (p50: 1400 ms, p70: 1400, p90: 1600 ms, p99: 11500 ms), latency samples: 1840
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 2.461, avg: 1.779", "ConsensusProposalToOrdered: max: 0.333, avg: 0.301", "ConsensusOrderedToCommit: max: 0.378, avg: 0.369", "ConsensusProposalToCommit: max: 0.698, avg: 0.669"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 1.04s no progress at version 5466246 (avg 0.21s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.68s no progress at version 5464893 (avg 7.96s) [limit 15].
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 830e5e8e317dd10b5277238a79df4bf3e361c9e8

Compatibility test results for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 830e5e8e317dd10b5277238a79df4bf3e361c9e8 (PR)
Upgrade the nodes to version: 830e5e8e317dd10b5277238a79df4bf3e361c9e8
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1345.53 txn/s, submitted: 1348.72 txn/s, failed submission: 3.19 txn/s, expired: 3.19 txn/s, latency: 2304.49 ms, (p50: 2100 ms, p70: 2400, p90: 3600 ms, p99: 5700 ms), latency samples: 118100
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1337.32 txn/s, submitted: 1340.17 txn/s, failed submission: 2.85 txn/s, expired: 2.85 txn/s, latency: 2210.05 ms, (p50: 1800 ms, p70: 2300, p90: 3900 ms, p99: 5700 ms), latency samples: 122000
5. check swarm health
Compatibility test for be3ccc58ef518259d63fab7f3e3613f2a6214268 ==> 830e5e8e317dd10b5277238a79df4bf3e361c9e8 passed
Upgrade the remaining nodes to version: 830e5e8e317dd10b5277238a79df4bf3e361c9e8
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1425.48 txn/s, submitted: 1429.51 txn/s, failed submission: 4.03 txn/s, expired: 4.03 txn/s, latency: 2208.26 ms, (p50: 2100 ms, p70: 2400, p90: 3300 ms, p99: 4800 ms), latency samples: 127360
Test Ok

@igor-aptos igor-aptos merged commit 6acc3d5 into main Nov 19, 2024
48 checks passed
@igor-aptos igor-aptos deleted the igor/add_gas_to_move_e2e branch November 19, 2024 22:11
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