bdoyle0182 commented on code in PR #5344:
URL: https://github.com/apache/openwhisk/pull/5344#discussion_r1007084325
##########
core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/queue/SchedulingDecisionMaker.scala:
##########
@@ -139,9 +139,9 @@ class SchedulingDecisionMaker(
case (Running, Some(duration)) if staleActivationNum > 0 =>
// we can safely get the value as we already checked the existence
val containerThroughput = staleThreshold / duration
- val num = ceiling(availableMsg.toDouble / containerThroughput)
+ val num = ceiling(staleActivationNum.toDouble /
containerThroughput)
// if it tries to create more containers than existing messages,
we just create shortage
- val actualNum = (if (num > availableMsg) availableMsg else num) -
inProgress
+ val actualNum = (if (num > staleActivationNum) staleActivationNum
else num) - inProgress
Review Comment:
I think the code in my comment above covers this. I just pushed it so it's
the code in the pr now. In the same decision interval, it will both make the
calculation for additional containers needed for activations that are stale and
increase containers based on # of available messages to meet the needed
transactions per second. I think this is the most optimal case.
--
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]