Adds memory utilization meter to libvirt inspector¶
Memory usage statistics is not implemented in libvirt inspector. We can get memory stats of the instance from libvirt API ‘virDomainMemoryStats’ in order to add memory usage meter to libvirt inspector.
Memory usage of instance is very important data in telemetry, but now it is not implemented in libvirt inspector. This spec adds memory usage statistics to libvirt, so the user can get the data on the performance of the instance.
Implements the method ‘inspect_memory_usage’ of LibvirtInspector, fetches the memory stats data from libvirt API ‘virDomainMemoryStats’, used memory is calculated by the available and unused memory. The libvirt API ‘virDomainMemoryStats’ may raise an exception if the method is not supported by libvirt, refer to ‘Dependencies’ section, catches the exception and translates that into an empty data of memory stats.
Data model impact¶
REST API impact¶
Other end user impact¶
User need to prepare suitable balloon driver in image, particularly for Windows guests, most modern Linuxes have it built in. Booting instance will be successful without image balloon driver, just can’t get guest memory usage meter.
Other deployer impact¶
None. By default, the memory statistical feature is enabled in Nova, refer to , we just fetch and collect the data from libvirt API.
- Primary assignee:
Implements the method ‘inspect_memory_usage’ of LibvirtInspector.
Adds relate unit tests.
Updates ceilometer measurements document.
Once this feature enabled, need test and bug fixing in next 2 releases to avoid regression.
guest driver that supports memory balloon stats
Unit tests are sufficient since only data fetching need test.
The added metrics will need to be documented in the measurements section.