【TiDB 4.0 PCTA 学习笔记】- 2.3.4 (如何对 TiDB 进行基准测试)@3班邱家洪

课程名称:课程版本(101/201/301)+ 如何对 TiDB 进行基准测试

学习时长:19m

课程收获:

  • 了解如何对 TiDB 进行性能测试
  • Sysbench,TPCC

课程内容:

使用sysbench做测试

curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash
sudo yum -y install sysbench
  • 准备配置文件

  • 测试数据的导入

  • 执行测试

  • 测试结果

TPC-C

  • TPC-C模型,使用交易模型,更接近用户负载

  • 软件编译准备
# 安装java 和ant
sudo yum install -y java ant 

# 编译benchmarksql with mysql protocol 支持
git clone -b 5.0-mysql-support-opt-2.1 https://github.com/pingcap/benchmarksql
cd benchmarksql; ant

  • 修改目录下文件配置 run/props.mysql

warehouses 代表仓库数量
terminals 进行交易的终端数,bench时的并发数
loadWorkers 导入数据时的并发数

  • 导入数据

  • 执行测试脚本,tpmc ,new order的TPS

  • 常见问题

学习过程中参考的其他资料