我试图在Centos 7中为每个用户设置资源限制,但我找不到用于cgroup新实现的正确命令(我确实读过文献资料,但它谈到了限制服务而不是用户)。
以下是Centos 6中的步骤
/etc/cgconfig.conf group mygroup{ cpu { cpu.shares = 200; } memory { memory.limit_in_bytes = 128m; } }service cgconfig restartchkconfig cgconfig onlscgroup/etc/cgrules.conf myuser cpu,memory mygroup/service cgred startchkconfig cgred on。在Centos 7中,什么是等价的?
发布于 2016-01-19 12:21:45
我得到了一个服务器故障中的解决方案
systemctl set-property user-1000.slice CPUShares=100https://unix.stackexchange.com/questions/249770
复制相似问题