tuned
tuned copied to clipboard
Refactor dynamic tuning and add per-plugin global configuration
In this PR, I add a global per-plugin configuration of dynamic tuning, which works as follows:
- The boolean
dynamic_tuning
option stays as it is - it can be used to globally enable or disable dynamic tuning in all plugins. - When
dynamic_tuning
is on, one can use the newdynamic_plugins
option to restrict the set of plugins which can perform dynamic tuning. For instance, settingdynamic_plugins=scheduler,disk
enables dynamic tuning only for the two plugins. - On plugin instance level, one can still disable dynamic tuning by setting
dynamic=0
in the profile configuration. This now works for all plugins with dynamic capabilities.
Secondly, I integrated the "runtime" functionality of the scheduler plugin under dynamic tuning. To do so, we need to distinguish between dynamic plugins that are updated periodically by the main daemon thread (currently, all except the scheduler plugin) and dynamic plugins that implement their tuning in their own thread.
The changes required quite a bit of refactoring. I believe the code could be made even cleaner by creating a separate subclass of Plugin
for the dynamic plugins, but that would require even more massive refactoring, so I'm not sure if it's worth doing at this point.
Please resolve conflicts.
Please resolve conflicts.
Done.