• 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

Resolved Enabling CPU Limit in Subscription Plans with PLESK on CENTOS 7 Server with Cgroups

AnibalB

New Pleskian
Server operating system version
CentOS Linux 7.9.2009 (Core)
Plesk version and microupdate number
18.0.58
Hello, I have a dedicated CENTOS 7 server with a PLESK license which includes a Resource Controller (cgroups). However, I can only control the limits of RAM and Disk, I cannot limit CPU in subscription plans, as it appears in the documentation, I need to know how I can enable the CPU limit option.

Regards
 
Furthermore, if I use PLESK CLI through the command terminal, the following appears to me:

Code:
plesk bin service_plan -u "Básico" -cgroups_cpu_usage 50
Unrecognized option: 'cgroups_cpu_usage'


exit status 1
 
Could you please show the output of
plesk db "select value from ServiceNodeEnvironment where section = 'resourceController' and name = 'features'"
and
plesk db "select * from ServiceNodeConfiguration where section = 'resourceController' and name = 'enabled'"
?
 
Could you please show the output of
plesk db "select value from ServiceNodeEnvironment where section = 'resourceController' and name = 'features'"
and
plesk db "select * from ServiceNodeConfiguration where section = 'resourceController' and name = 'enabled'"
?
Code:
plesk db "select value from ServiceNodeEnvironment where section = 'resourceController' and name = 'features'"
| value                                                                                 |
+---------------------------------------------------------------------------------------+
| {"cpu": false, "cpuacct": true, "memory": true, "blkio": true, "vhosts_blkio": true} |
+---------------------------------------------------------------------------------------+
Code:
plesk db "select * from ServiceNodeConfiguration where section = 'resourceController' and name = 'enabled'"

+---------------+--------------------+---------+-------+
| serviceNodeId | section            | name    | value |
+---------------+--------------------+---------+-------+
|             1 | resourceController | enabled | 1     |
+---------------+--------------------+---------+-------+
 
The entries are correct, but you can see that "cpu" is set to "false". It should be "true" to enable cpu accounting. I could not find out why this could be set to "false". Personally I think it should be safe to set it to "true" and see what happens. However, if the server is in production already, it might be better to open a support ticket on the question whether the setting can be changed without risk, because support can ask engineers on the details. In a default installation the setting is "true". Maybe you got your Plesk image from your provider and he set it to "false"?
 
The entries are correct, but you can see that "cpu" is set to "false". It should be "true" to enable cpu accounting. I could not find out why this could be set to "false". Personally I think it should be safe to set it to "true" and see what happens. However, if the server is in production already, it might be better to open a support ticket on the question whether the setting can be changed without risk, because support can ask engineers on the details. In a default installation the setting is "true". Maybe you got your Plesk image from your provider and he set it to "false"?
I manually changed that variable to ‘true,’ and now the CPU limitation settings are visible. However, if I uninstall the cgroup component using Plesk’s autoinstaller and then reinstall it, the CPU limitation settings become hidden and deactivated again. I use the official Plesk update server as the source for updates.

Any idea what might be causing this?
 
Any idea what might be causing this?
A team member more knowledgeable in this matter than me suggests that it could be the kernel that does not support cgroups. Plesk detects that, hence disables the option. What's the output of "uname -r" on your system?
 
A team member more knowledgeable in this matter than me suggests that it could be the kernel that does not support cgroups. Plesk detects that, hence disables the option. What's the output of "uname -r" on your system?
4.19-ovh-xxxx-std-ipv6-64
 
So obviously the server has an individually configured kernel. Unfortunately, only OVH will be able to tell you what their kernel does different, but I assume that indeed the cpu cgroups functionality is absent.
 
Back
Top