Skip to content

Commit

Permalink
chore: update sample config files and default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Jun 15, 2024
1 parent a890289 commit f5ae701
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
4 changes: 3 additions & 1 deletion config/datanode.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion config/frontend.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion config/metasrv.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 3 additions & 1 deletion config/standalone.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions src/cmd/tests/load_config_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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()),
Expand Down
4 changes: 2 additions & 2 deletions src/common/runtime/src/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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,
}
}
}
Expand Down

0 comments on commit f5ae701

Please sign in to comment.