chore: update sample config files and default settings

This commit is contained in:
Ning Sun
2024-06-14 22:20:46 -07:00
parent a8902890cf
commit f5ae701c8d
6 changed files with 18 additions and 10 deletions

View File

@@ -42,7 +42,9 @@ read_rt_size = 8
## The number of threads to execute the runtime for global write operations.
write_rt_size = 8
## The number of threads to execute the runtime for global background operations.
bg_rt_size = 8
bg_rt_size = 4
## The number of threads to execute the runtime for heartbeat operations.
hb_rt_size = 2
## The heartbeat options.
[heartbeat]

View File

@@ -12,7 +12,9 @@ read_rt_size = 8
## The number of threads to execute the runtime for global write operations.
write_rt_size = 8
## The number of threads to execute the runtime for global background operations.
bg_rt_size = 8
bg_rt_size = 4
## The number of threads to execute the runtime for heartbeat operations.
hb_rt_size = 2
## The heartbeat options.
[heartbeat]

View File

@@ -32,7 +32,9 @@ read_rt_size = 8
## The number of threads to execute the runtime for global write operations.
write_rt_size = 8
## The number of threads to execute the runtime for global background operations.
bg_rt_size = 8
bg_rt_size = 4
## The number of threads to execute the runtime for heartbeat operations.
hb_rt_size = 2
## Procedure storage options.
[procedure]

View File

@@ -15,7 +15,9 @@ read_rt_size = 8
## The number of threads to execute the runtime for global write operations.
write_rt_size = 8
## The number of threads to execute the runtime for global background operations.
bg_rt_size = 8
bg_rt_size = 4
## The number of threads to execute the runtime for heartbeat operations.
hb_rt_size = 2
## The HTTP server options.
[http]

View File

@@ -42,7 +42,7 @@ fn test_load_datanode_example_config() {
read_rt_size: 8,
write_rt_size: 8,
bg_rt_size: 4,
hb_rt_size: 1,
hb_rt_size: 2,
},
component: DatanodeOptions {
node_id: Some(42),
@@ -102,7 +102,7 @@ fn test_load_frontend_example_config() {
read_rt_size: 8,
write_rt_size: 8,
bg_rt_size: 4,
hb_rt_size: 1,
hb_rt_size: 2,
},
component: FrontendOptions {
default_timezone: Some("UTC".to_string()),
@@ -151,7 +151,7 @@ fn test_load_metasrv_example_config() {
read_rt_size: 8,
write_rt_size: 8,
bg_rt_size: 4,
hb_rt_size: 1,
hb_rt_size: 2,
},
component: MetasrvOptions {
selector: SelectorType::LeaseBased,
@@ -185,7 +185,7 @@ fn test_load_standalone_example_config() {
read_rt_size: 8,
write_rt_size: 8,
bg_rt_size: 4,
hb_rt_size: 1,
hb_rt_size: 2,
},
component: StandaloneOptions {
default_timezone: Some("UTC".to_string()),

View File

@@ -26,7 +26,7 @@ use crate::{Builder, JoinHandle, Runtime};
const READ_WORKERS: usize = 8;
const WRITE_WORKERS: usize = 8;
const BG_WORKERS: usize = 4;
const HB_WORKERS: usize = 1;
const HB_WORKERS: usize = 2;
/// The options for the global runtimes.
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
@@ -49,7 +49,7 @@ impl Default for RuntimeOptions {
read_rt_size: cpus,
write_rt_size: cpus,
bg_rt_size: usize::max(cpus / 2, 1),
hb_rt_size: 1,
hb_rt_size: HB_WORKERS,
}
}
}