cp /usr/local/oceanbase-all-in-one/obd/usr/obd/example/all-components.yaml ./vi all-components.yaml
memory_limit 64G observer 总内存(租户内存 + 系统内存)system_memory 30G 系统内存datafile_size 1500G 数据文件大小(启动就会预分配)log_disk_size 日志文件大小(启动就会预分配)
# all-components.yamloceanbase-ce: servers: - name: server1 ip: 127.0.0.1 global: devname: lo memory_limit: 64G # The maximum running memory for an observer system_memory: 30G datafile_size: 1500G # Size of the data file. log_disk_size: 800G # The size of disk space used by the clog files........server1:........ zone: zone1obproxy-ce: depends: - oceanbase-ce servers: - 127.0.0.1 global:......obagent: depends: - oceanbase-ce servers: - name: server1 ip: 127.0.0.1 global: home_path: /data/obagent1ocp-express: depends: - oceanbase-ce - obproxy-ce - obagent servers: - 127.0.0.1 global:.....
支配启动
obd cluster deploy obtest -c all-components.yaml+--------------------------------------------------------------------------------------------+| Packages |+--------------+---------+------------------------+------------------------------------------+| Repository | Version | Release | Md5 |+--------------+---------+------------------------+------------------------------------------+| oceanbase-ce | 4.1.0.0 | 100000192023032010.el7 | 8439ecf8db5e0649bd49671b41ea9e8c85756b63 || obproxy-ce | 4.1.0.0 | 7.el7 | 2a9d9bf67f179dcca2a8c9e7c77373d94e7e2abe || obagent | 1.3.0 | 22.el7 | d57fbb4962b2fbecb6282358c59295fdfba4d6ac || ocp-express | 1.0.0 | 100000432023032015.el7 | 42c6fc921063f24f9e1072d75bfa7f21f42146e3 |+--------------+---------+------------------------+------------------------------------------+------obd cluster start obtest ...+---------------------------------------------+| observer |+-----------+---------+------+-------+--------+| ip | version | port | zone | status |+-----------+---------+------+-------+--------+| 127.0.0.1 | 4.1.0.0 | 4000 | zone1 | ACTIVE |+-----------+---------+------+-------+--------+obclient -h127.0.0.1 -P4000 -uroot -Doceanbase -A+---------------------------------------------+| obproxy |+-----------+------+-----------------+--------+| ip | port | prometheus_port | status |+-----------+------+-----------------+--------+| 127.0.0.1 | 2883 | 2884 | active |+-----------+------+-----------------+--------+obclient -h127.0.0.1 -P2883 -uroot -Doceanbase -A+------------------------------------------------------------------+| obagent |+---------------+--------------------+--------------------+--------+| ip | mgragent_http_port | monagent_http_port | status |+---------------+--------------------+--------------------+--------+| 10.xxxx | 8089 | 8088 | active |+---------------+--------------------+--------------------+--------++------------------------------------------------------------------+| ocp-express |+---------------------------+----------+------------------+--------+| url | username | default_password | status |+---------------------------+----------+------------------+--------+| http://10.xxxx:8180 | admin | oceanbase | active |+---------------------------+----------+------------------+--------+
创建 MySQL 用户
create resource unit ut1 max_cpu 32,memory_size '16G';create resource pool p1 unit 'ut1',unit_num 1;create tenant mysql resource_pool_list=('p1') set ob_tcp_invited_nodes='%';
主要配置
OceanBase
TiDB
MySQL
社区 <br> 版本
v4.1.0
v6.1.5
v5.7.16
内存 <br> 配置
租户 <br>memory_size 16G
block_cache_size 16G
innodb_buffer_pool_size 16G
单机器 <br> 配置
32C RAID10 SSD
32C RAID10 SSD
32C RAID10 SSD
刷盘 <br> 配置
默认逼迫刷盘 <br>(无刷盘干系配置参数)
sync-log=1
sync_binlog=1
并发数
5,10,20,30,60,120
5,10,20,30,60,120
5,10,20,30,60,120
测试 <br> 模式
read_write,read_only,write_only
read_write,read_only,write_only
read_write,read_only,write_only
单次测试 <br> 韶光
300s<br> 共 18 种测试(并发数 x 测试模式)
300s<br> 共 18 种测试(并发数 x 测试模式)
300s<br> 共 18 种测试(并发数 x 测试模式)
每种测试 <br> 方法
obd test sysbench(OBD 自带)<br> 先 prepare、再 run、再 cleanup
sysbench prepare<br>sysbench run<br>sysbench cleanup
sysbench prepare<br>sysbench run<br>sysbench cleanup
架构层级:MySQL 一层架构、OceanBase 二层架构(OBProxy + OBServer)、TiDB 三层架构(TiDB+PD+TiKV);每多一层网络层面的延迟花费会增加。QPS:均匀延迟 OceanBase 表现相对付 MySQL 表现均可以QPS 延迟韶光相对是 MySQL 的 1/3(最低 QPS 也过万,最低均匀延迟 3ms);数据压缩率(表仅 2 数值、2 字符字段)是 MySQL 的 3/5。sysbench 表相对大略和实践生产场景表有一定差异,本次测试作为参考每种测试(每类数据库共 18 种测试)均会天生测试数据(prepare)、跑测试(run)、清理测试数据(cleanup)QPS 表现延迟表现
存储压缩
MySQL:数据 test 库物理空间占用 69G
mysql> select count() from sbtest10;+----------+| count() |+----------+| 30000000 |+----------+1 row in set (4.62 sec)
TiDB:数据 test 库物理空间占用 39G
mysql> select count() from sbtest10;+----------+count() |+----------+30000000 |+----------+1 row in set (0.00 sec)
OceanBase:数据 test 库物理空间占用 43G。预分配机制,启动便是占用 1.2T 空间(实际详细库物理空间通过 OB 节点资源花费查询)。
mysql> select count() from sbtest1;+----------+| count() |+----------+| 30000000 |+----------+1 row in set (0.00 sec)
binlog 兼容迁移做事 OMS 能通过 OMS 同步数据变更至下贱 Kafka;能兼容 MySQL binlog 协议同步下贱 Kafka 很友好(我们这类场景多 MySQL->Kafka->Hive);暂未有类似 MySQL binlog 原始文件功能,听说爱可生近期发布基于 OceanBase 的商业发行版 ActionDB 对付此功能正在方案中,十分期待。
集群办法目前暂对数据存储压缩率办法做了测试(生产监控场景 MySQL 迁移至 OceanBase),后续还会比拟监控场景 MySQL 中各种型报表查询 SQL 在 OceanBase 的表现。
机器资源节点类型
集群办法
中控管理节点
10.xxx<br>16C 64G /data 3.7T
数据节点
10.xxx<br>32C 50G /data3 15T
数据节点
10.xxx<br>32C 50G /data3 15T
数据节点
10.xxx<br>32C 50G /data3 15T
OCP 管理组件嵌入到了 OBD 集群的支配流程中,机器干系初始化参考官方文档。
支配准备在线支配准备yum install -y yum-utilsyum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repoyum install -y ob-deploy source /etc/profile.d/obd.sh
离线支配准备
在 https://www.oceanbase.com/softwarecenter 下载 all-in-one 包。
tar -xzf oceanbase-all-in-one-.tar.gzcd oceanbase-all-in-one/bin/./install.shsource ~/.oceanbase-all-in-one/bin/env.sh
白屏支配
obd web -p 80
推举白屏办法支配,可视化直不雅观,有各种检讨项。
预检讨阶段会做全面 check。
obd cluster display oceanbase41Get local repositories and plugins okOpen ssh connection okCluster status check okConnect to observer okWait for observer init ok+-------------------------------------------------+| observer |+---------------+---------+------+-------+--------+| ip | version | port | zone | status |+---------------+---------+------+-------+--------+| 10.xxxx.208 | 4.1.0.0 | 5000 | zone2 | ACTIVE || 10.xxxx.209 | 4.1.0.0 | 5000 | zone1 | ACTIVE || 10.xxxx.210 | 4.1.0.0 | 5000 | zone3 | ACTIVE |+---------------+---------+------+-------+--------+obclient -h10.xxxx.208 -P5000 -uroot -p'xxxx' -Doceanbase -AConnect to obproxy ok+-------------------------------------------------+| obproxy |+---------------+------+-----------------+--------+| ip | port | prometheus_port | status |+---------------+------+-----------------+--------+| 10.xxxx.209 | 2883 | 2884 | active || 10.xxxx.208 | 2883 | 2884 | active || 10.xxxx.210 | 2883 | 2884 | active |+---------------+------+-----------------+--------+obclient -h10.xxxx.209 -P2883 -uroot -p'xxxx' -Doceanbase -AConnect to Obagent ok+------------------------------------------------------------------+| obagent |+---------------+--------------------+--------------------+--------+| ip | mgragent_http_port | monagent_http_port | status |+---------------+--------------------+--------------------+--------+| 10.xxxx.209 | 8089 | 8088 | active || 10.xxxx.208 | 8089 | 8088 | active || 10.xxxx.210 | 8089 | 8088 | active |+---------------+--------------------+--------------------+--------+Connect to ocp-express ok+------------------------------------------------------------------+| ocp-express |+---------------------------+----------+------------------+--------+| url | username | default_password | status |+---------------------------+----------+------------------+--------+| http://10.xxxx.209:8180 | admin | oceanbase | active |+---------------------------+----------+------------------+--------+Trace ID: c3049c64-efa3-11ed-bf3a-525400b51421
创建 OCP 管理平台域名 Nginx 转发
办公环境仅能访问生产 80 端口,DNS 域名 ->nginx 80->10.xxxx.209:8180(OCP 管理平台) http://ob-ocp-xxxx.db.dmall.com/
cat oceanbase-ocp.conf server { listen 80; server_name ob-ocp-gz01.db.dmall.com; location / { proxy_pass http://10.xxxx.209:8180; index index.html index.htm index.jsp; } }
创建 MySQL 租户
命令行中创建租户存在 timeout 缺点,登录时失落败(和官方职员沟通后在 OCP 平台创建租户正常成功,推测命令行创建租户 memory_size 过大,OCP 中创建限定为 10G)。
# 创建资源单元create resource unit ut1 max_cpu 30, memory_size '16G';# 创建资源池create resource pool p1 unit 'ut1',unit_num 1,ZONE_LIST ('zone1', 'zone2' ,'zone3');# 创建租户select now(); create tenant if not exists mysql CHARSET='utf8mb4', ZONE_LIST=('zone1','zone2','zone3'), PRIMARY_ZONE='zone1,zone2,zone3',resource_pool_list=('p1') set ob_tcp_invited_nodes='%';select now();ERROR 4012 (HY000): Timeout# MySQL 租户登录obclient -h127.0.0.1 -P5000 -uroot@mysql -Doceanbase -Amysql: [Warning] Using a password on the command line interface can be insecure.ERROR 4725 (HY000): tablet does not exist
创建分区表示例
OceanBase 分布式分片基于分区表实现,大表必须创建分区。
CREATE TABLE `snapshot_innodb_status_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `stat_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), ...... PRIMARY KEY (`id`,stat_time), KEY `idx_port` (`port`), KEY `idx_ip` (`ip`), KEY `idx_stat_time` (`stat_time`)) partition by range (year(stat_time)100+month(stat_time)) (PARTITION p0 VALUES LESS THAN(202201),PARTITION p1 VALUES LESS THAN(202203),PARTITION p2 VALUES LESS THAN(202205),PARTITION p3 VALUES LESS THAN(202207),PARTITION p4 VALUES LESS THAN(202209),PARTITION p5 VALUES LESS THAN(202211),PARTITION p6 VALUES LESS THAN(202301),PARTITION p7 VALUES LESS THAN(202303),PARTITION p8 VALUES LESS THAN(202305),PARTITION p9 VALUES LESS THAN(202307),PARTITION p10 VALUES LESS THAN(202309),PARTITION p11 VALUES LESS THAN(202311),PARTITION p12 VALUES LESS THAN MAXVALUE);CREATE TABLE `redis_app_minute_command_statistics` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', `app_id` int(11) NOT NULL COMMENT '运用id', `collect_time` datetime NOT NULL, ......... PRIMARY KEY (`id`,collect_time), UNIQUE KEY `app_id` (`app_id`,`collect_time`,`command_name`), KEY `idx_create_time` (`create_time`), KEY `idx_collect_time_app_id_command_name` (`collect_time`,`app_id`,`command_name`)) ENGINE=InnoDB partition by range (year(collect_time)100+month(collect_time)) (PARTITION p0 VALUES LESS THAN(202201),PARTITION p1 VALUES LESS THAN(202203),PARTITION p2 VALUES LESS THAN(202205),PARTITION p3 VALUES LESS THAN(202207),PARTITION p4 VALUES LESS THAN(202209),PARTITION p5 VALUES LESS THAN(202211),PARTITION p6 VALUES LESS THAN(202301),PARTITION p7 VALUES LESS THAN(202303),PARTITION p8 VALUES LESS THAN(202305),PARTITION p9 VALUES LESS THAN(202307),PARTITION p10 VALUES LESS THAN(202309),PARTITION p11 VALUES LESS THAN(202311),PARTITION p12 VALUES LESS THAN MAXVALUE);
把稳:OceanBase 数据库社区版暂不支持 utf8mb4_unicode_ci 和 utf16_unicode_ci,主键(多列)和唯一索引(多列)必须包含分区键。否则创建分区表报错:
ERROR 1503 (HY000): A UNIQUE INDEX must include all columns in the table's partitioning functionERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function
韶光分区键必须是 datetime,不能是 timestamp,否则报错。
ERROR 1486 (HY000): Constant or random or timezone-dependent expressions in (sub)partitioning function are not allowed
更多分区表 的利用建议。
DRC 同步 MySQL 至 OceanBase我们 DRC 自研同步工具支持 MySQL->OceanBase(DRC 还能支持 MySQL->MySQL,MySQL->TiDB),官方 OMS 迁移工具安装管理者工具 OAT。内部 MySQL 监控快照库空间 660G(单副本) 迁移至 OceanBase 单副本空间 110G,压缩率约为 1/6。
MySQL 单副本:
OceanBase 单副本:
MySQL->OceanBase 数据大略同等校验:
MySQL 采取 show table status;,OceanBase 查询 information_schema.tables(show table status 中无 rows 信息,也和官方职员确认过)。
实践中因有 2 张上百 G 大表在 DRC 工具全量期间目标 OB 时常有非常报错,2 张上百 G 大表全量采取 mydumper + myloader 手动备份还原至 OceanBase,DRC 工具增量同步。
DRC 同步期间存在 OceanBase 目标端涌现缺点问题:目标端实行 SQL 涌现缺点。
!io.ReadFull(header) failed. err EOF: connection was bad,Table [redis_monitor_data_min -> redis_monitor_data_min]
因 DRC 同步大表时频繁涌现以上缺点,大表改为 mydumper 多线程逻辑备份还原也偶尔涌现非常。
# myloader 多线程还原涌现非常缺点 CRITICAL : 10:45:12.333: Error switching to database xxx whilst restoring table xxxx_data_min (myloader:118422): CRITICAL : 10:46:42.195: Error restoring xxx.xxxx_status_log from file xxx.xxxx_status_log.00006.sql.gz: Lost connection to MySQL server during query
增大租户内存和减小转储比例后 myloader 多线程还原没有涌现非常缺点。
旧配置
新配置
freeze_trigger_percentage 70%
freeze_trigger_percentage 30%
租户 memory_size 10G
租户 memory_size 15G
关键配置把稳:
datafile_size 不支持缩小(支持增大,需 reload 重启集群),配置后就会预分配(datafile_disk_percentage 默认 95%)占用空间
ll -h /data/oceanbases1/sstable/block_file -rw-r--r-- 1 root root 1.5T May 4 16:35 /data/oceanbases1/sstable/block_file[oceanbase-ce] server1(127.0.0.1): DO NOT decrease datafile_size after startup
memory_limitOBServer 的最大可利用内存数。由于最低内存配置为 64 GB,预留部分给系统利用,则建议 OBServer 独占 58 GB,即系统租户内存与程序内存共 58 GBsystem_memory系统预留给租户 ID 为 500 的租户的内存容量obclient> ALTER SYSTEM SET system_memory='xxG';rootservice_memory_limitRoot Service 的最大内存容量限定obclient> ALTER SYSTEM SET rootservice_memory_limit='2G';ob_query_timeoutSQL 最大实行韶光,单位是微秒。超时会报错ERROR 4012 (HY000): Timeout, query has reached the maximum query timeout: 10000000(us), maybe you can adjust the session variable ob_query_timeout or query_timeout hint, and try again.常用命令手动网络信息
CALL dbms_stats.gather_table_stats('test', 'sbtest1', granularity=>'GLOBAL', method_opt=>'FOR ALL COLUMNS SIZE 128');# 利用 Oracle 模式语法ALTER SYSTEM SET ENABLE_SQL_EXTENSION = TRUE;ANALYZE TABLE sbtest1 COMPUTE STATISTICS FOR ALL COLUMNS SIZE 128;
更多手动网络统计信息 的利用建议。
租户资源的创建创建资源配置obclient> CREATE RESOURCE UNIT uc1 MAX_CPU 5, MIN_CPU 4, MEMORY_SIZE '36G', MAX_IOPS 128000, MIN_IOPS 128000, LOG_DISK_SIZE '2T' ;
必选配置项MAX_CPUMEMORY_SIZEMIN_CPU 默认即是 MAX_CPUMIN_IOPS 默认即是 MAX_IOPSLOG_DISK_SIZE 默认即是 3 倍的内存大小,最小为 2GMIN_IOPS 和 MAX_IOPS 的值根据 MIN_CPU 规格自动打算,1 个 Core 对应 1 万 IOPS 值,即 MAX_IOPS = MIN_IOPS = MIN_CPU 10000创建资源池
obclient> CREATE RESOURCE POOL rp1 UNIT 'uc1', UNIT_NUM 2, ZONE_LIST ('zone1', 'zone2');
UNIT 'uc1' 表示为该资源池指定的资源配置为 uc1,该资源池下的每个资源单元利用 uc1 的规格进行配置;ZONE_LIST ('zone1','zone2') 是为资源池指定的利用范围,表示该资源池要在 zone1 和 zone2 上创建资源单元;UNIT_NUM 2 是为资源池指定资源单元的个数,表示在 ZONE_LIST 内的每个 Zone 上都创建 2 个资源单元。创建租户
obclient> CREATE RESOURCE POOL pool1 UNIT 'uc1', UNIT_NUM 2, ZONE_LIST ('z1', 'z2');obclient>CREATE RESOURCE POOL pool2 UNIT 'uc1', UNIT_NUM 1, ZONE_LIST ('z3');obclient>CREATE TENANT tt resource_pool_list=('pool1','pool2');
tt 租户下有 2 个资源池。
删除租户Drop tenant mysql force ;Drop resource pool p1;Drop RESOURCE UNIT ut1;
查看租户资源配置
SELECT t1.name resource_pool_name, t2.`name` unit_config_name, t2.max_cpu, t2.min_cpu, t2.memory_size/1024/1024/1024 memory_size, t3.unit_id, t3.zone, concat(t3.svr_ip,':',t3.`svr_port`) observer, t4.tenant_id, t4.tenant_nameFROM __all_resource_pool t1JOIN __all_unit_config t2 ON (t1.unit_config_id=t2.unit_config_id)JOIN __all_unit t3 ON (t1.`resource_pool_id` = t3.`resource_pool_id`)LEFT JOIN __all_tenant t4 ON (t1.tenant_id=t4.tenant_id)ORDER BY t1.`resource_pool_id`, t2.`unit_config_id`, t3.unit_id ;+--------------------+------------------+---------+---------+-----------------+---------+-------+----------------+-----------+-------------+| resource_pool_name | unit_config_name | max_cpu | min_cpu | memory_size | unit_id | zone | observer | tenant_id | tenant_name |+--------------------+------------------+---------+---------+-----------------+---------+-------+----------------+-----------+-------------+| sys_pool | sys_unit_config | 1 | 1 | 8.500000000000 | 1 | zone1 | 127.0.0.1:2882 | 1 | sys || p1 | ut1 | 32 | 32 | 16.000000000000 | 1001 | zone1 | 127.0.0.1:2882 | 1002 | mysql |+--------------------+------------------+---------+---------+-----------------+---------+-------+----------------+-----------+-------------+
查看单元配置
select name, max_cpu, round(memory_size / 1024 / 1024 / 1024, 2) 'memory_size_GB'from __all_unit_config;+-----------------+---------+----------------+| name | max_cpu | memory_size_GB |+-----------------+---------+----------------+| sys_unit_config | 1 | 8.50 || ut1 | 32 | 16.00 |+-----------------+---------+----------------+
查看各 OBServer 剩余资源单元
select svr_ip, svr_port, zone, round((cpu_capacity_max - cpu_assigned_max), 2) 'cpu_free_num', cpu_capacity_max 'cpu_total_num', round((mem_capacity - mem_assigned) / 1024 / 1024 / 1024, 2) 'mem_free_GB', round(memory_limit / 1024 / 1024 / 1024, 2) 'mem_total_GB', round(DATA_DISK_IN_USE / 1024 / 1024 / 1024, 2) as data_used_GB, round(DATA_DISK_CAPACITY / 1024 / 1024 / 1024, 2) as data_total_GB, round(LOG_DISK_CAPACITY / 1024 / 1024 / 1024, 2) as log_total_GB, round(LOG_DISK_IN_USE / 1024 / 1024 / 1024, 2) as log_used_GBfrom gv$ob_servers;+-----------+----------+-------+--------------+---------------+-------------+--------------+--------------+---------------+--------------+-------------+| svr_ip | svr_port | zone | cpu_free_num | cpu_total_num | mem_free_GB | mem_total_GB | data_used_GB | data_total_GB | log_total_GB | log_used_GB |+-----------+----------+-------+--------------+---------------+-------------+--------------+--------------+---------------+--------------+-------------+| 127.0.0.1 | 2882 | zone1 | 7.00 | 40 | 9.50 | 64.00 | 192.00 | 192.00 | 192.00 | 40.69 |+-----------+----------+-------+--------------+---------------+-------------+--------------+--------------+---------------+--------------+-------------+
查看所有 OBServer 节点
select zone,svr_ip,svr_port,inner_port,with_rootserver,status,gmt_create from __all_server order by zone, svr_ip;
查看当前租户
show Tenant ;+---------------------+| Current_tenant_name |+---------------------+| mysql |+---------------------+1 row in set (0.002 sec)
修正资源池
obclient> CREATE RESOURCE UNIT uc1 MAX_CPU 5, MIN_CPU 4, MEMORY_SIZE '32G', MMAX_IOPS 128000, MIN_IOPS 128000, LOG_DISK_SIZE '2T';obclient> CREATE RESOURCE POOL pool1 UNIT 'uc1', UNIT_NUM 2, ZONE_LIST ('z1', 'z2');obclient> CREATE RESOURCE POOL pool2 UNIT 'uc1', UNIT_NUM 1, ZONE_LIST ('z3');obclient> CREATE TENANT tt resource_pool_list=('pool1','pool2');obclient> ALTER RESOURCE UNIT uc1 MAX_CPU 6, MEMORY_SIZE '36G';ALTER RESOURCE UNIT config_mysql_zone1_20C10G_vcq MEMORY_SIZE='12G';# 支持的在线扩容资源单元ALTER RESOURCE UNIT unit_name MEMORY_SIZE [=] 'size_value',MAX_CPU [=] cpu_num, [MIN_CPU [=] cpu_num,][MAX_IOPS [=] iops_num,][MIN_IOPS [=] iops_num,] [LOG_DISK_SIZE [=] 'size_value']; # 调大 OceanBase 集群磁盘最大空间百分比(默认预分配data_size的95%)ALTER system SET datafile_disk_percentage = 98;# 调大 OceanBase 用户租户内存最大内存百分比(默认mem_size的50%) alter system set memstore_limit_percentage =70; # 提高转储速率alter system set freeze_trigger_percentage=30;
更多管理资源池的利用建议。
限定OceanBase 社区版暂不支持字符序 utf8mb4_general_ci。 更多关于 OceanBase 与 MySQL 的兼容性。OceanBase 创建 user 只支持明文办法,密文办法(identified as xxx)不支持。支持 CREATE USER 'dmall_xxxx'@'10.%.%.%' identified by 'xxx';若超过磁盘限额配置写入会报错(除了机器磁盘空间报警外还需对 OBServer data 空间利用率做报警)。error, errno = 4184, state = '53100': Server out of disk space处理办法为扩容资源单元或者 edit-config 修正 datafile_size: 后 reload 集群重启生效。若超过内存限额配置写入会报错(高 TPS 场景下 OceanBase 很花费内存)。SQL error, errno = 4013, state = 'HY001': No memory or reach tenant memory limit处理办法为扩容资源单元、开启写入限速以及调度转储阈值(调高转储线程数,加快转储,让内存尽快开释)。更多参考租户内存写满。
总结OceanBase 在 QPS、读写延迟、存储压缩方面均不错(生产 MySQL 一监控场景库空间:OceanBase 空间为 6:1 单副本,660G:110G 单副本);高 TPS 场景可以适当调度租户内存利用参数、转储参数;OceanBase 不同租户资源隔离(IOPS,内存,CPU)更好适配多业务场景;OBD 白屏支配办法更加高效、直不雅观,OCP 管理平台功能全面;业务运用方利用 OceanBase 比 MySQL 有点差异(大表创建分区表,用户名需带租户名等)。关于 SQLE爱可生开源社区的 SQLE 是一款面向数据库利用者和管理者,支持多场景审核,支持标准化上线流程,原生支持 MySQL 审核且数据库类型可扩展的 SQL 审查对象。
SQLE 获取类型
地址
版本库
https://github.com/actiontech/sqle
文档
https://actiontech.github.io/sqle-docs/
发布信息
https://github.com/actiontech/sqle/releases
数据审核插件开拓文档
https://actiontech.github.io/sqle-docs-cn/3.modules/3.7_auditplugin/auditplugin_development.html