You can clear control group (cgroup) configurations after you configure the cgroup system directory.
Prerequisites
You have stopped the OBServer node where the cgroup system directory is configured. For more information, see Restart a node.
Procedure
Log in to the server where the OBServer node is located as the
adminuser.Delete the soft link between the installation directory of OceanBase Database and the cgroup system directory.
[admin@xxx /home/admin/oceanbase] $ll cgroup lrwxrwxrwx 1 admin admin 29 Dec 8 11:09 cgroup -> /sys/fs/cgroup/cpu/oceanbase/ [admin@xxx /home/admin/oceanbase] $ rm -rf cgroupDelete the cgroup system directory
/sys/fs/cgroup/cpu/oceanbase.Files in the cgroup system directory must be recursively deleted from a lower-level directory to an upper-level directory. Therefore, you can create a script file named
deletecgroupdir.shto delete the cgroup system directory and its subdirectories.Create a script file, enter related content, and save the script file.
[admin@xxx /home/admin]$ vim deletecgroupdir.shYou must enter the following content in the script file:
#! /bin/bash function read_dir(){ for file in `ls $1` do if [ -d $1"/"$file ] then read_dir $1"/"$file fi done string=$1 echo rmdir $string rmdir $string } # Read the first parameter. read_dir /sys/fs/cgroup/cpu/oceanbaseExecute the script to delete the cgroup system directory.
[admin@xxx /home/admin] $sudo /bin/bash deletecgroupdir.sh