kito4 commented on issue #17661:
URL:
https://github.com/apache/dolphinscheduler/issues/17661#issuecomment-3639265442
Can i write loadbalancer with CPU and ThreadPool Oversubscription ? In
DynamicWeightedRoundRobinWorkerLoadBalancer we have weights for each worker and
it is never more than 100 ! What if make possible weight exceed that value ?
Tasks may take longer individually, but the overall throughput for a group of
tasks could improve, especially when some resources are underutilized
Memory oversubscription may be risky; this feature is intended for CPU and
ThreadPool only.
private double calculateWeight(WorkerServerMetadata server) {
double load =
dynamicWeightConfigProperties.getCpuUsageWeight() *
server.getCpuUsage()
+
dynamicWeightConfigProperties.getMemoryUsageWeight() * server.getMemoryUsage()
+
dynamicWeightConfigProperties.getTaskThreadPoolUsageWeight()
* server.getTaskThreadPoolUsage();
load = load / 3.0;
double osFactor =
dynamicWeightConfigProperties.getOversubscriptionFactor();
double maxWeight = 100 * osFactor;
double weight = maxWeight - load;
return Math.max(weight, 0.0);
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]