执行创建和删除都没有问题
./runDatabaseBuild.sh props.pg
./runDatabaseDestroy.sh props.pg
但是执行性能测试就报错, ./runBenchmark.sh props.pg,如下所示
[root@node1 run]# ./runBenchmark.sh props.pg
18:21:00,357 [main] INFO jTPCC : Term-00, db=postgres
18:21:00,358 [main] INFO jTPCC : Term-00, driver=org.postgresql.Driver
18:21:00,358 [main] INFO jTPCC : Term-00, conn=jdbc:postgresql://172.20.1.132:5000/postgres
18:21:00,358 [main] INFO jTPCC : Term-00, user=postgres
18:21:00,358 [main] INFO jTPCC : Term-00,
18:18:14,785 [main] INFO jTPCC : Term-00, warehouses=30
18:18:14,785 [main] INFO jTPCC : Term-00, terminals=400
18:18:14,787 [main] INFO jTPCC : Term-00, runMins=15
18:18:14,787 [main] INFO jTPCC : Term-00, limitTxnsPerMin=100000
18:18:14,787 [main] INFO jTPCC : Term-00, terminalWarehouseFixed=true18:18:19,036 [main] INFO jTPCC : Term-00,
Traceback (most recent call last):
File "", line 299, in
File "", line 90, in main
File "", line 269, in initNetDevice
IOError: [Errno 2] No such file or directory: '/sys/class/net/eth0/statistics/rx_packets'
18:18:19,046 [Thread-0] ERROR OSCollector$CollectData : OSCollector, unexpected EOF while reading from external helper process
18:18:19,114 [main] INFO jTPCC : Term-00, C value for C_LAST during load: 20
18:18:19,115 [main] INFO jTPCC : Term-00, C value for C_LAST this run: 122
18:18:19,115 [main] INFO jTPCC : Term-00, 18:18:19,119 [main] ERROR jTPCC : Term-00, Invalid number of terminals!y Usage: 25MB / 462MB [root@node1 run]# Average tpmTOTAL: 0.00 Current tpmTOTAL: 0 Memory Usage: 25MB / 462MB
IOError: [Errno 2] No such file or directory: '/sys/class/net/eth0/statistics/rx_packets'
18:18:19,046 [Thread-0] ERROR OSCollector$CollectData : OSCollector, unexpected EOF while reading from external helper process
结合之前的经验,这俩个错误没有问题。
最后测来测去发现 terminals小于10 不会报错,大于20就会报错,通过以下方式排错:
1、通过命令进入postgresql的配置的编辑页面
patronictl -c /etc/patroni/patroni.yml edit-config postgres_cluster
修改 max_connections大小,发现连接数也没有问题
2、去修改/etc/security/limits.conf是不是用户的级别的资源限制,修改了之后还是报同样的错误。
最后在oceanbase问答网站中看到:
prop.oceanbase文件里设置的需要满足:
0 非常感谢这位大佬 原文连接如下: tpcc - OceanBase - 社区问答- OceanBase社区-分布式数据库