【版本】v4.4.2_CE社区版本
【问题】修改OceanBase配置/etc/oceanbase.cnf中的配置参数,并重启服务后,通过客户端工具登录数据库查看参数并未生效
【过程】
- 修改配置(以memory_limit为例,这里我设置了30G)
[root@ism partition_sql]# cat /etc/oceanbase.cnf
# The IP can only be configured during the initial startup.
# By default, the IP is set to the output of hostname -i unless specified otherwise.
# To modify the observer IP after startup, you must uninstall OceanBase and remove the data directory.
# Afterward, you can reinstall and launch OceanBase with the new IP address.
# For instance, to set the observer IP to 127.0.0.1, you would use the line:
# ip=127.0.0.1
mysql_port=13306
rpc_port=2882
obshell_port=2886
root_pwd=xxx
redo_dir=/data/mysql/oceanbase/redo
data_dir=/data/mysql/oceanbase/data
datafile_size=10G
datafile_next=2G
datafile_maxsize=30G
cpu_count=16
memory_limit=30G
system_memory=10G
log_disk_size=2G
enable_syslog_wf=false
enable_syslog_recycle=true
max_syslog_file_count=4
__min_full_resource_pool_memory=1073741824
compaction_high_thread_score=5
compaction_low_thread_score=3
compaction_mid_thread_score=1
ob_sql_work_area_percentage=80
-
重启服务
systemctl restart oceanbase.service -
客户端登录后查看memory_limit还是6G
[root@ism partition_sql]# /usr/bin/obclient -h127.0.0.1 -P13306 -uroot@sys -p’xxx’ -e "
show parameters like ‘%memory_limit%’\G"
*************************** 1. row ***************************
zone: zone1
svr_type: observer
svr_ip: x.x.x.x
svr_port: 2882
name: memory_limit_percentage
data_type: INT
value: 80
info: the size of the memory reserved for internal use(for testing purpose). Range: [10, 95]
section: OBSERVER
scope: CLUSTER
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
default_value: 80
isdefault: 1
*************************** 2. row ***************************
zone: zone1
svr_type: observer
svr_ip: x.x.x.x
svr_port: 2882
name: memory_limit
data_type: CAPACITY
value: 6G
info: the size of the memory reserved for internal use(for testing purpose), 0 means follow memory_limit_percentage. Range: 0, [1G,).
section: OBSERVER
scope: CLUSTER
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
default_value: 0M
isdefault: 0