From 2090a6187f7d106e0641bed4cac145ad5184995d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 3 Nov 2021 18:28:43 +0100 Subject: Add tranquilizer mechanism to improve on token bucket mechanism --- src/garage/cli/structs.rs | 6 +++--- src/garage/repair.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/garage') diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index 620be9ef..0df6ef87 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -285,9 +285,9 @@ pub enum RepairWhat { /// Verify integrity of all blocks on disc (extremely slow, i/o intensive) #[structopt(name = "scrub")] Scrub { - /// Limit on i/o speed, in B/s - #[structopt(name = "limit")] - limit: Option, + /// Tranquility factor (see tranquilizer documentation) + #[structopt(name = "tranquility", default_value = "2")] + tranquility: u32, }, } diff --git a/src/garage/repair.rs b/src/garage/repair.rs index bfe7bf84..a786f1f1 100644 --- a/src/garage/repair.rs +++ b/src/garage/repair.rs @@ -51,11 +51,11 @@ impl Repair { .repair_data_store(&must_exit) .await?; } - RepairWhat::Scrub { limit } => { + RepairWhat::Scrub { tranquility } => { info!("Verifying integrity of stored blocks"); self.garage .block_manager - .scrub_data_store(&must_exit, limit) + .scrub_data_store(&must_exit, tranquility) .await?; } } -- cgit v1.2.3