From 04c9208c9e19e9d3cff9c2673a93886168578861 Mon Sep 17 00:00:00 2001 From: mwtian <81660174+mwtian@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:36:13 -0700 Subject: [PATCH] Lower per object queue age and length thresholds (#19851) ## Description The original limits on the object queue are set with 1s checkpoint interval. Having the oldest transaction on an object queued for 1s is almost tolerable. In hindsight it should be lower than the checkpoint interval to ensure healthy system. Now checkpoint interval is targeting 0.2s - 0.25s, so lowering the limits further to 0.2s, to ensure smooth checkpoint constructions. ## Test plan CI PT Reading `num_rejected_cert_during_overload` metric from validators. --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- crates/sui-config/src/node.rs | 4 +- ...ests__network_config_snapshot_matches.snap | 42 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/crates/sui-config/src/node.rs b/crates/sui-config/src/node.rs index dd9a96537df72..2074185a6318b 100644 --- a/crates/sui-config/src/node.rs +++ b/crates/sui-config/src/node.rs @@ -874,7 +874,7 @@ pub struct AuthorityOverloadConfig { } fn default_max_txn_age_in_queue() -> Duration { - Duration::from_secs(1) + Duration::from_millis(200) } fn default_overload_monitor_interval() -> Duration { @@ -910,7 +910,7 @@ fn default_max_transaction_manager_queue_length() -> usize { } fn default_max_transaction_manager_per_object_queue_length() -> usize { - 100 + 20 } impl Default for AuthorityOverloadConfig { diff --git a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap index c54b2309a9313..b0c734cf3a4e7 100644 --- a/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap +++ b/crates/sui-swarm-config/tests/snapshots/snapshot_tests__network_config_snapshot_matches.snap @@ -145,8 +145,8 @@ validator_configs: - Twitch authority-overload-config: max-txn-age-in-queue: - secs: 1 - nanos: 0 + secs: 0 + nanos: 200000000 overload-monitor-interval: secs: 10 nanos: 0 @@ -161,7 +161,7 @@ validator_configs: safe-transaction-ready-rate: 100 check-system-overload-at-signing: true max-transaction-manager-queue-length: 100000 - max-transaction-manager-per-object-queue-length: 100 + max-transaction-manager-per-object-queue-length: 20 execution-cache: writeback-cache: max_cache_size: ~ @@ -315,8 +315,8 @@ validator_configs: - Twitch authority-overload-config: max-txn-age-in-queue: - secs: 1 - nanos: 0 + secs: 0 + nanos: 200000000 overload-monitor-interval: secs: 10 nanos: 0 @@ -331,7 +331,7 @@ validator_configs: safe-transaction-ready-rate: 100 check-system-overload-at-signing: true max-transaction-manager-queue-length: 100000 - max-transaction-manager-per-object-queue-length: 100 + max-transaction-manager-per-object-queue-length: 20 execution-cache: writeback-cache: max_cache_size: ~ @@ -485,8 +485,8 @@ validator_configs: - Twitch authority-overload-config: max-txn-age-in-queue: - secs: 1 - nanos: 0 + secs: 0 + nanos: 200000000 overload-monitor-interval: secs: 10 nanos: 0 @@ -501,7 +501,7 @@ validator_configs: safe-transaction-ready-rate: 100 check-system-overload-at-signing: true max-transaction-manager-queue-length: 100000 - max-transaction-manager-per-object-queue-length: 100 + max-transaction-manager-per-object-queue-length: 20 execution-cache: writeback-cache: max_cache_size: ~ @@ -655,8 +655,8 @@ validator_configs: - Twitch authority-overload-config: max-txn-age-in-queue: - secs: 1 - nanos: 0 + secs: 0 + nanos: 200000000 overload-monitor-interval: secs: 10 nanos: 0 @@ -671,7 +671,7 @@ validator_configs: safe-transaction-ready-rate: 100 check-system-overload-at-signing: true max-transaction-manager-queue-length: 100000 - max-transaction-manager-per-object-queue-length: 100 + max-transaction-manager-per-object-queue-length: 20 execution-cache: writeback-cache: max_cache_size: ~ @@ -825,8 +825,8 @@ validator_configs: - Twitch authority-overload-config: max-txn-age-in-queue: - secs: 1 - nanos: 0 + secs: 0 + nanos: 200000000 overload-monitor-interval: secs: 10 nanos: 0 @@ -841,7 +841,7 @@ validator_configs: safe-transaction-ready-rate: 100 check-system-overload-at-signing: true max-transaction-manager-queue-length: 100000 - max-transaction-manager-per-object-queue-length: 100 + max-transaction-manager-per-object-queue-length: 20 execution-cache: writeback-cache: max_cache_size: ~ @@ -995,8 +995,8 @@ validator_configs: - Twitch authority-overload-config: max-txn-age-in-queue: - secs: 1 - nanos: 0 + secs: 0 + nanos: 200000000 overload-monitor-interval: secs: 10 nanos: 0 @@ -1011,7 +1011,7 @@ validator_configs: safe-transaction-ready-rate: 100 check-system-overload-at-signing: true max-transaction-manager-queue-length: 100000 - max-transaction-manager-per-object-queue-length: 100 + max-transaction-manager-per-object-queue-length: 20 execution-cache: writeback-cache: max_cache_size: ~ @@ -1165,8 +1165,8 @@ validator_configs: - Twitch authority-overload-config: max-txn-age-in-queue: - secs: 1 - nanos: 0 + secs: 0 + nanos: 200000000 overload-monitor-interval: secs: 10 nanos: 0 @@ -1181,7 +1181,7 @@ validator_configs: safe-transaction-ready-rate: 100 check-system-overload-at-signing: true max-transaction-manager-queue-length: 100000 - max-transaction-manager-per-object-queue-length: 100 + max-transaction-manager-per-object-queue-length: 20 execution-cache: writeback-cache: max_cache_size: ~