Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ Controller, engine, and backend JSON files may contain an `include` field. Its
path is resolved relative to the including file, loaded recursively, and merged
before the including file's keys are applied.

## Durations

Durations are integer seconds in settings ending in `_secs`. Every duration,
including engine ones, must be a whole multiple of `scale_poll_secs`, and zero
is allowed. Otherwise the daemon refuses to start and lists each offending
setting with the nearest valid values. Changing only `scale_poll_secs` can
therefore invalidate other settings.
Comment thread
lforchini marked this conversation as resolved.

To try a new poll period without rewriting the other settings, set
`round_up_durations` or pass `--round-up-durations`. Each offending duration is
then rounded up to the next multiple with a warning. At startup the daemon logs
the effective controller, engine, and backend configuration, which shows the
rounded values.

## Thread-name filtering

Backends may select fallback `/proc` CPU samples with regular expressions and
Expand Down Expand Up @@ -131,21 +145,21 @@ queries and thread-count changes need an independently stateful handle for each
VM. This keeps the controller independent of libvirt, QMP, control sockets, and
other transport details.

After a successful action, the engine waits
`scale_validation_sample_polls` complete samples. The optional
`scale_validation_sample_polls_per_thread` setting adds that many samples for
each thread in the resulting pool, allowing larger pools more time to settle.
After a successful action, the engine samples for
`scale_validation_delay_secs`. The optional
`scale_validation_delay_per_thread_secs` setting adds that much time for each
thread in the resulting pool, allowing larger pools more time to settle.
A scale-up is reverted unless IOPS gained at least
`scale_up_min_gain_percent`; a scale-down is reverted when IOPS lost more than
`scale_down_revert_drop_percent`. Setting either percentage to zero disables
that direction's validation.

Repeated failures back off per VM. After a reverted scale-up, scale-up is
blocked for `post_revert_up_grace_polls` plus `post_revert_up_recovery_polls`;
blocked for `post_revert_up_grace_secs` plus `post_revert_up_recovery_secs`;
that hold doubles with each consecutive failed scale-up, up to
`post_revert_up_backoff_max_polls`. After a reverted scale-down, the next
scale-down needs `scale_down_sustain_polls` low-utilisation polls doubled once
per consecutive failure, up to `scale_down_backoff_max_polls`. A kept action
`post_revert_up_backoff_max_secs`. After a reverted scale-down, the next
scale-down needs `scale_down_sustain_secs` of low utilisation doubled once per
consecutive failure, up to `scale_down_backoff_max_secs`. A kept action
resets its direction's backoff, as does an applied action in the opposite
direction. Setting a maximum to zero disables that direction's backoff.

Expand Down
14 changes: 7 additions & 7 deletions io-thread-controller.d/engines/threshold.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"scale_up_threshold_percent": 95,
"scale_down_sustain_polls": 12,
"scale_down_sustain_secs": 120,
"max_scale_down_step": 0,
"scale_up_min_gain_percent": 5,
"scale_down_revert_drop_percent": 3,
"scale_validation_sample_polls": 3,
"scale_validation_sample_polls_per_thread": 0,
"scale_validation_delay_secs": 30,
"scale_validation_delay_per_thread_secs": 0,
"block_scale_up_when_cgroup_throttled": true,
"post_revert_up_grace_polls": 1,
"post_revert_up_recovery_polls": 2,
"post_revert_up_backoff_max_polls": 30,
"scale_down_backoff_max_polls": 120
"post_revert_up_grace_secs": 10,
"post_revert_up_recovery_secs": 20,
"post_revert_up_backoff_max_secs": 300,
"scale_down_backoff_max_secs": 1200
}
5 changes: 3 additions & 2 deletions io-thread-controller.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"scale_poll_secs": 10.0,
"scale_poll_secs": 10,
"round_up_durations": false,
"enable_per_vm_status_line": true,
"enable_aggregate_status_line": true,
"min_thread_count": 1,
"max_thread_count": 8,
"host_cpu_scale_up_ceiling_percent": 90,
"cooldown_secs": 10.0,
"cooldown_secs": 10,
"engine": "threshold",
"engine_config_dir": "/etc/io-thread-controller.d/engines",
"backend_config_dir": "/etc/io-thread-controller.d/backends",
Expand Down
Loading
Loading