The initial resources support in OpenShift, which is used in auto scaling to determine resource limits for new containers that are being deployed, currently requires executing multiple queries against H-Metrics and then calculating percentiles on the client side. Specifically, the Heapster sink has to execute multiple tag filter queries to find matching CPU and memory usage metrics. Heapster than calculates the 95th percentile for overallCPU usage and overall memory usage. This work needs to be done on the server side within a single API call.
This is somewhat similar to
HWKMETRICS-263 in that we need to fetch data points for multiple metrics and perform calculations on those data points. It is different in that we do not want to compute aggregates of individual metrics first but rather compute a single set of aggregates for all data points from matching metrics. In other words, if we have 10 matching metrics for CPU usage, we want to fetch the data points for those metrics and calculate the 95th percentile of them as a whole rather than first computing the 95th percentile for each metric and then during further computations on those results.
While this feature is needed for OpenShift, it is a generally useful feature like