参数的值、描述、生效范围、是否要重启节点等,都可以通过命令查看。命令是:`show parameters [ like '%参数名特征%' ;`
参数的修改命令是:`alter system set 参数名 = 参数值(如果是字符串,用两个单引号引起来)[ scope = 'xxx.xxx.xxx.xxx:2882' ] ;` 。
除了集群参数可以定制集群行为外,租户也可以定制,通过变量(`variable`)设置。变量跟参数其实是同一类概念,参数的定位和风格取自 ORACLE 数据库,变量的定位和风格取自 MySQL 数据库。集群 SYS 租户一样可以设置变量值(SYS 租户变量通常不用调整,必须很谨慎),不同租户的变量设置彼此独立,互不影响。大部分变量的设置是立即生效,生效范围根据设置方法不同有实例全局层面和会话层面生效。极少数变量类似 MySQL 的初始化变量,不能在租户里后期修改,只是在 SYS 租户里新建业务租户的时候设置。当然也能后期在 SYS 租户后期修改,只是这个修改也必须充分评估影响。
变量的值、描述都可以通过命令查看。命令是: ` show global | [session] variables [ like '%变量名特征%' ] ; ` , 或者 `show global | [session] variables where variable_name in ('参数1' [, '参数2']) ;`
变量的值的修改命令是: ` set global | [session] 变量名 = 变量值(如果是字符串,用两个单引号引起来); ` 。`global` 指全局生效,对新建会话生效,当前会话不生效。 `session` 或者没有限定符,都表示对当前会话生效。会话断开重连后,又会取全局层面的默认值。
OceanBase 集群的标准部署模式是有三个 ZONE,每个ZONE 的机器数量都对等,每个 ZONE 里可以存在不同配置的机器,但是不同 ZONE 之间的机器配置是对等的,机器资源总量也是对等的。非标准部署就是 ZONE 之间的机器配置不对等、数量也不对等。技术上这也是可以运行的,只是资源最少的机器或 ZONE 会成为集群资源的瓶颈。
OceanBase 集群扩容的标准形式就是向每个 ZONE 里添加同等配置的机器。非标准做法就是只向一个 ZONE 里添加机器。步骤如下:
生产环境 OceanBase 集群通常是三副本架构,有三个 ZONE,每个 ZONE 至少一台主机,集群架构是 `N-N-N` (N>=1) 。OceanBase 集群将所有节点的资源(主要是 CPU 、内存和磁盘空间)聚合成大的资源池子后,再二次分配出租户。租户就是逻辑实例,每个租户对应一部分资源(资源主要是CPU、内存)。租户的资源也叫资源池,由每个 ZONE 里一个小的资源池组成。通常三个 ZONE 的资源池大小规格是一样的(可以不一样)。每个 ZONE 里的资源池由至少一个资源单元组成,每个资源单元只能从一个 节点上分配资源。资源单元规格 * 资源单元数 就是租户的可以利用的最大资源。
变量跟参数其实是同一类概念,参数的定位和风格取自 ORACLE 数据库,变量的定位和风格取自 MySQL 数据库。集群 SYS 租户一样可以设置变量值(SYS 租户变量通常不用调整,必须很谨慎),不同租户的变量设置彼此独立,互不影响。大部分变量的设置是立即生效,生效范围根据设置方法不同有实例全局层面和会话层面生效。极少数变量类似 MySQL 的初始化变量,不能在租户里后期修改,只是在 SYS 租户里新建业务租户的时候设置。当然也能后期在 SYS 租户后期修改,只是这个修改也必须充分评估影响。
变量的值、描述都可以通过命令查看。命令是: ` show global | [session] variables [ like '%变量名特征%' ] ; ` , 或者 `show global | [session] variables where variable_name in ('参数1' [, '参数2']) ; `
变量的值的修改命令是: ` set global | [session] 变量名 = 变量值(如果是字符串,用两个单引号引起来); ` 。`global` 指全局生效,对新建会话生效,当前会话不生效。 `session` 或者没有限定符,都表示对当前会话生效。会话断开重连后,又会取全局层面的默认值。
所有 OceanBase 集群节点都要部署 NFS 客户端,将 NFS SERVER 的共享目录挂载到本机。
客户端也要先安装 NFS 软件。
+ 安装 NFS 工具包
```bash
sudo yum install nfs-utils
```
+ 修改内核参数
```bash
sudo vim /etc/sysctl.conf +R
sunrpc.tcp_max_slot_table_entries=128
```
+ 挂载目录
```bash
sudo mount -tnfs4-o rw,timeo=30,wsize=1048576,rsize=1048576,namlen=512,sync,lookupcache=positive 172.20.249.54:/data/backup /backup
```
查看结果
```bash
[admin@obce01 ~]$ mount |grep backup
172.20.249.54:/data/backup on /backup type nfs4 (rw,relatime,sync,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=30,retrans=2,sec=sys,clientaddr=172.20.249.53,lookupcache=pos,local_lock=none,addr=172.20.249.54)
Oct 21 15:54:42 obce00 prometheus[902555]: level=info ts=2021-10-21T07:54:42.275Z caller=head.go:519 component=tsdb msg="Replaying WAL, this may take a while"
Time -----------------------cpu----------------------------------------------------------------------------------------dm-0------------------------------------------------------------------
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```
### OBD 初始化新机器节点目录
当要给集群扩容节点的时候,建议每个 ZONE 新增相同配置的机器。但是不能直接在现有配置文件中编辑。当前版本(`1.1.0`) 采取的方式是复制现有的配置文件为新文件,然后修改配置文件中的 `servers` 下的 IP 为新的 IP 。如果 OBPROXY 集群不扩容,就删除 OBPROXY 配置节。
| 当前活跃会话数 | sum(ob_active_session_num{@LABELS}) by ([@GBLABELS)| - |
| 块缓存命中率 | 100 * 1 / (1 + sum(rate(ob_sysstat{stat_id="50009",@LABELS}[@INTERVAL])) by ([@GBLABELS)](/GBLABELS)) / sum(rate(ob_sysstat{stat_id="50008",@LABELS}[@INTERVAL])) by (@GBLABELS))| % |
| 块缓存大小 | sum(ob_cache_size_bytes{cache_name="user_block_cache",@LABELS}) by ([@GBLABELS)](/GBLABELS)) / 1048576| MB |
| 每秒提交的事务日志大小 | sum(rate(ob_sysstat{stat_id="80057",@LABELS}[@INTERVAL])) by ([@GBLABELS)](/GBLABELS))| byte |
| 每次事务日志写盘平均耗时 | sum(rate(ob_sysstat{stat_id="80041",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="80040",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| CPU 使用率 | 100 * (1 - sum(rate(node_cpu_seconds_total{mode="idle", @LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(node_cpu_seconds_total{@LABELS}[@INTERVAL])) by (@GBLABELS))| % |
| 每秒读次数 | avg(rate(node_disk_reads_completed_total{@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 每次读取数据量 | avg(rate(node_disk_read_bytes_total{@LABELS}[@INTERVAL])) by (@GBLABELS) / 1048576| MB |
| SSStore 每秒读次数 | sum(rate(ob_sysstat{stat_id="60000",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| SSStore 每次读取平均耗时 | sum(rate(ob_sysstat{stat_id="60001",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="60000",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| SSStore 每秒读取数据量 | sum(rate(ob_sysstat{stat_id="60002",@LABELS}[@INTERVAL])) by (@GBLABELS)| byte |
| 每秒读取平均耗时 | 1000000 * (avg(rate(node_disk_read_time_seconds_total{@LABELS}[@INTERVAL])) by (@GBLABELS)) / (avg(rate(node_disk_reads_completed_total{@LABELS}[@INTERVAL])) by (@GBLABELS))| us |
| 平均每次 IO 读取耗时 | 1000000 * (avg(rate(node_disk_read_time_seconds_total{@LABELS}[@INTERVAL])) by (@GBLABELS)) / (avg(rate(node_disk_reads_completed_total{@LABELS}[@INTERVAL])) by (@GBLABELS))| us |
| 每秒写次数 | avg(rate(node_disk_writes_completed_total{@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 每次写入数据量 | avg(rate(node_disk_written_bytes_total{@LABELS}[@INTERVAL])) by (@GBLABELS) / 1048576| MB |
| SSStore 每秒写次数 | sum(rate(ob_sysstat{stat_id="60003",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| SSStore 每次写入平均耗时 | sum(rate(ob_sysstat{stat_id="60004",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="60003",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| SSStore 每秒写入数据量 | sum(rate(ob_sysstat{stat_id="60005",@LABELS}[@INTERVAL])) by (@GBLABELS)| byte |
| 每秒写入平均耗时 | 1000000 * (avg(rate(node_disk_write_time_seconds_total{@LABELS}[@INTERVAL])) by (@GBLABELS)) / (avg(rate(node_disk_writes_completed_total{@LABELS}[@INTERVAL])) by (@GBLABELS))| us |
| 平均每次 IO 写入耗时 | 1000000 * (avg(rate(node_disk_write_time_seconds_total{@LABELS}[@INTERVAL])) by (@GBLABELS)) / (avg(rate(node_disk_writes_completed_total{@LABELS}[@INTERVAL])) by (@GBLABELS))| us |
| 过去 1 分钟系统平均负载 | avg(node_load1{@LABELS}) by (@GBLABELS)| - |
| 过去 15 分钟系统平均负载 | avg(node_load15{@LABELS}) by (@GBLABELS)| - |
| 过去 5 分钟系统平均负载 | avg(node_load5{@LABELS}) by (@GBLABELS)| - |
| 触发合并阈值 | sum(ob_sysstat{stat_id="130002",@LABELS}) by (@GBLABELS) / 1048576| MB |
| MEMStore 使用百分比 | 100 * sum(ob_sysstat{stat_id="130001",@LABELS}) by (@GBLABELS) / sum(ob_sysstat{stat_id="130004",@LABELS}) by (@GBLABELS)| % |
| 写锁等待失败次数 | sum(rate(ob_sysstat{stat_id="60022",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 写锁等待成功次数 | sum(rate(ob_sysstat{stat_id="60021",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 写锁平均等待耗时 | sum(rate(ob_sysstat{stat_id="60023",@LABELS}[@INTERVAL])) by (@GBLABELS) / (sum(rate(ob_sysstat{stat_id="60021",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="60022",@LABELS}[@INTERVAL])) by (@GBLABELS))| us |
| 每秒接收数据量 | avg(rate(node_network_receive_bytes_total{@LABELS}[@INTERVAL])) by (@GBLABELS) / 1048576| MB |
| 每秒发送数据量 | avg(rate(node_network_transmit_bytes_total{@LABELS}[@INTERVAL])) by (@GBLABELS) / 1048576| MB |
| CPU 使用率 | 100 * sum(ob_sysstat{stat_id="140006",@LABELS}) by (@GBLABELS) / sum(ob_sysstat{stat_id="140005",@LABELS}) by (@GBLABELS)| % |
| 分区数量 | sum(ob_partition_num{@LABELS}) by (@GBLABELS)| - |
| 执行计划缓存命中率 | 100 * sum(rate(ob_plan_cache_hit_total{@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_plan_cache_access_total{@LABELS}[@INTERVAL])) by (@GBLABELS)| % |
| 执行计划缓存大小 | sum(ob_plan_cache_memory_bytes{@LABELS}) by (@GBLABELS) / 1048576| MB |
| 平均每秒 SQL 进等待队列的次数 | sum(rate(ob_sysstat{stat_id="20001",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| SQL 在等待队列中等待耗时 | sum(rate(ob_sysstat{stat_id="20002",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="20001",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 行缓存命中率 | 100 * 1 / (1 + sum(rate(ob_sysstat{stat_id="50001",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="50000",@LABELS}[@INTERVAL])) by (@GBLABELS))| % |
| 缓存大小 | sum(ob_cache_size_bytes{@LABELS}) by (@GBLABELS) / 1048576| MB |
| RPC 收包吞吐量 | sum(rate(ob_sysstat{stat_id="10001",@LABELS}[@INTERVAL])) by (@GBLABELS)| byte |
| RPC 收包平均耗时 | (sum(rate(ob_sysstat{stat_id="10005",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="10006",@LABELS}[@INTERVAL])) by (@GBLABELS)) / sum(rate(ob_sysstat{stat_id="10000",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| RPC 发包吞吐量 | sum(rate(ob_sysstat{stat_id="10003",@LABELS}[@INTERVAL])) by (@GBLABELS)| byte |
| RPC 发包平均耗时 | (sum(rate(ob_sysstat{stat_id="10005",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="10006",@LABELS}[@INTERVAL])) by (@GBLABELS)) / sum(rate(ob_sysstat{stat_id="10002",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 每秒处理 SQL 语句数 | sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 服务端每条 SQL 语句平均处理耗时 | (sum(rate(ob_sysstat{stat_id="40003",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40005",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40007",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40009",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40001",@LABELS}[@INTERVAL])) by (@GBLABELS)) /(sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS)) | us |
| 每秒处理 Delete 语句数 | sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 服务端每条 Delete 语句平均处理耗时 | sum(rate(ob_sysstat{stat_id="40009",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 每秒处理分布式执行计划数 | sum(rate(ob_sysstat{stat_id="40012",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 每秒处理 Insert 语句数 | sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 服务端每条 Insert 语句平均处理耗时 | sum(rate(ob_sysstat{stat_id="40003",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 每秒处理本地执行数 | sum(rate(ob_sysstat{stat_id="40010",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 每秒处理远程执行计划数 | sum(rate(ob_sysstat{stat_id="40011",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 每秒处理 Replace 语句数 | sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 服务端每条 Replace 语句平均处理耗时 | sum(rate(ob_sysstat{stat_id="40005",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 每秒处理 Select 语句数 | sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 服务端每条 Select 语句平均处理耗时 | sum(rate(ob_sysstat{stat_id="40001",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 每秒处理 Update 语句数 | sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 服务端每条 Update 语句平均处理耗时 | sum(rate(ob_sysstat{stat_id="40007",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 表数量 | max(ob_table_num{@LABELS}) by (@GBLABELS)| - |
| 每秒处理事务数 | sum(rate(ob_sysstat{stat_id="30005",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 服务端每个事务平均处理耗时 | sum(rate(ob_sysstat{stat_id="30006",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30005",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 每秒提交的事务日志数 | sum(rate(ob_sysstat{stat_id="30002",@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 每次事务日志网络同步平均耗时 | sum(rate(ob_sysstat{stat_id="30000",@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_sysstat{stat_id="30001",@LABELS}[@INTERVAL])) by (@GBLABELS)| us |
| 每秒等待事件次数 | sum(rate(ob_waitevent_wait_total{@LABELS}[@INTERVAL])) by (@GBLABELS)| 次/s |
| 等待事件平均耗时 | sum(rate(ob_waitevent_wait_seconds_total{@LABELS}[@INTERVAL])) by (@GBLABELS) / sum(rate(ob_waitevent_wait_total{@LABELS}[@INTERVAL])) by (@GBLABELS)| s |
Commands implemented by most tests: prepare run cleanup help
General options:
--threads=N number of threads to use [1]
--events=N limit for total number of events [0]
--time=N limit for total execution time in seconds [10]
--forced-shutdown=STRING number of seconds to wait after the --time limit before forcing shutdown, or 'off' to disable [off]
--thread-stack-size=SIZE size of stack per thread [64K]
--rate=N average transactions rate. 0 for unlimited rate [0]
--report-interval=N periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]
--report-checkpoints=[LIST,...] dump full statistics and reset all counters at specified points in time. The argument is a list of comma-separated values representing the amount of time in seconds elapsed from start of test when report checkpoint(s) must be performed. Report checkpoints are off by default. []
--debug[=on|off] print more debugging info [off]
--validate[=on|off] perform validation checks where possible [off]
--help[=on|off] print help and exit[off]
--version[=on|off] print version and exit[off]
--config-file=FILENAME File containing command line options
--tx-rate=N deprecated alias for--rate[0]
--max-requests=N deprecated alias for--events[0]
--max-time=N deprecated alias for--time[0]
--num-threads=N deprecated alias for--threads[1]
Pseudo-Random Numbers Generator options:
--rand-type=STRING random numbers distribution {uniform,gaussian,special,pareto}[special]
--rand-spec-iter=N number of iterations used for numbers generation [12]
--rand-spec-pct=N percentage of values to be treated as 'special'(for special distribution)[1]
--rand-spec-res=N percentage of 'special' values to use (for special distribution)[75]
--rand-seed=N seed for random number generator. When 0, the current time is used as a RNG seed. [0]
--rand-pareto-h=N parameter h for pareto distribution [0.2]
10:21:44,896 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
10:21:44,896 [main] INFO jTPCC : Term-00, BenchmarkSQL v5.0
10:21:44,896 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
10:21:44,896 [main] INFO jTPCC : Term-00, (c) 2003, Raul Barbosa
10:21:44,896 [main] INFO jTPCC : Term-00, (c) 2004-2016, Denis Lussier
10:21:44,898 [main] INFO jTPCC : Term-00, (c) 2016, Jan Wieck
10:21:44,898 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
10:21:44,898 [main] INFO jTPCC : Term-00,
10:21:44,898 [main] INFO jTPCC : Term-00, db=oracle
10:21:44,898 [main] INFO jTPCC : Term-00, driver=com.alipay.oceanbase.jdbc.Driver
10:21:44,898 [main] INFO jTPCC : Term-00, conn=jdbc:oceanbase://172.20.249.52:2883/tpccdb?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&allowMultiQueries=true
10:21:44,898 [main] INFO jTPCC : Term-00, user=u_tpcc@obmysql#obce-3zones
10:21:44,898 [main] INFO jTPCC : Term-00,
10:21:44,899 [main] INFO jTPCC : Term-00, warehouses=10
10:21:44,899 [main] INFO jTPCC : Term-00, terminals=10
10:21:44,900 [main] INFO jTPCC : Term-00, runMins=10
10:21:44,900 [main] INFO jTPCC : Term-00, limitTxnsPerMin=0
10:21:44,900 [main] INFO jTPCC : Term-00, terminalWarehouseFixed=true
10:21:44,900 [main] INFO jTPCC : Term-00,
10:21:44,900 [main] INFO jTPCC : Term-00, newOrderWeight=45
10:21:44,900 [main] INFO jTPCC : Term-00, paymentWeight=43
10:21:44,900 [main] INFO jTPCC : Term-00, orderStatusWeight=4
10:21:44,901 [main] INFO jTPCC : Term-00, deliveryWeight=4
10:21:44,901 [main] INFO jTPCC : Term-00, stockLevelWeight=4
10:21:44,901 [main] INFO jTPCC : Term-00,
10:21:44,901 [main] INFO jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
10:21:44,901 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
10:21:44,901 [main] INFO jTPCC : Term-00,
10:21:44,925 [main] INFO jTPCC : Term-00, copied props.ob to my_result_2021-10-01_102144/run.properties
10:21:44,926 [main] INFO jTPCC : Term-00, created my_result_2021-10-01_102144/data/runInfo.csv for runID 326
10:21:44,926 [main] INFO jTPCC : Term-00, writing per transaction results to my_result_2021-10-01_102144/data/result.csv
10:21:44,926 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
10:21:44,926 [main] INFO jTPCC : Term-00, osCollectorInterval=1
10:21:44,927 [main] INFO jTPCC : Term-00, osCollectorSSHAddr=null
10:21:44,927 [main] INFO jTPCC : Term-00, osCollectorDevices=null
10:21:45,031 [main] INFO jTPCC : Term-00,
10:21:45,611 [main] INFO jTPCC : Term-00, C value for C_LAST during load: 144
10:21:45,613 [main] INFO jTPCC : Term-00, C value for C_LAST this run: 215
10:21:45,614 [main] INFO jTPCC : Term-00,
0:21:45,611 [main] INFO jTPCC : Term-00, C value for C_LAST during load: 14Term-00, Running Average tpmTOTAL: 5376.32 Current tpmTOTAL: 356448 Memory Usage: 44MB / 366MB 10:31:46,707 [Thread-7] INFO jTPCC : Term-00, 10:31:46,707 [Thread-7] INFO jTPCC : Term-00, 10:31:46,707 [Thread-7] INFO jTPCC : Term-00, Measured tpmC (NewOrders) = 2410.28
10:31:46,708 [Thread-7] INFO jTPCC : Term-00, Measured tpmTOTAL = 5376.33
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/customer.tbl' into table customer fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
print cmd_str
result = commands.getstatusoutput(cmd_str)
print result
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/lineitem.tbl' into table lineitem fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
result = commands.getstatusoutput(cmd_str)
print result
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/nation.tbl' into table nation fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
result = commands.getstatusoutput(cmd_str)
print result
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/orders.tbl' into table orders fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
result = commands.getstatusoutput(cmd_str)
print result
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/partsupp.tbl' into table partsupp fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
result = commands.getstatusoutput(cmd_str)
print result
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/part.tbl' into table part fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
result = commands.getstatusoutput(cmd_str)
print result
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/region.tbl' into table region fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
result = commands.getstatusoutput(cmd_str)
print result
cmd_str=""" mysql --default-auth=mysql_native_password,db_name -h%s -P%s -u%s@%s -c -A %s -e "load data /*+ parallel(8)*/ infile '%s/supplier.tbl' into table supplier fields terminated by '|';" """ %(hostname,port,user,tenant,db_name,data_path)
+`Max bigint of Connections`:这个指连接池里最多多少个连接。如果压测线程数远高于这个值,那么压测线程可能会需要等待这个连接池创建或返还数据库连接(即到OceanBase的连接)给它。如果等不到可能会报错。在这个环节,客户端压测线程拿不到连接,不一定跟OceanBase数据库有直接关系。在Java应用里面也同理。
+`Test While Idle`:这个是连接探活(`keepalive`)设置。这个设置对应用却很优必要。有时候应用会说数据库连接报错说在一个关闭的连接上执行SQL报错,这个就是因为连接池中的数据库连接因为其他原因已断开了。所以,数据库连接池通常都需要探活机制。这里由于是压测场景基本无闲置连接,所以可以设置为`False`。
| proxy_idc_name | | idc name for proxy ldc route. If is empty or invalid, treat as do not use ldc. User session vars 'proxy_session_ldc' can cover it | false | SYS |
| proxy_idc_name | idc1 | idc name for proxy ldc route. If is empty or invalid, treat as do not use ldc. User session vars 'proxy_session_ldc' can cover it | false | SYS |
2. 如果期望对含有HINT的语句进行限流和固定计划,则需要TO target_stmt来指明相应的SQL。`create outline outline_name on stmt1 to stmt2;`的语意是说对`stmt2`创建outline,让`stmt2`使用`stmt1`中的`hint`。
[2021-10-08 15:35:14.343634] ERROR easy_client_dispatch (easy_client.c:30)[90761][8][YB42AC14F934-0005CDD26B1C3D3A] [lt=0] [dc=0] easy_io_dispatch is failure: easy not started
oceanbase::rpc::frame::ObReqTransport::send_session(easy_session_t*) const at ??:?
int oceanbase::rpc::frame::ObReqTransport::send<oceanbase::obrpc::ObRpcPacket>(oceanbase::rpc::frame::ObReqTransport::Request<oceanbase::obrpc::ObRpcPacket> const&, oceanbase::rpc::frame::ObReqTransport::Result<oceanbase::obrpc::ObRpcPacket>&) const at ??:?
oceanbase::obrpc::ObRpcProxy::send_request(oceanbase::rpc::frame::ObReqTransport::Request<oceanbase::obrpc::ObRpcPacket> const&, oceanbase::rpc::frame::ObReqTransport::Result<oceanbase::obrpc::ObRpcPacket>&) const at ??:?
int oceanbase::obrpc::ObRpcProxy::rpc_call<oceanbase::obrpc::ObFetchAliveServerArg, oceanbase::obrpc::ObFetchAliveServerResult>(oceanbase::obrpc::ObRpcPacketCode, oceanbase::obrpc::ObFetchAliveServerArg const&, oceanbase::obrpc::ObFetchAliveServerResult&, oceanbase::obrpc::Handle*, oceanbase::obrpc::ObRpcOpts const&) at ??:?