Merge "change ram util metric"
This commit is contained in:
commit
47004b7c67
@ -22,7 +22,7 @@ The *vm_workload_consolidation* strategy requires the following metrics:
|
|||||||
============================ ============ ======= =======
|
============================ ============ ======= =======
|
||||||
metric service name plugins comment
|
metric service name plugins comment
|
||||||
============================ ============ ======= =======
|
============================ ============ ======= =======
|
||||||
``memory`` ceilometer_ none
|
``memory`` ceilometer_ none
|
||||||
``disk.root.size`` ceilometer_ none
|
``disk.root.size`` ceilometer_ none
|
||||||
============================ ============ ======= =======
|
============================ ============ ======= =======
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ the strategy if available:
|
|||||||
============================ ============ ======= =======
|
============================ ============ ======= =======
|
||||||
metric service name plugins comment
|
metric service name plugins comment
|
||||||
============================ ============ ======= =======
|
============================ ============ ======= =======
|
||||||
``memory.usage`` ceilometer_ none
|
``memory.resident`` ceilometer_ none
|
||||||
``cpu_util`` ceilometer_ none
|
``cpu_util`` ceilometer_ none
|
||||||
============================ ============ ======= =======
|
============================ ============ ======= =======
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Enhancement of vm_workload_consolidation strategy
|
||||||
|
by using 'memory.resident' metric in place of
|
||||||
|
'memory.usage', as memory.usage shows the memory
|
||||||
|
usage inside guest-os and memory.resident
|
||||||
|
represents volume of RAM used by instance
|
||||||
|
on host machine.
|
6
watcher/decision_engine/strategy/strategies/vm_workload_consolidation.py
Executable file → Normal file
6
watcher/decision_engine/strategy/strategies/vm_workload_consolidation.py
Executable file → Normal file
@ -77,12 +77,12 @@ class VMWorkloadConsolidation(base.ServerConsolidationBaseStrategy):
|
|||||||
METRIC_NAMES = dict(
|
METRIC_NAMES = dict(
|
||||||
ceilometer=dict(
|
ceilometer=dict(
|
||||||
cpu_util_metric='cpu_util',
|
cpu_util_metric='cpu_util',
|
||||||
ram_util_metric='memory.usage',
|
ram_util_metric='memory.resident',
|
||||||
ram_alloc_metric='memory',
|
ram_alloc_metric='memory',
|
||||||
disk_alloc_metric='disk.root.size'),
|
disk_alloc_metric='disk.root.size'),
|
||||||
gnocchi=dict(
|
gnocchi=dict(
|
||||||
cpu_util_metric='cpu_util',
|
cpu_util_metric='cpu_util',
|
||||||
ram_util_metric='memory.usage',
|
ram_util_metric='memory.resident',
|
||||||
ram_alloc_metric='memory',
|
ram_alloc_metric='memory',
|
||||||
disk_alloc_metric='disk.root.size'),
|
disk_alloc_metric='disk.root.size'),
|
||||||
)
|
)
|
||||||
@ -361,7 +361,7 @@ class VMWorkloadConsolidation(base.ServerConsolidationBaseStrategy):
|
|||||||
|
|
||||||
if not instance_ram_util:
|
if not instance_ram_util:
|
||||||
instance_ram_util = instance.memory
|
instance_ram_util = instance.memory
|
||||||
LOG.warning('No values returned by %s for memory.usage, '
|
LOG.warning('No values returned by %s for memory.resident, '
|
||||||
'use instance flavor ram value', instance.uuid)
|
'use instance flavor ram value', instance.uuid)
|
||||||
|
|
||||||
if not instance_disk_util:
|
if not instance_disk_util:
|
||||||
|
@ -87,7 +87,7 @@ class FakeCeilometerMetrics(object):
|
|||||||
return self.get_node_cpu_util(resource_id)
|
return self.get_node_cpu_util(resource_id)
|
||||||
elif meter_name == "cpu_util":
|
elif meter_name == "cpu_util":
|
||||||
return self.get_instance_cpu_util(resource_id)
|
return self.get_instance_cpu_util(resource_id)
|
||||||
elif meter_name == "memory.usage":
|
elif meter_name == "memory.resident":
|
||||||
return self.get_instance_ram_util(resource_id)
|
return self.get_instance_ram_util(resource_id)
|
||||||
elif meter_name == "disk.root.size":
|
elif meter_name == "disk.root.size":
|
||||||
return self.get_instance_disk_root_size(resource_id)
|
return self.get_instance_disk_root_size(resource_id)
|
||||||
@ -169,7 +169,7 @@ class FakeGnocchiMetrics(object):
|
|||||||
return self.get_node_cpu_util(resource_id)
|
return self.get_node_cpu_util(resource_id)
|
||||||
elif metric == "cpu_util":
|
elif metric == "cpu_util":
|
||||||
return self.get_instance_cpu_util(resource_id)
|
return self.get_instance_cpu_util(resource_id)
|
||||||
elif metric == "memory.usage":
|
elif metric == "memory.resident":
|
||||||
return self.get_instance_ram_util(resource_id)
|
return self.get_instance_ram_util(resource_id)
|
||||||
elif metric == "disk.root.size":
|
elif metric == "disk.root.size":
|
||||||
return self.get_instance_disk_root_size(resource_id)
|
return self.get_instance_disk_root_size(resource_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user