Class SmartLoadBalancer
java.lang.Object
hudson.model.LoadBalancer
io.jenkins.plugins.smartexecutorloadbalancer.SmartLoadBalancer
- All Implemented Interfaces:
ExtensionPoint
Smart load balancer — v2.
Scoring formula (higher = more preferred)
score = (idleExecutors × 1 000)
− (busyExecutors × 10 000) [from v1 — any busy exec heavily penalised]
− (sysLoadAvg × loadWeight) [e.g., load 4.0 × 200 = −800]
− (nodeFaultCount × 2 000) [per node-env fault in the last 10 runs]
Hard avoidance
WhennodeFaultCount ≥ failureThreshold (default 10) the node is
excluded entirely for that label. If ALL candidate nodes are suppressed the
balancer falls back to normal scoring (so builds never get stuck forever).
The admin can also suppress a node manually from the management UI.-
Nested Class Summary
Nested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class LoadBalancer
CONSISTENT_HASH, DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmap(Queue.Task task, MappingWorksheet ws) protected LoadBalancersanitize()Returnthisso thatqueue.getLoadBalancer()reportsSmartLoadBalancerrather than the anonymous$2wrapper Jenkins normally creates.
-
Constructor Details
-
SmartLoadBalancer
public SmartLoadBalancer() -
SmartLoadBalancer
-
-
Method Details
-
sanitize
Returnthisso thatqueue.getLoadBalancer()reportsSmartLoadBalancerrather than the anonymous$2wrapper Jenkins normally creates. We replicate the quiet-down guard here.- Overrides:
sanitizein classLoadBalancer
-
map
- Specified by:
mapin classLoadBalancer
-