change ram util metric
Metric 'memory.usage' depends on balloon driver, and shows the memory usage inside guest-os, while 'memory.resident' represents volume of RAM used by the instance on the physical machine So, it is more reasonable to use 'memory.resident' when calculating node utilization by gathering instances utilization of the node. Change-Id: I12dff5176bcf6cb103aa44cafd54f9ecd7170864
This commit is contained in:
parent
728acc091b
commit
d2f70f9d6f
@ -32,7 +32,7 @@ the strategy if available:
|
||||
============================ ============ ======= =======
|
||||
metric service name plugins comment
|
||||
============================ ============ ======= =======
|
||||
``memory.usage`` ceilometer_ none
|
||||
``memory.resident`` 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(
|
||||
ceilometer=dict(
|
||||
cpu_util_metric='cpu_util',
|
||||
ram_util_metric='memory.usage',
|
||||
ram_util_metric='memory.resident',
|
||||
ram_alloc_metric='memory',
|
||||
disk_alloc_metric='disk.root.size'),
|
||||
gnocchi=dict(
|
||||
cpu_util_metric='cpu_util',
|
||||
ram_util_metric='memory.usage',
|
||||
ram_util_metric='memory.resident',
|
||||
ram_alloc_metric='memory',
|
||||
disk_alloc_metric='disk.root.size'),
|
||||
)
|
||||
@ -361,7 +361,7 @@ class VMWorkloadConsolidation(base.ServerConsolidationBaseStrategy):
|
||||
|
||||
if not instance_ram_util:
|
||||
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)
|
||||
|
||||
if not instance_disk_util:
|
||||
|
@ -87,7 +87,7 @@ class FakeCeilometerMetrics(object):
|
||||
return self.get_node_cpu_util(resource_id)
|
||||
elif meter_name == "cpu_util":
|
||||
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)
|
||||
elif meter_name == "disk.root.size":
|
||||
return self.get_instance_disk_root_size(resource_id)
|
||||
@ -169,7 +169,7 @@ class FakeGnocchiMetrics(object):
|
||||
return self.get_node_cpu_util(resource_id)
|
||||
elif metric == "cpu_util":
|
||||
return self.get_instance_cpu_util(resource_id)
|
||||
elif metric == "memory.usage":
|
||||
elif metric == "memory.resident":
|
||||
return self.get_instance_ram_util(resource_id)
|
||||
elif metric == "disk.root.size":
|
||||
return self.get_instance_disk_root_size(resource_id)
|
||||
|
Loading…
Reference in New Issue
Block a user