From ae6ecfec966ed4bd1a97cab9c4ccc4a9407f3467 Mon Sep 17 00:00:00 2001 From: Bo QIU <35757521+boqiu@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:55:00 +0800 Subject: [PATCH] reduce default sync threads (#214) --- node/sync/src/lib.rs | 4 ++-- run/config-testnet-standard.toml | 4 ++-- run/config-testnet-turbo.toml | 4 ++-- run/config.toml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/node/sync/src/lib.rs b/node/sync/src/lib.rs index c908413..3673589 100644 --- a/node/sync/src/lib.rs +++ b/node/sync/src/lib.rs @@ -66,7 +66,7 @@ impl Default for Config { // sync service config heartbeat_interval: Duration::from_secs(5), auto_sync_enabled: false, - max_sync_files: 32, + max_sync_files: 8, sync_file_by_rpc_enabled: true, sync_file_on_announcement_enabled: false, @@ -86,7 +86,7 @@ impl Default for Config { auto_sync_idle_interval: Duration::from_secs(3), auto_sync_error_interval: Duration::from_secs(10), max_sequential_workers: 0, - max_random_workers: 30, + max_random_workers: 2, sequential_find_peer_timeout: Duration::from_secs(60), random_find_peer_timeout: Duration::from_secs(500), } diff --git a/run/config-testnet-standard.toml b/run/config-testnet-standard.toml index 70d925c..536420b 100644 --- a/run/config-testnet-standard.toml +++ b/run/config-testnet-standard.toml @@ -233,7 +233,7 @@ batcher_announcement_capacity = 100 auto_sync_enabled = true # Maximum number of files in sync from other peers simultaneously. -# max_sync_files = 32 +# max_sync_files = 8 # Enable to start a file sync via RPC (e.g. `admin_startSyncFile`). # sync_file_by_rpc_enabled = true @@ -261,7 +261,7 @@ auto_sync_enabled = true # max_sequential_workers = 0 # Maximum threads to sync files randomly. -# max_random_workers = 30 +# max_random_workers = 2 # Timeout to terminate a file sync in sequence. # sequential_find_peer_timeout = "60s" diff --git a/run/config-testnet-turbo.toml b/run/config-testnet-turbo.toml index b544089..c556308 100644 --- a/run/config-testnet-turbo.toml +++ b/run/config-testnet-turbo.toml @@ -245,7 +245,7 @@ batcher_announcement_capacity = 100 auto_sync_enabled = true # Maximum number of files in sync from other peers simultaneously. -# max_sync_files = 32 +# max_sync_files = 8 # Enable to start a file sync via RPC (e.g. `admin_startSyncFile`). # sync_file_by_rpc_enabled = true @@ -273,7 +273,7 @@ auto_sync_enabled = true # max_sequential_workers = 0 # Maximum threads to sync files randomly. -# max_random_workers = 30 +# max_random_workers = 2 # Timeout to terminate a file sync in sequence. # sequential_find_peer_timeout = "60s" diff --git a/run/config.toml b/run/config.toml index 4d4f045..831c079 100644 --- a/run/config.toml +++ b/run/config.toml @@ -247,7 +247,7 @@ # auto_sync_enabled = false # Maximum number of files in sync from other peers simultaneously. -# max_sync_files = 32 +# max_sync_files = 8 # Enable to start a file sync via RPC (e.g. `admin_startSyncFile`). # sync_file_by_rpc_enabled = true @@ -275,7 +275,7 @@ # max_sequential_workers = 0 # Maximum threads to sync files randomly. -# max_random_workers = 30 +# max_random_workers = 2 # Timeout to terminate a file sync in sequence. # sequential_find_peer_timeout = "60s"