GBase 8a
安装配置
文章

gbase8a中的资源管理

发表于2025-06-14 07:22:1118次浏览4个评论

gbase8a中的常用配置方式:
每个点要root下环境变量
  ./SetSysEnv.py --dbaUser=gbase --installPrefix=/opt  --cgroup
 
               cgroup参数目的是初始化cgroup配置文件
                          [gbase@gbase-V9-191 ~]$ cat /etc/cgconfig.conf 
                        #
                        #  Copyright IBM Corporation. 2007
                        #
                        #  Authors:     Balbir Singh <balbir@linux.vnet.ibm.com>
                        #  This program is free software; you can redistribute it and/or modify it
                        #  under the terms of version 2.1 of the GNU Lesser General Public License
                        #  as published by the Free Software Foundation.
                        #
                        #  This program is distributed in the hope that it would be useful, but
                        #  WITHOUT ANY WARRANTY; without even the implied warranty of
                        #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
                        #
                        # See man cgconfig.conf for further details.
                        #
                        # By default, mount all controllers to /cgroup/<controller>


                        mount {
                                cpu     = /cgroup/cpu;
                                cpuacct = /cgroup/cpuacct;
                                blkio   = /cgroup/blkio;
                                }

                        group gbase {
                                perm{
                                    task{
                                        uid = gbase;
                                        gid = gbase;
                                        }   
                                    admin{
                                        uid = gbase;
                                        gid = gbase;
                                        }   
                                    }
                                cpu{
                                    }
                                cpuacct{
                                    }
                                blkio{
                                    }   
                                }
              
另外:手动配置cgroup,可以参考如下步骤
 
 1)systemctl stop cgconfig.service
 
 2)查看挂载情况
 lssubsys -am
 
 [root@gbase-V9-191 ~]# lssubsys -am
    cpuset /sys/fs/cgroup/cpuset
    cpu,cpuacct /sys/fs/cgroup/cpu,cpuacct
    memory /sys/fs/cgroup/memory
    devices /sys/fs/cgroup/devices
    freezer /sys/fs/cgroup/freezer
    net_cls,net_prio /sys/fs/cgroup/net_cls,net_prio
    blkio /sys/fs/cgroup/blkio
    perf_event /sys/fs/cgroup/perf_event
    hugetlb /sys/fs/cgroup/hugetlb
    pids /sys/fs/cgroup/pids
 
 3)清除默认挂载信息  
 cgclear

 4)systemctl start cgconfig.service
 
 5)再次查看
 [root@gbase-V9-191 ~]# lssubsys -am
    cpuset
    memory
    devices
    freezer
    net_cls
    perf_event
    hugetlb
    pids
    net_prio
    cpu /cgroup/cpu
    cpuacct /cgroup/cpuacct
    blkio /cgroup/blkio

评论

登录后才可以发表评论
用户头像
levvel发表于 7个月前
来报个到
用户头像
levvel发表于 4个月前
干货满满!
用户头像
levvel发表于 2个月前
就是看看,顺便踩个脚印
菲菲发表于 2个月前
加油