Remove metrics dependent on Intel CMT perf events
Support for Intel CMT perf events was already removed from nova[1], because the implementation was removed from kernel some years ago[2]. These metrics have been broken for some time, so remove these metrics directly. [1] e45f3b5d71342d179bc150901f2dd5dabef238ca [2] fc4794acc6b13afade1bb72a1ae9f574707d2f0d Change-Id: Ia1996692347a3a3e8d4ff057996d5eb6840ca3de
This commit is contained in:
parent
2833992901
commit
9fe1d19de2
@ -82,21 +82,3 @@ class PerfCacheReferencesPollster(InstanceStatsPollster):
|
||||
class PerfCacheMissesPollster(InstanceStatsPollster):
|
||||
sample_name = 'perf.cache.misses'
|
||||
sample_stats_key = 'cache_misses'
|
||||
|
||||
|
||||
class MemoryBandwidthTotalPollster(InstanceStatsPollster):
|
||||
sample_name = 'memory.bandwidth.total'
|
||||
sample_unit = 'B/s'
|
||||
sample_stats_key = 'memory_bandwidth_total'
|
||||
|
||||
|
||||
class MemoryBandwidthLocalPollster(InstanceStatsPollster):
|
||||
sample_name = 'memory.bandwidth.local'
|
||||
sample_unit = 'B/s'
|
||||
sample_stats_key = 'memory_bandwidth_local'
|
||||
|
||||
|
||||
class CPUL3CachePollster(InstanceStatsPollster):
|
||||
sample_name = 'cpu_l3_cache'
|
||||
sample_unit = 'B'
|
||||
sample_stats_key = "cpu_l3_cache_usage"
|
||||
|
@ -40,23 +40,18 @@ LOG = log.getLogger(__name__)
|
||||
|
||||
class InstanceStats(object):
|
||||
fields = [
|
||||
'power_state', # the power state of the domain
|
||||
'cpu_number', # number: number of CPUs
|
||||
'cpu_time', # time: cumulative CPU time
|
||||
'cpu_l3_cache_usage', # cachesize: Amount of CPU L3 cache used
|
||||
'memory_usage', # usage: Amount of memory used
|
||||
'memory_resident', #
|
||||
'memory_swap_in', # memory swap in
|
||||
'memory_swap_out', # memory swap out
|
||||
'memory_bandwidth_total', # total: total system bandwidth from one
|
||||
# level of cache
|
||||
'memory_bandwidth_local', # local: bandwidth of memory traffic for a
|
||||
# memory controller
|
||||
'cpu_cycles', # cpu_cycles: the number of cpu cycles one
|
||||
# instruction needs
|
||||
'instructions', # instructions: the count of instructions
|
||||
'cache_references', # cache_references: the count of cache hits
|
||||
'cache_misses', # cache_misses: the count of caches misses
|
||||
'power_state', # the power state of the domain
|
||||
'cpu_number', # number: number of CPUs
|
||||
'cpu_time', # time: cumulative CPU time
|
||||
'memory_usage', # usage: Amount of memory used
|
||||
'memory_resident', #
|
||||
'memory_swap_in', # memory swap in
|
||||
'memory_swap_out', # memory swap out
|
||||
'cpu_cycles', # cpu_cycles: the number of cpu cycles one
|
||||
# instruction needs
|
||||
'instructions', # instructions: the count of instructions
|
||||
'cache_references', # cache_references: the count of cache hits
|
||||
'cache_misses', # cache_misses: the count of caches misses
|
||||
]
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
@ -252,8 +252,5 @@ class LibvirtInspector(virt_inspector.Inspector):
|
||||
cpu_cycles=stats.get("perf.cpu_cycles"),
|
||||
instructions=stats.get("perf.instructions"),
|
||||
cache_references=stats.get("perf.cache_references"),
|
||||
cache_misses=stats.get("perf.cache_misses"),
|
||||
memory_bandwidth_total=stats.get("perf.mbmt"),
|
||||
memory_bandwidth_local=stats.get("perf.mbml"),
|
||||
cpu_l3_cache_usage=stats.get("perf.cmt"),
|
||||
cache_misses=stats.get("perf.cache_misses")
|
||||
)
|
||||
|
@ -81,13 +81,10 @@ resources:
|
||||
memory.resident:
|
||||
memory.swap.in:
|
||||
memory.swap.out:
|
||||
memory.bandwidth.total:
|
||||
memory.bandwidth.local:
|
||||
vcpus:
|
||||
power.state:
|
||||
cpu:
|
||||
archive_policy_name: ceilometer-low-rate
|
||||
cpu_l3_cache:
|
||||
disk.root.size:
|
||||
disk.ephemeral.size:
|
||||
disk.latency:
|
||||
|
@ -96,26 +96,3 @@ class TestCPUPollster(base.TestPollsterBase):
|
||||
self.assertEqual(1, len(samples))
|
||||
self.assertEqual('m1.small',
|
||||
samples[0].resource_metadata['instance_type'])
|
||||
|
||||
|
||||
class TestCPUL3CachePollster(base.TestPollsterBase):
|
||||
|
||||
def test_get_samples(self):
|
||||
self._mock_inspect_instance(
|
||||
virt_inspector.InstanceStats(cpu_l3_cache_usage=90112),
|
||||
virt_inspector.InstanceStats(cpu_l3_cache_usage=180224),
|
||||
)
|
||||
|
||||
mgr = manager.AgentManager(0, self.CONF)
|
||||
pollster = instance_stats.CPUL3CachePollster(self.CONF)
|
||||
|
||||
def _verify_cpu_l3_cache_metering(expected_usage):
|
||||
cache = {}
|
||||
samples = list(pollster.get_samples(mgr, cache, [self.instance]))
|
||||
self.assertEqual(1, len(samples))
|
||||
self.assertEqual(set(['cpu_l3_cache']),
|
||||
set([s.name for s in samples]))
|
||||
self.assertEqual(expected_usage, samples[0].volume)
|
||||
|
||||
_verify_cpu_l3_cache_metering(90112)
|
||||
_verify_cpu_l3_cache_metering(180224)
|
||||
|
@ -136,45 +136,3 @@ class TestMemorySwapPollster(base.TestPollsterBase):
|
||||
|
||||
def all_samples():
|
||||
return list(pollster.get_samples(mgr, {}, [self.instance]))
|
||||
|
||||
|
||||
class TestMemoryBandwidthPollster(base.TestPollsterBase):
|
||||
|
||||
def test_get_samples(self):
|
||||
self._mock_inspect_instance(
|
||||
virt_inspector.InstanceStats(memory_bandwidth_total=1892352,
|
||||
memory_bandwidth_local=1802240),
|
||||
virt_inspector.InstanceStats(memory_bandwidth_total=1081344,
|
||||
memory_bandwidth_local=90112),
|
||||
)
|
||||
|
||||
mgr = manager.AgentManager(0, self.CONF)
|
||||
|
||||
def _check_memory_bandwidth_total(expected_usage):
|
||||
pollster = instance_stats.MemoryBandwidthTotalPollster(self.CONF)
|
||||
|
||||
samples = list(pollster.get_samples(mgr, {}, [self.instance]))
|
||||
self.assertEqual(1, len(samples))
|
||||
self.assertEqual(set(['memory.bandwidth.total']),
|
||||
set([s.name for s in samples]))
|
||||
self.assertEqual(expected_usage, samples[0].volume)
|
||||
|
||||
def _check_memory_bandwidth_local(expected_usage):
|
||||
pollster = instance_stats.MemoryBandwidthLocalPollster(self.CONF)
|
||||
|
||||
samples = list(pollster.get_samples(mgr, {}, [self.instance]))
|
||||
self.assertEqual(1, len(samples))
|
||||
self.assertEqual(set(['memory.bandwidth.local']),
|
||||
set([s.name for s in samples]))
|
||||
self.assertEqual(expected_usage, samples[0].volume)
|
||||
|
||||
_check_memory_bandwidth_total(1892352)
|
||||
_check_memory_bandwidth_local(90112)
|
||||
|
||||
def test_get_samples_with_empty_stats(self):
|
||||
self._mock_inspect_instance(virt_inspector.NoDataException())
|
||||
mgr = manager.AgentManager(0, self.CONF)
|
||||
pollster = instance_stats.MemoryBandwidthTotalPollster(self.CONF)
|
||||
|
||||
def all_samples():
|
||||
return list(pollster.get_samples(mgr, {}, [self.instance]))
|
||||
|
@ -67,13 +67,10 @@ class TestLibvirtInspection(base.BaseTestCase):
|
||||
'vcpu.0.wait': 10000,
|
||||
'vcpu.2.time': 10000,
|
||||
'vcpu.2.wait': 10000,
|
||||
'perf.cmt': 90112,
|
||||
'perf.cpu_cycles': 7259361,
|
||||
'perf.instructions': 8815623,
|
||||
'perf.cache_references': 74184,
|
||||
'perf.cache_misses': 16737,
|
||||
'perf.mbmt': 1892352,
|
||||
'perf.mbml': 1802240})]
|
||||
'perf.cache_misses': 16737})]
|
||||
|
||||
with mock.patch('ceilometer.compute.virt.libvirt.utils.'
|
||||
'refresh_libvirt_connection', return_value=conn):
|
||||
@ -81,13 +78,10 @@ class TestLibvirtInspection(base.BaseTestCase):
|
||||
self.assertEqual(0, stats.power_state)
|
||||
self.assertEqual(2, stats.cpu_number)
|
||||
self.assertEqual(40000, stats.cpu_time)
|
||||
self.assertEqual(90112, stats.cpu_l3_cache_usage)
|
||||
self.assertEqual(25600 / units.Ki, stats.memory_usage)
|
||||
self.assertEqual(30000 / units.Ki, stats.memory_resident)
|
||||
self.assertEqual(5120 / units.Ki, stats.memory_swap_in)
|
||||
self.assertEqual(8192 / units.Ki, stats.memory_swap_out)
|
||||
self.assertEqual(1892352, stats.memory_bandwidth_total)
|
||||
self.assertEqual(1802240, stats.memory_bandwidth_local)
|
||||
self.assertEqual(7259361, stats.cpu_cycles)
|
||||
self.assertEqual(8815623, stats.instructions)
|
||||
self.assertEqual(74184, stats.cache_references)
|
||||
@ -510,9 +504,6 @@ class TestLibvirtInspection(base.BaseTestCase):
|
||||
with mock.patch('ceilometer.compute.virt.libvirt.utils.'
|
||||
'refresh_libvirt_connection', return_value=conn):
|
||||
stats = self.inspector.inspect_instance(self.instance, None)
|
||||
self.assertIsNone(stats.cpu_l3_cache_usage)
|
||||
self.assertIsNone(stats.memory_bandwidth_total)
|
||||
self.assertIsNone(stats.memory_bandwidth_local)
|
||||
self.assertIsNone(stats.cpu_cycles)
|
||||
self.assertIsNone(stats.instructions)
|
||||
self.assertIsNone(stats.cache_references)
|
||||
|
@ -164,18 +164,6 @@ The following meters are collected for OpenStack Compute.
|
||||
+-----------+-------+------+----------+----------+---------+------------------+
|
||||
| **Meters added in the Newton release** |
|
||||
+-----------+-------+------+----------+----------+---------+------------------+
|
||||
| cpu_l3_c\ | Gauge | B | instance | Pollster | Libvirt | L3 cache used b\ |
|
||||
| ache | | | ID | | | y the instance |
|
||||
+-----------+-------+------+----------+----------+---------+------------------+
|
||||
| memory.b\ | Gauge | B/s | instance | Pollster | Libvirt | Total system ba\ |
|
||||
| andwidth\ | | | ID | | | ndwidth from on\ |
|
||||
| .total | | | | | | e level of cache |
|
||||
+-----------+-------+------+----------+----------+---------+------------------+
|
||||
| memory.b\ | Gauge | B/s | instance | Pollster | Libvirt | Bandwidth of me\ |
|
||||
| andwidth\ | | | ID | | | mory traffic fo\ |
|
||||
| .local | | | | | | r a memory cont\ |
|
||||
| | | | | | | roller |
|
||||
+-----------+-------+------+----------+----------+---------+------------------+
|
||||
| perf.cpu\ | Gauge | cyc\ | instance | Pollster | Libvirt | the number of c\ |
|
||||
| .cycles | | le | ID | | | pu cycles one i\ |
|
||||
| | | | | | | nstruction needs |
|
||||
|
@ -5,7 +5,6 @@ sources:
|
||||
meters:
|
||||
- power.state
|
||||
- cpu
|
||||
- cpu_l3_cache
|
||||
- memory.usage
|
||||
- network.incoming.bytes
|
||||
- network.incoming.packets
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The following meters were removed. Nova removed support for Intel CMT
|
||||
perf events in 22.0.0, and these meters can no longer be measured since
|
||||
then.
|
||||
|
||||
- ``cpu_l3_cache_usage``
|
||||
- ``memory_bandwidth_local``
|
||||
- ``memory_bandwidth_total``
|
@ -75,7 +75,6 @@ ceilometer.poll.compute =
|
||||
disk.device.write.latency = ceilometer.compute.pollsters.disk:PerDeviceDiskWriteLatencyPollster
|
||||
power.state = ceilometer.compute.pollsters.instance_stats:PowerStatePollster
|
||||
cpu = ceilometer.compute.pollsters.instance_stats:CPUPollster
|
||||
cpu_l3_cache = ceilometer.compute.pollsters.instance_stats:CPUL3CachePollster
|
||||
network.incoming.bytes = ceilometer.compute.pollsters.net:IncomingBytesPollster
|
||||
network.incoming.packets = ceilometer.compute.pollsters.net:IncomingPacketsPollster
|
||||
network.outgoing.bytes = ceilometer.compute.pollsters.net:OutgoingBytesPollster
|
||||
@ -92,8 +91,6 @@ ceilometer.poll.compute =
|
||||
memory.resident = ceilometer.compute.pollsters.instance_stats:MemoryResidentPollster
|
||||
memory.swap.in = ceilometer.compute.pollsters.instance_stats:MemorySwapInPollster
|
||||
memory.swap.out = ceilometer.compute.pollsters.instance_stats:MemorySwapOutPollster
|
||||
memory.bandwidth.total = ceilometer.compute.pollsters.instance_stats:MemoryBandwidthTotalPollster
|
||||
memory.bandwidth.local = ceilometer.compute.pollsters.instance_stats:MemoryBandwidthLocalPollster
|
||||
disk.device.capacity = ceilometer.compute.pollsters.disk:PerDeviceCapacityPollster
|
||||
disk.device.allocation = ceilometer.compute.pollsters.disk:PerDeviceAllocationPollster
|
||||
disk.device.usage = ceilometer.compute.pollsters.disk:PerDevicePhysicalPollster
|
||||
|
Loading…
x
Reference in New Issue
Block a user