Author Topic: Error detection Module Limit server resources (cgroups) error Invalid argument  (Read 419 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
I am performing tests with Cgroups.
I found out that this module has taken the wrong disk parameters. Specifically the MAJ: MIN part of the drive
Config on CWP:
Code: [Select]
blkio {
             blkio.throttle.read_bps_device = "8:33 20971520";
             blkio.throttle.write_bps_device = "8:33 20971520";
         }
In the case of lscgroup error:

Code: [Select]
Error: failed to set /sys/fs/cgroup/blkio/vanthoi/blkio.throttle.read_bps_device: Invalid argument
Error: failed to set /sys/fs/cgroup/blkio/vanthoi/blkio.throttle.write_bps_device: Invalid argument

After searching on google, I found an error caused by MAJ: MIN.
For example, my / home partition is / dev / sdc1 with MAJ: MIN 8:33

Code: [Select]
cat / proc / partitions | grep sdc
   8 32 262144000 sdc
   8 33 262142976 sdc1

But to limit the read / write speed on the hard disk, you need to use MAJ: MIN of the non-partition drive.

Config manal:
 
Code: [Select]
blkio {
             blkio.throttle.read_bps_device = "8:32 20971520";
             blkio.throttle.write_bps_device = "8:32 20971520";
         }

I then proceeded to correct MAJ: MIN in the configuration so that everything was resolved.

Send developers to fix this module in the next update.
I am running on CentOS Linux release 7.8.2003
Kernel Version: 3.10.0-1127.13.1.el7.x86_64
« Last Edit: June 30, 2020, 04:48:22 PM by vanthoi »

Offline
*****
hi try to remove cgroup then install it again.

Offline
*
I have exactly the same problem.

Offline
*
I have found the problem.

Cgroup/Kernel.org have chage the way to add blkio.throttle.read_bps_device and blkio.throttle.write_bps_device.

Before you add this way

Exampel for /dev/sda2
blkio.throttle.read_bps_device = "8:2 800000";
blkio.throttle.write_bps_device = "8:2 1024000";

The new is this
You add throttle for /dev/sda (the device) and not to the partitions /dev/sda2
blkio.throttle.read_bps_device = "8:0 800000";
blkio.throttle.write_bps_device = "8:0 1024000";

Readme here: https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt

Quick fix is to do the following

Code: [Select]
sed -i 's/8:2/8:0/g' /etc/cgconfig.d/* && systemctl restart cgconfig.service
This you need to do every time you change CGroup.

Offline
*
hi try to remove cgroup then install it again.

Sorry for the late reply.
Recently, I was taking care of my wife, who gave birth to a baby, so I could not answer immediately.

I have done a clean uninstall of Cgroup then reinstalled.
But everything still hasn't changed, the drive limitation still fails.
The installation log does not detect any other errors.
You can set up testing on an esxi virtual machine to test.