• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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