Docker Community Forums

Share and learn in the Docker community.

Can there be a "least utilized node" strategy that factors utilization?


(Mike503) #1

“Emptiest node” only cares about the count of containers, it says. Not the distribution based on average/current resource utilization, or based on CPU/memory reservation (at least, not that I can find in documentation… and it’s getting a bit difficult to test the theory out myself on that one)

I would really like to have another scheduling type added that actually factors in usage or reservations. If it works like AWS ECS, at least the CPU shares would make it so the container cannot find a usable node (and I expect Docker Cloud does do the same thing… haven’t tested it yet) It would also be nice if memory “reservations” could be included as well. There’s a “memory limit” but it would be nice if there was some way to have “memory reservation”

Either way, even with CPU share reservations and even if memory reservations became a thing, there’s still a chance of uneven distribution, and it would be nice to have the equivalent of a “weighted least utilized” strategy. Thanks.

From the documentation[1] (note the typo “tipically” :))

This is the default strategy. A service with a EMPTIEST_NODE strategy will deploy its containers to the nodes that match its deploy tags with the lowest total number of containers at the time of each container’s deployment, regardless of the service. This strategy tipically balances the total load of all services across all nodes.

  1. https://docs.docker.com/docker-cloud/feature-reference/deployment-strategies/