标签: linux docker cgroups
考虑一个Linux服务器有四个核心,五个容器(cgroup)中运行着五个CPU密集型进程。所有这些容器都具有相同的配置:cup.cfs_period_us = 1000000和cpu.cfs_quota_us = 1000000和cpu.shares = 1024。那么当内核同时运行时,内核如何将cpu分配给每个容器(进程)?每个容器只有0.8核心cpu(5/4 = 0.8)?
cup.cfs_period_us = 1000000
cpu.cfs_quota_us = 1000000
cpu.shares = 1024