Hi All,
I want to add one new feature for per CPU usage information collecting for host and host NUMA node.
I have walk through related engine core, vdsm code.
Three approach to implement this:
1. CPU usage of every cpus -> CPU usage of each NUMA node (Composite)
? Change the polling method of host sampling function to get every cpus usage(user, sys) from /proc/stats
? Follow the NUMA topology info, Change the API getStats function to compose the CPU usage of each NUMA node.
2. Polling the libvirt API getNodeCPUStats
? Add the new thread for using libvirt API getNodeCPUStats to sample the each NUMA node entire CPU information.
? Change the API getStats calculate NUMA node CPU usage from sampling data.
3. If we need the each cpu individual usage information in oVirt scheduler,
the first implement method should change to return every cpu usage to engine side, and the composite function will add into engine core.
Consideration:
1. The performance of engine core
? The engine will use refresh function to get VDS(host) stats data (such as total CPU usage) every 2 sec. (default value)
? The engine will receive every NUMA node CPU usage information (user, sys), and calculate the whole usage on engine core.
? Approach 3: return every cpu usage will cost low performance. (not sure)
2. The performance of vdsm
? Approach 1: The vdsm will use host sampling thread collecting the cpu stats every 2 sec. interval. (sampling every cpu usage will cost low performance)
? Approach 2: The new thread of using libvirt API to sample data will have better performance than Approach 1.
Does anybody know the performance detailed about these area and have some suggestion, that is very kind of you.
Best Regards,
Jason Liao