obloader导入数据时报Over tenant memory limits

【 使用环境 】生产环境
【 OB MySQL模式】
【4.2.5】
【问题描述】使用obloader将生产数据导入灾备库时报Over tenant memory limits,修改memory_size、ob_sql_work_area_percentage后均无法解决,使用的Obloader参数是–all --ddl --csv --skip-header --truncate-table

租户啥配置?导入的数据量有多大,看着就是内存不够。

SHOW VARIABLES like ‘version_comment’; ob的版本信息查看一下
信息查看一下
show parameters where name in (‘memory_limit’,‘memory_limit_percentage’,‘system_memory’,‘log_disk_size’,‘log_disk_percentage’,‘datafile_size’,‘datafile_disk_percentage’) \G;

select a.zone,a.svr_ip,b.tenant_name,b.tenant_type, a.max_cpu, a.min_cpu,
round(a.memory_size/1024/1024/1024,2) memory_size_gb,
round(a.log_disk_size/1024/1024/1024,2) log_disk_size,
round(a.log_disk_in_use/1024/1024/1024,2) log_disk_in_use,
round(a.data_disk_in_use/1024/1024/1024,2) data_disk_in_use
from oceanbase.gv$ob_units a join oceanbase.dba_ob_tenants b on a.tenant_id=b.tenant_id order by b.tenant_name;

总数据量270G,memory_size 64G,ob_sql_work_area_percentage 30%,有两个数千万的表,使用–insert-batch-size 500和–commit-each-batch true又提示参数不存在

1 个赞

obclient(root@sys)[oceanbase]> select a.zone,a.svr_ip,b.tenant_name,b.tenant_type, a.max_cpu, a.min_cpu, round(a.memory_size/1024/1024/1024,2) memory_size_gb, round(a.log_disk_size/1024/1024/1024,2) log_disk_size, round(a.log_disk_in_use/1024/1024/1024,2) log_disk_in_use, round(a.data_disk_in_use/1024/1024/1024,2) data_disk_in_use from oceanbase.gv$ob_units a join oceanbase.dba_ob_tenants b on a.tenant_id=b.tenant_id order by b.tenant_name;
±------±------------±------------±------------±--------±--------±---------------±--------------±----------------±-----------------+
| zone | svr_ip | tenant_name | tenant_type | max_cpu | min_cpu | memory_size_gb | log_disk_size | log_disk_in_use | data_disk_in_use |
±------±------------±------------±------------±--------±--------±---------------±--------------±----------------±-----------------+
| zone1 | 10.5.34.106 | META$1002 | META | NULL | NULL | 6.40 | 6.40 | 5.11 | 0.18 |
| zone1 | 10.5.34.106 | sys | SYS | 4 | 4 | 1.00 | 3.00 | 2.37 | 0.16 |
| zone1 | 10.5.34.106 | zygenus01 | USER | 32 | 32 | 57.60 | 57.60 | 46.06 | 99.40 |
±------±------------±------------±------------±--------±--------±---------------±--------------±----------------±-----------------+
3 rows in set (0.019 sec)

obclient(root@sys)[oceanbase]> show parameters where name in (‘memory_limit’,‘memory_limit_percentage’,‘system_memory’,‘log_disk_size’,‘log_disk_percentage’,‘datafile_size’,‘datafile_disk_percentage’) \G;
*************************** 1. row ***************************
zone: zone1
svr_type: observer
svr_ip: 10.5.34.106
svr_port: 2882
name: log_disk_percentage
data_type: NULL
value: 0
info: the percentage of disk space used by the log files. Range: [0,99] in integer;only effective when parameter log_disk_size is 0;when log_disk_percentage is 0: a) if the data and the log are on the same disk, means log_disk_percentage = 30 b) if the data and the log are on the different disks, means log_disk_perecentage = 90
section: LOGSERVICE
scope: CLUSTER
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
default_value: 0
isdefault: 1
*************************** 2. row ***************************
zone: zone1
svr_type: observer
svr_ip: 10.5.34.106
svr_port: 2882
name: log_disk_size
data_type: NULL
value: 0M
info: the size of disk space used by the log files. Range: [0, +∞)
section: LOGSERVICE
scope: CLUSTER
source: DEFAULT
edit_level: DYNAMIC_EFFECTIVE
default_value: 0M
isdefault: 1
*************************** 3. row ***************************
zone: zone1
svr_type: observer
svr_ip: 10.5.34.106
svr_port: 2882
name: memory_limit_percentage
data_type: NULL
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

具体的导入命令 提供一下 obdumper-obloader版本号发一下

111

obloader -h10.5.34.106 -p2881 -uxxx -pxxx -D zygenusprd01 --all --ddl --csv --skip-header --thread 2 --insert-batch-size 500 --commit-each-batch true --truncate-table

请问这两个参数应该怎么用呢,报参数不存在

导入问题确认,是因为drop table后没有立即释放空间

可以临时调整下writing_throttling_trigger_percentage参数,数据导入后再把值恢复回去。

–insert-batch-size --commit-each-batch 这两个都不是导数的参数 这个信息在查一下
select m.svr_ip,l.sql_port,m.memstore_used/m.memstore_limit,d.status,d.is_suspended from SYS.GV$OB_MEMSTORE m,SYS.DBA_OB_MAJOR_COMPACTION d,SYS.DBA_OB_LS_LOCATIONS l where m.svr_ip=l.svr_ip and m.svr_port=l.svr_port and LS_ID=1;
导入报错over tenant memory limit的时候 对应的时间的observer.log日志提供一下 可以看看什么原因导致的

这个问题 你们怎么确认的