case object CpuMetricsSelector extends CapacityMetricsSelector with Product with Serializable
MetricsSelector that uses the combined CPU time metrics and stolen CPU time metrics. In modern Linux kernels: CpuCombined + CpuStolen + CpuIdle = 1.0 or 100%. Combined CPU is sum of User + Sys + Nice + Wait times, as percentage. Stolen CPU is the amount of CPU taken away from this virtual machine by the hypervisor, as percentage.
Low CPU capacity => small node weight.
- Annotations
- @SerialVersionUID()
- Source
- ClusterMetricsRouting.scala
- Alphabetic
- By Inheritance
- CpuMetricsSelector
- Product
- Equals
- CapacityMetricsSelector
- MetricsSelector
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def capacity(nodeMetrics: Set[NodeMetrics]): Map[Address, Double]
Remaining capacity for each node.
Remaining capacity for each node. The value is between 0.0 and 1.0, where 0.0 means no remaining capacity (full utilization) and 1.0 means full remaining capacity (zero utilization).
- Definition Classes
- CpuMetricsSelector → CapacityMetricsSelector
- val factor: Double
How much extra weight to give to the stolen time.
- def getInstance: CpuMetricsSelector
Java API: get the singleton instance
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def weights(nodeMetrics: Set[NodeMetrics]): Map[Address, Int]
The weights per address, based on the capacity produced by the nodeMetrics.
The weights per address, based on the capacity produced by the nodeMetrics.
- Definition Classes
- CapacityMetricsSelector → MetricsSelector
- def weights(capacity: Map[Address, Double]): Map[Address, Int]
Converts the capacity values to weights.
Converts the capacity values to weights. The node with lowest capacity gets weight 1 (lowest usable capacity is 1%) and other nodes gets weights proportional to their capacity compared to the node with lowest capacity.
- Definition Classes
- CapacityMetricsSelector