apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.5k stars 1.16k forks source link

[New Scheduler] Scheduling Decision Maker Does Not Include Paused Containers In Count #5343

Open bdoyle0182 opened 1 year ago

bdoyle0182 commented 1 year ago

The scheduling decision maker receives QueueSnapshot which passes in existingContainerNumByNamespace value of the ContainerCounter class. However this class only watches for live containers in etcd under the whisk/namespace/${namespace} prefix, but not containers that are marked warmed under whisk/warmed/${namespace} or otherwise known as paused in docker. It's common for action containers to go paused, this can lead to namespace overprovisioning up to double beyond the namespace concurrency limit if a burst of traffic comes when namespace limit is reached and all containers are paused, and suboptimal decision making for over creating containers. @style95

style95 commented 1 year ago

The container manager always chooses warmed containers first to schedule activations. https://github.com/apache/openwhisk/blob/master/core/scheduler/src/main/scala/org/apache/openwhisk/core/scheduler/container/ContainerManager.scala#L158

So there would be no overprovisioning but containers will be more quickly provisioned by them.