• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Resource usage limitations

j00m

New Pleskian
I'm trying to set resource usage limits for service plans and noticed that CPU settings are not available but RAM and disk I/O settings are.

Server is running CentOS 7.3 and for some reason cpu controller is not supported.
Any ideas how to get it enabled?

Code:
# plesk sbin resctrl --features
{"cpu": false, "cpuacct": true, "memory": true, "blkio": true, "vhosts_blkio": true}


However, cpu cgroup seems to be defined in kernel

Code:
# column -t /proc/cgroups
#subsys_name  hierarchy  num_cgroups  enabled
cpuset        3          1            1
cpu           4          68           1
cpuacct       4          68           1
memory        9          68           1
devices       5          68           1
freezer       8          1            1
net_cls       7          1            1
blkio         6          68           1
net_prio      7          1            1
 
Is it VPS or physical server? Note that Control Groups are supported in Plesk on Virtuozzo 6 and Virtuozzo 7. Plesk on Virtuozzo 7 supports all the limits, Plesk on Virtuozzo 6 supports only the limit on RAM usage.
Depending on your operating system, not all the described limits might be available. If kernel was updeted for CentOS 7.3, there may be some kind of changes related to "cpu" feature.
 
It is a physical server. I have also tested with CentOS 7.2 and CPU limit was not enabled on that either.
 
Maybe you have custom kernel? Not from OS vendor? For correct 'cpu' feature operation it should be compiled with CONFIG_FAIR_GROUP_SCHED option and kernel scheduler should be CFQ.
Make sure that you have files:

/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us
/sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us
/sys/fs/cgroup/cpu,cpuacct/cpu.stat
 
I checked the kernel and it was indeed customised. It was compiled with CONFIG_FAIR_GROUP_SCHED option and after adding CONFIG_CFS_BANDWIDTH CPU-settings appeared in UI. However, kernel scheduler defaults to deadline as the server has SSD disks so does the cgroups still work as expected if I stick with deadline scheduler?
 
Back
Top