OceanBase TPCC测试常见报错汇总

发布于:2025-05-01 ⋅ 阅读:(21) ⋅ 点赞:(0)

报错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****** -A

MySQL [(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_gb
  FROM
  OCEANBASE.DBA_OB_TENANTS a,
  OCEANBASE.DBA_OB_UNIT_CONFIGS b,
  OCEANBASE.DBA_OB_RESOURCE_POOLS c
  WHERE a.tenant_id=c.tenant_id
  AND b.unit_config_id = c.unit_config_id
  ORDER 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)

网站公告

今日签到

点亮在社区的每一天
去签到