Skip to content

Express configured durations in seconds, not polls - #151

Open
tmakatos wants to merge 2 commits into
per-vm-log-layerfrom
config-durations
Open

tmakatos wants to merge 2 commits into
per-vm-log-layerfrom
config-durations

Conversation

@tmakatos

Copy link
Copy Markdown
Collaborator

Durations are now integer seconds in settings ending in _secs:

scale_poll_secs, cooldown_secs (now integers, were floats)
scale_down_sustain_polls -> scale_down_sustain_secs
scale_validation_sample_polls -> scale_validation_delay_secs
scale_validation_sample_polls_per_thread -> scale_validation_delay_per_thread_secs
post_revert_up_grace_polls -> post_revert_up_grace_secs
post_revert_up_recovery_polls -> post_revert_up_recovery_secs
post_revert_up_backoff_max_polls -> post_revert_up_backoff_max_secs
scale_down_backoff_max_polls -> scale_down_backoff_max_secs

Every duration must be a multiple of scale_poll_secs. The engine
receives the poll period when it is built and converts its durations to
polls once, so engine logic is unchanged. The daemon refuses to start if
any duration, controller or engine, is not a multiple, listing all of
them with the nearest valid values.

The round_up_durations config option and --round-up-durations flag
(both off by default) instead round such durations up with a warning,
so that a new poll period can be tried without rewriting the config.
The daemon now logs the effective controller, engine, and backend
configuration at startup, which shows rounded values.

The daemon also prints errors with Display rather than Debug.

AI-generated: everything.


Stack created with GitHub Stacks CLI • Give Feedback 💬

@tmakatos
tmakatos added this pull request to stack #149 October 23, 2026 07:12
@tmakatos
tmakatos marked this pull request as draft October 23, 2026 07:13
Durations are now integer seconds in settings ending in _secs:

  scale_poll_secs, cooldown_secs              (now integers, were floats)
  scale_down_sustain_polls                 -> scale_down_sustain_secs
  scale_validation_sample_polls            -> scale_validation_delay_secs
  scale_validation_sample_polls_per_thread -> scale_validation_delay_per_thread_secs
  post_revert_up_grace_polls               -> post_revert_up_grace_secs
  post_revert_up_recovery_polls            -> post_revert_up_recovery_secs
  post_revert_up_backoff_max_polls         -> post_revert_up_backoff_max_secs
  scale_down_backoff_max_polls             -> scale_down_backoff_max_secs

Every duration must be a multiple of scale_poll_secs. The engine
receives the poll period when it is built and converts its durations to
polls once, so engine logic is unchanged. The daemon refuses to start if
any duration, controller or engine, is not a multiple, listing all of
them with the nearest valid values.

The round_up_durations config option and --round-up-durations flag
(both off by default) instead round such durations up with a warning,
so that a new poll period can be tried without rewriting the config.
The daemon now logs the effective controller, engine, and backend
configuration at startup, which shows rounded values.

The daemon also prints errors with Display rather than Debug.

AI-generated: everything.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Add a Configuration section that explains where configuration files are
read from, how defaults apply, and every controller and threshold engine
setting, and move the threshold validation and backoff description into
it.

AI-generated: everything.
@tmakatos
tmakatos marked this pull request as ready for review October 23, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant