Docker Community Forums

Share and learn in the Docker community.

Cpu_shares and docker swarm - assigning less than 1 CPU for a service

Hi,
I’m trying to use the docker swarm, together with docker-compose (so old school orchestration with HAProxy/Consul). When using the swarm, the cpu_shares parameter gives you the number of cores not the cpu_shares as per CGroup understanding and is limited to only integers. So each container hosting a service needs to have at least 1 core assigned. When we are talking about over 10 services implemented and multiple instances the hardware resources needed, start to look pretty hardcore. Is there any workaround for limiting the CPU usage with swarm and having them use less than 1 core?