New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better task balancing #1482

Merged
merged 73 commits into from Jun 8, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+4 鈭2
Diff settings

Always

Just for now

Viewing a subset of changes. View all

split variables so it's more readable

  • Loading branch information...
darcatron committed May 19, 2017
commit df91216e98b8199c16d4f8199472bb56900dda58
@@ -191,7 +191,9 @@ private void updateLongRunningTasksUsage(Map<ResourceUsageType, Number> longRunn
}
private void setMinScore(double totalMemBytesUsed, double totalMemBytesAvailable, double totalCpuUsed, double totalCpuAvailable) {
configuration.setMinOfferScore((((1 - (totalMemBytesUsed / totalMemBytesAvailable)) * configuration.getFreeMemWeightForOffer()) +
((1 - (totalCpuUsed / totalCpuAvailable)) * configuration.getFreeCpuWeightForOffer())) / 3);
double tolerance = 3.00;
double memScore = (1 - (totalMemBytesUsed / totalMemBytesAvailable)) * configuration.getFreeMemWeightForOffer();
double cpuScore = (1 - (totalCpuUsed / totalCpuAvailable)) * configuration.getFreeCpuWeightForOffer();
configuration.setMinOfferScore((memScore + cpuScore) / tolerance);
}
}
ProTip! Use n and p to navigate between commits in a pull request.