首页 > 数据库 > 国内数据库 > OB中动态修改OBServer 的 CPU 上限步骤
以 2C 的机器为例,不同配置下机器上的 OBServer 的 CPU 上限如下所示:
--连接集群 obclient -h192.168.40.110 -P2881 -uroot@sys -p'61608Hhd820.' -Doceanbase -A --修改前查看参数: scope 列对应的值为 CLUSTER 表示该配置项为集群级别;如果 scope 列对应的值为 TENANT,则表示该配置项为租户级别。 obclient(root@sys)[oceanbase]> show parameters like 'cpu_count'; +-------+----------+----------------+----------+-----------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | default_value | isdefault | +-------+----------+----------------+----------+-----------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ | zone1 | observer | 192.168.40.110 | 2882 | cpu_count | INT | 8 | the number of CPU\'s in the system. If this parameter is set to zero, the number will be set according to sysconf; otherwise, this parameter is used. Range: [0,+∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | 0 | 0 | +-------+----------+----------------+----------+-----------+-----------+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+---------------+-----------+ 1 row in set (0.019 sec) --更改OBServer 自动检测服务器的 CPU 核数 ALTER SYSTEM SET cpu_count=0; SELECT SVR_IP,CPU_CAPACITY FROM GV$OB_SERVERS WHERE SVR_IP='192.168.40.110'; 返回2 --更改OBServer 自定义CPU 核数 为1 ALTER SYSTEM SET cpu_count=1; SELECT SVR_IP,CPU_CAPACITY FROM GV$OB_SERVERS WHERE SVR_IP='192.168.40.110'; 返回1
参数说明:
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69963491/viewspace-3096430/ ,如需转载,请注明出处,否则将追究法律责任。