diff options
author | Alex Auvolat <alex@adnab.me> | 2024-03-28 15:01:05 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-03-28 15:01:05 +0100 |
commit | 8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860 (patch) | |
tree | 49d6c32376708147e90ba64ea32cea7835e751c1 /src/util | |
parent | 25c196f34d958f4f61d50c89a1c5d40b96d7cd24 (diff) | |
parent | ecf641d88c264f7278d13a6d988288feb24a5dfe (diff) | |
download | garage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.tar.gz garage-8bfc16ba7d5e0c2806aa32e0257fbdc21cb93860.zip |
Merge branch 'main' into next-0.10
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/config.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/config.rs b/src/util/config.rs index c5a24f76..028f8c68 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -60,6 +60,14 @@ pub struct Config { )] pub compression_level: Option<i32>, + /// Maximum amount of block data to buffer in RAM for sending to + /// remote nodes when these nodes are on slower links + #[serde( + deserialize_with = "deserialize_capacity", + default = "default_block_ram_buffer_max" + )] + pub block_ram_buffer_max: usize, + /// Skip the permission check of secret files. Useful when /// POSIX ACLs (or more complex chmods) are used. #[serde(default)] @@ -247,6 +255,9 @@ fn default_db_engine() -> String { fn default_block_size() -> usize { 1048576 } +fn default_block_ram_buffer_max() -> usize { + 256 * 1024 * 1024 +} fn default_consistency_mode() -> String { "consistent".into() |