OceanBase TPCC测试常见报错汇总
- 报错1:加载测试数据时创建tablegroup失败
- 报错2:加载测试数据时执行超时
- 报错3:加载测试数据时funcs.sh函数找不到
- 报错4:加载数据时报错超过租户内存上限
- 办法一:增加租户内存
- 办法二:调高转储线程数
- 办法三:调整MemStore内存占比和冻结触发阈值
- 办法四:调大租户写入限流参数
- 报错5:服务器磁盘空间不足
- 环境配置参考
报错1:加载测试数据时创建tablegroup失败
报错信息:
CREATE TABLEGROUP tpcc_group binding true partition by hash partitions 9;
Access denied; you need (at least one of) the CREATE privilege(s) for this operation
tablegroup not exist
修改props.ob
使用高权限用户测试:
user=root@tpcc
password=******
报错2:加载测试数据时执行超时
报错信息:
Worker 006: ERROR: 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.
登录租户管理员,调大ob_query_timeout
参数:
[admin@oceanbase ~]$ mysql -h127.0.0.1 -P2881 -uroot@tpcc -p****** -AMySQL [(none)]> show variables like '%timeout%';MySQL [(none)]> set global ob_query_timeout=36000000000;
退出重新登录生效。
报错3:加载测试数据时funcs.sh函数找不到
报错信息:
/opt/benchmarksql-5.0/run/runLoader.sh: line 8: source: funcs.sh: file not found
修改runLoader.sh
替换func.sh
为绝对路径:
#source funcs.sh $1
source /opt/benchmarksql-5.0/run/funcs.sh $1
报错4:加载数据时报错超过租户内存上限
报错信息:
Worker 027: ERROR: Over tenant memory limits
Worker 067: ERROR: Over tenant memory limits
Worker 025: ERROR: No memory or reach tenant memory limit
Worker 054: ERROR: No memory or reach tenant memory limit
办法一:增加租户内存
登录SYS租户,检查unit config的内存规格:
obclient(root@sys)[oceanbase]>
SELECT a.tenant_name,a.tenant_id,b.name unit_config,c.name pool_name,b.max_cpu,b.min_cpu,round(b.memory_size/1024/1024/1024,2) memory_size_gbFROMOCEANBASE.DBA_OB_TENANTS a,OCEANBASE.DBA_OB_UNIT_CONFIGS b,OCEANBASE.DBA_OB_RESOURCE_POOLS cWHERE a.tenant_id=c.tenant_idAND b.unit_config_id = c.unit_config_idORDER BY a.tenant_id desc;+-------------+-----------+-----------------+-----------+---------+---------+----------------+
| tenant_name | tenant_id | unit_config | pool_name | max_cpu | min_cpu | memory_size_gb |
+-------------+-----------+-----------------+-----------+---------+---------+----------------+
| tpcc | 1002 | tpcc_unit | tpcc_pool | 36 | 36 | 187.00 |
| sys | 1 | sys_unit_config | sys_pool | 4 | 4 | 2.00 |
+-------------+-----------+-----------------+-----------+---------+---------+----------------+
2 rows in set (0.021 sec)
如果unit内存规格很小,调大tpcc租户内存上限:
alter resource unit tpcc_unit min_cpu = 36,max_cpu = 36,memory_size = '10g';
多个副本可能使用了不同的 resource_pool,需要分别做出调整。
这里我们tpcc租户原本的内存规格就很大,感觉应该不是租户内存不足的问题。
办法二:调高转储线程数
转储前数据会大量占据内存,快速转储结束能释放被占用的内存,compaction_high_thread_score
是控制并行转储线程数,可以通过调高该参数值来达到快速释放内存的目的。该参数默认值为0,表示有6个并发线程数,修改该参数无需重启OBServer即刻生效。
检查转储线程数:
obclient(root@sys)