mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-21 18:36:35 +00:00
Add the parameter, which replaces . This is to accommodate different storage media such as HDD and NVMe.
This commit is contained in:
@@ -45,6 +45,11 @@ pub struct Config {
|
||||
)]
|
||||
pub block_size: usize,
|
||||
|
||||
/// Maximum number of parallel block writes per PUT request
|
||||
/// Higher values improve throughput but increase memory usage
|
||||
/// Default: 3, Recommended: 10-30 for NVMe, 3-10 for HDD
|
||||
#[serde(default = "default_put_blocks_max_parallel")]
|
||||
pub put_blocks_max_parallel: usize,
|
||||
/// Number of replicas. Can be any positive integer, but uneven numbers are more favorable.
|
||||
/// - 1 for single-node clusters, or to disable replication
|
||||
/// - 3 is the recommended and supported setting.
|
||||
@@ -267,6 +272,9 @@ pub struct KubernetesDiscoveryConfig {
|
||||
pub skip_crd: bool,
|
||||
}
|
||||
|
||||
pub fn default_put_blocks_max_parallel() -> usize {
|
||||
3
|
||||
}
|
||||
/// Read and parse configuration
|
||||
pub fn read_config(config_file: PathBuf) -> Result<Config, Error> {
|
||||
let config = std::fs::read_to_string(config_file)?;
|
||||
|
||||
Reference in New Issue
Block a user