Skip to content

Commit

Permalink
gp4par: Changed congestion metrics for better avoidance of congestion
Browse files Browse the repository at this point in the history
azonenberg committed Jun 24, 2017
1 parent 63f1d1f commit b53f2e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gp4par/Greenpak4PAREngine.cpp
Original file line number Diff line number Diff line change
@@ -200,7 +200,7 @@ uint32_t Greenpak4PAREngine::ComputeCongestionCost() const

//Squaring each half makes minimizing the larger one more important
//vs if we just summed. Also add in a fixed penalty if we are using >100% resources
uint32_t cost = sqrt(costs[0]*costs[0] + costs[1]*costs[1]);
uint32_t cost = costs[0]*costs[0] + costs[1]*costs[1];
if( (costs[0] > 10) || (costs[1] > 10) )
cost += 20;
return cost;

0 comments on commit b53f2e2

Please sign in to comment.