]> git.hungrycats.org Git - bees/commitdiff
docs: add `--throttle-factor` option
authorZygo Blaxell <bees@furryterror.org>
Tue, 17 Dec 2024 04:24:39 +0000 (23:24 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sat, 4 Jan 2025 04:15:37 +0000 (23:15 -0500)
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
docs/options.md
docs/running.md

index a254b709561567a75f82ff00119162ddf21121f3..6fafc1ed613d74ad6324646cb37e87b9884f9c75 100644 (file)
 
  Has no effect unless `--loadavg-target` is used to specify a target load.
 
+* `--throttle-factor FACTOR`
+
+ In order to avoid saturating btrfs deferred work queues, bees tracks
+ the time that operations with delayed effect (dedupe and tmpfile copy)
+ and operations with long run times (`LOGICAL_INO`) run.  If an operation
+ finishes before the average run time for that operation, bees will
+ sleep for the remainder of the average run time, so that operations
+ are submitted to btrfs at a rate similar to the rate that btrfs can
+ complete them.
+
+ The `FACTOR` is multiplied by the average run time for each operation
+ to calculate the target delay time.
+
+ `FACTOR` 0 adds no delays.  bees will attempt to saturate btrfs delayed
+ work queues as quickly as possible, which may impact other processes
+ on the same filesystem, or even slow down bees itself.
+
+ `FACTOR` 1.0 is the default, and will attempt to keep btrfs delayed work
+ queues filled at a steady average rate.
+
+ `FACTOR` more than 1.0 will add delays longer than the average
+ run time (e.g. 10.0 will delay all operations that take less than 10x
+ the average run time).  High values of `FACTOR` may be desirable when
+ using bees with other applications on the same filesystem.
+
+ The maximum delay per operation is 60 seconds.
+
 ## Filesystem tree traversal options
 
 * `--scan-mode MODE` or `-m`
index 3ac1be337c7a2c0f1fe88e048dde552e99528f6f..409db74caf88006077240bc991600f175d5a740f 100644 (file)
@@ -75,9 +75,8 @@ in the shell script that launches `bees`:
         schedtool -D -n20 $$
         ionice -c3 -p $$
 
-You can also use the [`--loadavg-target` and `--thread-min`
-options](options.md) to further control the impact of bees on the rest
-of the system.
+You can also use the [load management options](options.md) to further
+control the impact of bees on the rest of the system.
 
 Let the bees fly: