Product Line: VERDE
Resource Utilization Index (RUI)
Overview
The high level requirement is to aggregate virtual machine consumption rates for various areas such as CPU, memory (especially if ballooning is implemented), Virtual Network, Display Protocol, and IOPS into a "Resource Utilization Index". These values would be recorded individually then aggregated using a reasonable formula. Note this is not about performance but about relative consumption of server resources. It is not possible to judge the user experience (performance) index by looking at VM behavior alone - this is already done inside Windows using the "Performance Index" for example, where it measures the speed of various (virtual) devices. The RUI is more about the VM's impact on the infrastructure (server and storage).
Capture
The individual rates need to be collected from the connection broker (measuring display protocol bandwidth use), and runtime monitor/QEMU (collecting things like IOPS for the various disk constructs). Additional instrumentation can be gathered from inside the VM, such as swappiness, etc. System services can measure the per-thread CPU utilization % on the system. When reporting to the cluster master, all values need to be sent individually. The CM can then aggregate these into a simple index that the management console can display to the user.
Presentation
The MC should display the RUI in a column of the user session monitor. When the user clicks on this, a hover balloon can expand and display all of the last known values for the individual components making up the RUI
What Goes In The RUI
RUI value Calculation
There are 2 values that must be calculated: the RUI (Resource Utilization Index), and the SPI (Session Performance Index). The individual components that go into these values are presented in the verdecmon-ni "sessions" command. They were added immediately following <protocol>, which was the last field before this enhancement.
There are 10 individual integers after the <protocol> field:
<cpu_per_thread>|<ram_size>|<disp_kbps>|<tap_rkbps>|<tap_xkbps>|<sess_cpu_use>|<sess_mem_use>|<sess_swappiness>|<sess_sysdisk_use>|<sess_userdisk_use>
The first 5 values correspond to the RUI, while the last 5 values are for the SPI.
The idea is to normalize each value to 100% (the normalized value may be higher than 100%, but it will be on a percentage scale). All values are already presented in percentage except for the <*_kbps> values, and the <ram_size> value. The <ram_size> value is actually not part of any calculation, but just informational.
The <kbps> values should be normalized to some sane values that one day will hopefully be configurable. The idea is to weigh them from good (0) to bad (99+). Default scales should be:
disp_kbps - 10240 = 100% (10 Mbps can be considered a lot for display protocol access)
tap_rkbps - 102400 = 100% (100 Mbps can be considered a lot for downstream network access)
tap_xkbps - 102400 = 100% (100 Mbps can be considered a lot for upstream network access)
To calculate RUI take the highest of:
cpu_per_thread, disp_kbps(%), tap_rkbps(%), tap_xkbps(%)
For example, let's say cpu_per_thread is 50. Let's say disp_kbps% works out to 60 after you calculate it, and the other 2 percentage values work out to 30. RUI would equal 60.
There is one more parameter that you will want to fetch when expanding the RUI to show individual components. It's the cpu_usage, or the 3rd parameter from the front of the sessions output, which you already show today as CPU% in the MC. We now want to show that as part of the RUI expansion although we use a different CPU metric to calculate the RUI itself (this will make more sense below).
Keep in mind that you should display all values like this (in a hover balloon, or whatever), when RUI is expanded:
CPU % of server: <cpu_usage - original CPU%, see above> %
CPU % per thread: <cpu_per_thread> %
RAM on server: <ram_size> KB
Display bandwidth: <disp_kbps> Kbps
Network receive bandwidth: <tap_rkbps> Kbps
Network transmit bandwidth: <tap_xkbps> Kbps
The output of a hover balloon might look like this:
CPU % of server: 1%
CPU % per thread: 9%
RAM on server: 4194304 KB
Display bandwidth: 50 Kbps
Network receive bandwidth: 560 Kbps
Network transmit bandwidth: 300 Kbps
The MC should render these values in the "cold to hot" format, with 0 being green and 99+ being red. The same goes for the RUI itself.
SPI Value Calculation
The SPI calculation is more straightforward since all the values are already normalized as percentages. Again, just take the highest of:
sess_cpu_use, sess_mem_use, sess_swappiness, sess_sysdisk_use, sess_userdisk_use
So if 1 of the 5 values is 20 and the others are less than that, the SPI would equal 20.
When you break out the SPI into a hover balloon, it would look like this:
Session CPU use: <sess_cpu_use> %
Session RAM use: <sess_mem_use> %
Session "Swappiness": <sess_swappiness> %
Session System Disk Use: <sess_sysdisk_use> %
Session User Disk Use: <sess_userdisk_use> %
Example:
Session CPU use: 20%
Session RAM use: 12%
Session "Swappiness": 0%
Session System Disk Use: 87%
Session User Disk Use: 46%