1
0
Fork 0

plugin_net: Allow disabling dynamic tuning

The net plugin can now be given the boolean 'dynamic'
option, which is used to determine, whether dynamic tuning
should be enabled.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
Ondřej Lysoněk 2017-09-25 17:53:01 +02:00
parent cf87220216
commit 7e7b1ee878

View file

@ -38,11 +38,16 @@ class NetTuningPlugin(base.Plugin):
def _instance_init(self, instance):
instance._has_static_tuning = True
instance._has_dynamic_tuning = True
instance._load_monitor = self._monitors_repository.create("net", instance.devices)
instance._idle = {}
instance._stats = {}
if self._option_bool(instance.options["dynamic"]):
instance._has_dynamic_tuning = True
instance._load_monitor = self._monitors_repository.create("net", instance.devices)
instance._idle = {}
instance._stats = {}
else:
instance._has_dynamic_tuning = False
instance._load_monitor = None
instance._idle = None
instance._stats = None
def _instance_cleanup(self, instance):
if instance._load_monitor is not None:
@ -120,6 +125,7 @@ class NetTuningPlugin(base.Plugin):
@classmethod
def _get_config_options(cls):
return {
"dynamic": True,
"wake_on_lan": None,
"nf_conntrack_hashsize": None,
"features": None,