gbase8a中的资源管理
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
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25044
- 42023-09-25浏览数:18519
- 52020-05-11浏览数:17526