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

[Storage] Open db in parallel when storage sharding is enabled. #15504

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

grao1991
Copy link
Contributor

@grao1991 grao1991 commented Dec 5, 2024

Description

How Has This Been Tested?

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 Dec 5, 2024

@grao1991 grao1991 requested a review from areshand December 5, 2024 01:06
@grao1991 grao1991 enabled auto-merge (squash) December 5, 2024 01:12
readonly,
sharding,
)
Self::open(db_paths, rocksdb_configs.state_kv_db_config, readonly)
Copy link
Contributor

Choose a reason for hiding this comment

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

let's rename to Self::open_sharded() or something?

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

let mut transaction_db = None;
let mut transaction_info_db = None;
let mut write_set_db = None;
THREAD_MANAGER.get_non_exe_cpu_pool().scope(|s| {
Copy link
Contributor

Choose a reason for hiding this comment

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

seems no particular reason to use this pool?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. Just need some threads here.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

} else {
state_kv_db_column_families()
};
pub(super) fn gen_state_kv_cfds(rocksdb_config: &RocksdbConfig) -> Vec<ColumnFamilyDescriptor> {
Copy link
Contributor

Choose a reason for hiding this comment

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

probably gen_state_kv_shard_cfds()

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

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.

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.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Dec 5, 2024

✅ Forge suite compat success on c2969f0b0ecd826aa1516a386aed59496a247958 ==> 067a47dbbfc151e4cedfce1480de1f759da80cd5

Compatibility test results for c2969f0b0ecd826aa1516a386aed59496a247958 ==> 067a47dbbfc151e4cedfce1480de1f759da80cd5 (PR)
1. Check liveness of validators at old version: c2969f0b0ecd826aa1516a386aed59496a247958
compatibility::simple-validator-upgrade::liveness-check : committed: 17136.63 txn/s, latency: 1986.89 ms, (p50: 2100 ms, p70: 2100, p90: 2200 ms, p99: 2400 ms), latency samples: 550440
2. Upgrading first Validator to new version: 067a47dbbfc151e4cedfce1480de1f759da80cd5
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 7445.36 txn/s, latency: 3874.36 ms, (p50: 4300 ms, p70: 4500, p90: 4600 ms, p99: 4700 ms), latency samples: 141300
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 7510.75 txn/s, latency: 4347.09 ms, (p50: 4700 ms, p70: 4700, p90: 4900 ms, p99: 5300 ms), latency samples: 248560
3. Upgrading rest of first batch to new version: 067a47dbbfc151e4cedfce1480de1f759da80cd5
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 7799.87 txn/s, latency: 3653.86 ms, (p50: 3900 ms, p70: 4200, p90: 4700 ms, p99: 4900 ms), latency samples: 144920
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 8091.71 txn/s, latency: 4042.49 ms, (p50: 4300 ms, p70: 4400, p90: 4700 ms, p99: 5200 ms), latency samples: 264340
4. upgrading second batch to new version: 067a47dbbfc151e4cedfce1480de1f759da80cd5
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 10856.74 txn/s, latency: 2549.75 ms, (p50: 2500 ms, p70: 3100, p90: 3400 ms, p99: 3600 ms), latency samples: 191240
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 11831.23 txn/s, latency: 2699.94 ms, (p50: 2700 ms, p70: 3100, p90: 3200 ms, p99: 3500 ms), latency samples: 381300
5. check swarm health
Compatibility test for c2969f0b0ecd826aa1516a386aed59496a247958 ==> 067a47dbbfc151e4cedfce1480de1f759da80cd5 passed
Test Ok

Copy link
Contributor

github-actions bot commented Dec 5, 2024

✅ Forge suite realistic_env_max_load success on 067a47dbbfc151e4cedfce1480de1f759da80cd5

two traffics test: inner traffic : committed: 14890.96 txn/s, latency: 2666.38 ms, (p50: 2700 ms, p70: 2700, p90: 2900 ms, p99: 3000 ms), latency samples: 5661840
two traffics test : committed: 100.03 txn/s, latency: 1406.55 ms, (p50: 1400 ms, p70: 1400, p90: 1500 ms, p99: 2100 ms), latency samples: 1740
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.518, avg: 1.464", "ConsensusProposalToOrdered: max: 0.319, avg: 0.289", "ConsensusOrderedToCommit: max: 0.368, avg: 0.359", "ConsensusProposalToCommit: max: 0.655, avg: 0.649"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.57s no progress at version 15704 (avg 0.20s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.69s no progress at version 2448364 (avg 0.69s) [limit 16].
Test Ok

Copy link
Contributor

github-actions bot commented Dec 5, 2024

✅ Forge suite framework_upgrade success on c2969f0b0ecd826aa1516a386aed59496a247958 ==> 067a47dbbfc151e4cedfce1480de1f759da80cd5

Compatibility test results for c2969f0b0ecd826aa1516a386aed59496a247958 ==> 067a47dbbfc151e4cedfce1480de1f759da80cd5 (PR)
Upgrade the nodes to version: 067a47dbbfc151e4cedfce1480de1f759da80cd5
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1468.28 txn/s, submitted: 1471.05 txn/s, failed submission: 2.77 txn/s, expired: 2.77 txn/s, latency: 2096.11 ms, (p50: 2100 ms, p70: 2400, p90: 2800 ms, p99: 4500 ms), latency samples: 127180
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1438.92 txn/s, submitted: 1442.88 txn/s, failed submission: 3.96 txn/s, expired: 3.96 txn/s, latency: 2084.63 ms, (p50: 2100 ms, p70: 2300, p90: 2600 ms, p99: 3500 ms), latency samples: 130880
5. check swarm health
Compatibility test for c2969f0b0ecd826aa1516a386aed59496a247958 ==> 067a47dbbfc151e4cedfce1480de1f759da80cd5 passed
Upgrade the remaining nodes to version: 067a47dbbfc151e4cedfce1480de1f759da80cd5
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1400.90 txn/s, submitted: 1403.97 txn/s, failed submission: 3.07 txn/s, expired: 3.07 txn/s, latency: 2333.86 ms, (p50: 2400 ms, p70: 2400, p90: 3000 ms, p99: 4500 ms), latency samples: 118740
Test Ok

@grao1991 grao1991 merged commit d1230b9 into main Dec 5, 2024
47 checks passed
@grao1991 grao1991 deleted the grao_open_db branch December 5, 2024 07:37
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