暂无图片
暂无图片
2
暂无图片
暂无图片
暂无图片

sysbench 测试三节点oceanbase3.1.2社区版集群

原创 lqkitten 2022-03-11
1756

sysbench 测试三节点oceanbase

一、测试环境

ip        角色       操作系统版本

192.168.56.22   obd+obproxy+sysbench  Anolis OS 8.4  
192.168.56.30    observer        centos 7.6  
192.168.56.31    observer        centos 7.6  
192.168.56.32    observer        centos 7.6  

OBD机资源

obproxy:192.168.56.22  
[admin@obp ]# cat /etc/os-release  
NAME="Anolis OS"  
VERSION="8.4"  
ID="anolis"  
ID_LIKE="rhel fedora centos"  
VERSION_ID="8.4"  
PLATFORM_ID="platform:an8"  
PRETTY_NAME="Anolis OS 8.4"  
ANSI_COLOR="0;31"  
HOME_URL="https://openanolis.cn/"  
[admin@obp ]# df -h  
Filesystem Size Used Avail Use% Mounted on  
devtmpfs 1.9G 0 1.9G 0% /dev  
tmpfs 1.9G 0 1.9G 0% /dev/shm  
tmpfs 1.9G 8.6M 1.9G 1% /run  
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup  
/dev/mapper/ao-root 75G 11G 64G 15% /  
/dev/sda1 976M 161M 749M 18% /boot  
tmpfs 374M 0 374M 0% /run/user/0  
[admin@obp ]# free -g  
total used free shared buff/cache available  
Mem: 3 0 1 0 1 2  
Swap: 4 0 4  

observer资源

observer:192.168.56.30/31/32  
[root@ob1 ~]# cat /etc/os-release  
NAME="CentOS Linux"  
VERSION="7 (Core)"  
ID="centos"  
ID_LIKE="rhel fedora"  
VERSION_ID="7"  
PRETTY_NAME="CentOS Linux 7 (Core)"  
ANSI_COLOR="0;31"  
CPE_NAME="cpe:/o:centos:centos:7"  
HOME_URL="https://www.centos.org/"  
BUG_REPORT_URL="https://bugs.centos.org/"  
  
CENTOS_MANTISBT_PROJECT="CentOS-7"  
CENTOS_MANTISBT_PROJECT_VERSION="7"  
REDHAT_SUPPORT_PRODUCT="centos"  
REDHAT_SUPPORT_PRODUCT_VERSION="7"  
  
[root@ob1 ~]# df -h  
Filesystem Size Used Avail Use% Mounted on  
devtmpfs 8.8G 0 8.8G 0% /dev  
tmpfs 8.8G 0 8.8G 0% /dev/shm  
tmpfs 8.8G 8.8M 8.8G 1% /run  
tmpfs 8.8G 0 8.8G 0% /sys/fs/cgroup  
/dev/mapper/centos-root 31G 17G 15G 53% /  
/dev/sda1 1014M 194M 821M 20% /boot  
/dev/mapper/vgob-lvlog 65G 362M 65G 1% /redo  
/dev/mapper/vgob-lvdata 15G 3.1G 12G 21% /data  
tmpfs 1.8G 0 1.8G 0% /run/user/0  
tmpfs 1.8G 0 1.8G 0% /run/user/1002  
  
[root@ob1 ~]# free -g  
total used free shared buff/cache available  
Mem: 17 11 4 0 1 4  
Swap: 7 0 7  

二、测试工具安装

安装mysql开发库

[root@localhost sysbench]# yum -y install mysql-devel  
Last metadata expiration check: 0:22:50 ago on Thu 10 Mar 2022 09:07:53 PM CST.  
Dependencies resolved.  
====================================================================================================  
Package Arch Version Repository Size  
====================================================================================================  
Installing:  
mysql-devel x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 AppStream 154 k  
Installing dependencies:  
mariadb-connector-c-config noarch 3.1.11-2.an8 AppStream 14 k  
mysql-common x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 AppStream 133 k  
mysql-libs x86_64 8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5 AppStream 1.4 M  
  
Transaction Summary  
====================================================================================================  
Install 4 Packages  
  
Total download size: 1.7 M  
Installed size: 7.8 M  
Downloading Packages:  
(1/4): mariadb-connector-c-config-3.1.11-2.an8.noarch.rpm 114 kB/s | 14 kB 00:00  
(2/4): mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_ 982 kB/s | 133 kB 00:00  
(3/4): mysql-devel-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_6 907 kB/s | 154 kB 00:00  
(4/4): mysql-libs-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 5.6 MB/s | 1.4 MB 00:00  
----------------------------------------------------------------------------------------------------  
Total 4.6 MB/s | 1.7 MB 00:00  
Running transaction check  
Transaction check succeeded.  
Running transaction test  
Transaction test succeeded.  
Running transaction  
Preparing : 1/1  
Installing : mariadb-connector-c-config-3.1.11-2.an8.noarch 1/4  
Installing : mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 2/4  
Installing : mysql-libs-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 3/4  
Installing : mysql-devel-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 4/4  
Running scriptlet: mysql-devel-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 4/4  
Verifying : mariadb-connector-c-config-3.1.11-2.an8.noarch 1/4  
Verifying : mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 2/4  
Verifying : mysql-devel-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 3/4  
Verifying : mysql-libs-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64 4/4  
  
Installed:  
mariadb-connector-c-config-3.1.11-2.an8.noarch  
mysql-common-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64  
mysql-devel-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64  
mysql-libs-8.0.26-1.0.1.module+an8.4.0+10570+ea0623f5.x86_64  
  
Complete!  
  

安装sysbench

git clone https://github.com/akopytov/sysbench.git  
cd sysbench  
./autogen.sh  
./configure  
make -j10  
make install  
[root@localhost sysbench]# sysbench --version  
sysbench 1.1.0-df89d34  
## Only need to configure when remote login is required  
  

安装OBD及客户端:

yum install -y yum-utils  
yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo  
yum install -y ob-deploy  
yum install -y obclient ob-sysbench obtpch  
source /etc/profile.d/obd.sh 

编辑部署文件

cat ob.yaml  
user:  
username: admin  
password: admin  
oceanbase-ce:  
servers:  
- name: z1  
ip: 192.168.56.30  
- name: z2  
ip: 192.168.56.31  
- name: z3  
ip: 192.168.56.32  
global:  
devname: enp0s3  
memory_limit: 15G  
system_memory: 2G  
stack_size: 512K  
cpu_count: 64  
cache_wash_threshold: 1G  
__min_full_resource_pool_memory: 268435456  
workers_per_cpu_quota: 10  
schema_history_expire_time: 1d  
net_thread_count: 4  
major_freeze_duty_time: Disable  
minor_freeze_times: 10  
enable_separate_sys_clog: 0  
enable_merge_by_turn: FALSE  
datafile_disk_percentage: 20  
syslog_level: INFO  
enable_syslog_recycle: true  
max_syslog_file_count: 4  
cluster_id: 1  
appname: obcluster  
z1:  
mysql_port: 2881  
rpc_port: 2882  
home_path: /home/admin/oceanbase  
data_dir: /data  
redo_dir: /redo  
zone: zone1  
z2:  
mysql_port: 2881  
rpc_port: 2882  
home_path: /home/admin/oceanbase  
data_dir: /data  
redo_dir: /redo  
zone: zone2  
z3:  
mysql_port: 2881  
rpc_port: 2882  
home_path: /home/admin/oceanbase  
data_dir: /data  
redo_dir: /redo  
zone: zone3  
obproxy:  
servers:  
- 192.168.56.22  
global:  
listen_port: 2883  
prometheus_listen_port: 2884  
home_path: /home/admin/obproxy3.2.0  
rs_list: 192.168.56.30:2881;192.168.56.31:2881;192.168.56.32:2881  
enable_cluster_checkout: false  
cluster_name: obcluster  
obproxy_sys_password: obroot123  
observer_sys_password: obroot123  

部署数据库

[admin@obp ~]$ obd cluster deploy obcluster -c ob.yaml  
oceanbase-ce-3.1.2 already installed.  
obproxy-3.2.0 already installed.  
+-------------------------------------------------------------------------------------------+  
| Packages |  
+--------------+---------+-----------------------+------------------------------------------+  
| Repository | Version | Release | Md5 |  
+--------------+---------+-----------------------+------------------------------------------+  
| oceanbase-ce | 3.1.2 | 10000392021123010.el7 | 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed |  
| obproxy | 3.2.0 | 1.el7 | 8d5c6978f988935dc3da1dbec208914668dcf3b2 |  
+--------------+---------+-----------------------+------------------------------------------+  
Repository integrity check ok  
Parameter check ok  
Open ssh connection ok  
Remote oceanbase-ce-3.1.2-7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed repository install ok  
Remote oceanbase-ce-3.1.2-7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed repository lib check ok  
Remote obproxy-3.2.0-8d5c6978f988935dc3da1dbec208914668dcf3b2 repository install ok  
Remote obproxy-3.2.0-8d5c6978f988935dc3da1dbec208914668dcf3b2 repository lib check ok  
Cluster status check ok  
Initializes observer work home ok  
Initializes obproxy work home ok  
obcluster deployed  

启动OB集群

[admin@obp] obd cluster start obcluster  
Get local repositories and plugins ok  
Open ssh connection ok  
Load cluster param plugin ok  
Check before start observer ok  
Check before start obproxy ok  
Start observer ok  
observer program health check ok  
Connect to observer ok  
Initialize cluster  
Cluster bootstrap ok  
Wait for observer init ok  
+-------------------------------------------------+  
| observer |  
+---------------+---------+------+-------+--------+  
| ip | version | port | zone | status |  
+---------------+---------+------+-------+--------+  
| 192.168.56.30 | 3.1.2 | 2881 | zone1 | active |  
| 192.168.56.31 | 3.1.2 | 2881 | zone2 | active |  
| 192.168.56.32 | 3.1.2 | 2881 | zone3 | active |  
+---------------+---------+------+-------+--------+  
  
Start obproxy ok  
obproxy program health check ok  
Connect to obproxy ok  
Initialize cluster  
+-------------------------------------------------+  
| obproxy |  
+---------------+------+-----------------+--------+  
| ip | port | prometheus_port | status |  
+---------------+------+-----------------+--------+  
| 192.168.56.22 | 2883 | 2884 | active |  
+---------------+------+-----------------+--------+  
obcluster running  
  

登录sys租户,创建普通租户tpcc

obclient -h127.1 -P2881 -uroot@sys -c -A oceanbase -p  
MySQL [oceanbase]> create resource unit u1 max_cpu 10,min_cpu 10,max_memory '8G',min_memory '8G',max_iops 10000,min_iops 10000,max_session_num 2000,max_disk_size '6G';  
Query OK, 0 rows affected (0.016 sec)  
  
  
MySQL [oceanbase]> create resource pool p1 unit u1,unit_num 1 ,zone_list=('zone1','zone2','zone3');  
Query OK, 0 rows affected (0.082 sec)  
MySQL [oceanbase]> CREATE TENANT IF NOT EXISTS tpcc charset='utf8mb4', replica_num=1, resource_pool_list=('p1') SET VARIABLES ob_tcp_invited_nodes='%';  
Query OK, 0 rows affected (5.357 sec)  
  

在普通租户下建测试库tpcc

[admin@obp obproxy3.2.0]$ obclient -h127.1 -P2883 -uroot@tpcc -c -A oceanbase -p  
Enter password:  
Welcome to the OceanBase. Commands end with ; or g.  
Your MySQL connection id is 4  
Server version: 5.6.25 OceanBase 3.1.2 (r10000392021123010-d4ace121deae5b81d8f0b40afbc4c02705b7fc1d) (Built Dec 30 2021 02:47:32)  
  
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.  
  
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.  
  
MySQL [oceanbase]> create database tpcc;  
Query OK, 1 row affected (0.118 sec)  
  
MySQL [oceanbase]> grant all on tpcc.* to 'tpcc'@'%' identified by 'tpcc123';  
Query OK, 0 rows affected (0.246 sec)  

测试普通租户下用户登录

[admin@obp obproxy3.2.0]$ obclient -h127.1 -P2883 -utpcc@tpcc -c -ptpcc123 tpcc  
Welcome to the OceanBase. Commands end with ; or g.  
Your MySQL connection id is 7  
Server version: 5.6.25 OceanBase 3.1.2 (r10000392021123010-d4ace121deae5b81d8f0b40afbc4c02705b7fc1d) (Built Dec 30 2021 02:47:32)  
  
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.  
  
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.  
  
MySQL [tpcc]>  

登录sys租户,修改sys超时参数

obclient -uroot@sys -pobroot123 -h127.1 -P2883 -c -A oceanbase  
alter system set ob_query_timeout=36000000000;  
alter system set enable_auto_leader_switch=false;  
alter system set enable_one_phase_commit=false;  
alter system set enable_monotonic_weak_read = true;  
alter system set weak_read_version_refresh_interval='5s';  
alter system _ob_minor_merge_schedule_interval='5s';  
alter system set memory_limit_percentage = 90;  
alter system set memstore_limit_percentage = 55;  
alter system set freeze_trigger_percentage = 70;  
alter system set minor_freeze_times = 50;  
alter system set minor_warm_up_duration_time = 0;  
alter system set merge_thread_count = 32;  
alter system set minor_merge_concurrency = 8;  
alter system set _mini_merge_concurrency = 4;  
 
 
##如果导入阶段开启了限速需要关闭  
alter system set writing_throttling_trigger_percentage=100 tenant=tpcc;  
alter system set writing_throttling_maximum_duration='1h';  
alter system set memstore_limit_percentage = 80;  
alter system set freeze_trigger_percentage = 30;  
alter system set large_query_threshold = '200s';  
alter system set trx_try_wait_lock_timeout = '0ms';  
alter system set cpu_quota_concurrency = 4;  
alter system set minor_warm_up_duration_time = 0;  
alter system set minor_freeze_times=500;  
alter system set minor_compact_trigger=3;  
alter system set sys_bkgd_io_high_percentage = 90;  
alter system set sys_bkgd_io_low_percentage = 70;  
alter system set minor_merge_concurrency =20;  
alter system set builtin_db_data_verify_cycle = 0;  
alter system set trace_log_slow_query_watermark = '10s';  
alter system set gts_refresh_interval='500us';  
alter system set server_permanent_offline_time='36000s';  
alter system set weak_read_version_refresh_interval=0;  
alter system set _ob_get_gts_ahead_interval = '5ms';  
##为频繁空查的宏块建立bloomfilter并缓存,减少磁盘IO和CPU消耗,提升写入性能  
alter system set bf_cache_priority = 10;  
alter system set user_block_cache_priority=5;  
alter system set merge_stat_sampling_ratio = 0;  
##close sql audit  
alter system set enable_sql_audit=false;  
##调整日志级别及保存个数  
alter system set syslog_level='PERF';  
alter system set max_syslog_file_count=100;  
alter system set enable_syslog_recycle='True';  
alter system set ob_enable_batched_multi_statement=true tenant=tpcc;  
alter system set _cache_wash_interval = '1m';  
alter system set plan_cache_evict_interval = '30s';  
alter system set enable_one_phase_commit=false;  
alter system set enable_monotonic_weak_read = false;  
 
MySQL [oceanbase]> select  
-> a.zone,  
-> concat(a.svr_ip, ':', a.svr_port) observer,  
-> cpu_total,  
-> (cpu_total-cpu_assigned) cpu_free,  
-> round(mem_total / 1024 / 1024 / 1024) mem_total_gb,  
-> round((mem_total-mem_assigned)/ 1024 / 1024 / 1024) mem_free_gb,  
-> usec_to_time(b.last_offline_time) last_offline_time,  
-> usec_to_time(b.start_service_time) start_service_time,  
-> b.status,  
-> b.build_version ,  
-> usec_to_time(a.stop_time) stop_time  
-> from  
-> __all_virtual_server_stat a  
-> join __all_server b on  
-> (a.svr_ip = b.svr_ip  
-> and a.svr_port = b.svr_port)  
-> order by  
-> a.zone,  
-> a.svr_ip;  
+-------+--------------------+-----------+----------+--------------+-------------+----------------------------+----------------------------+--------+----------------------------------------------------------------------------------------+----------------------------+  
| zone | observer | cpu_total | cpu_free | mem_total_gb | mem_free_gb | last_offline_time | start_service_time | status | build_version | stop_time |  
+-------+--------------------+-----------+----------+--------------+-------------+----------------------------+----------------------------+--------+----------------------------------------------------------------------------------------+----------------------------+  
| zone1 | 192.168.56.30:2882 | 62 | 49.5 | 13 | 2 | 1970-01-01 08:00:00.000000 | 2022-03-11 09:18:33.362784 | active | 3.1.2_10000392021123010-d4ace121deae5b81d8f0b40afbc4c02705b7fc1d(Dec 30 2021 02:47:32) | 1970-01-01 08:00:00.000000 |  
| zone2 | 192.168.56.31:2882 | 62 | 49.5 | 13 | 2 | 1970-01-01 08:00:00.000000 | 2022-03-11 09:18:36.238512 | active | 3.1.2_10000392021123010-d4ace121deae5b81d8f0b40afbc4c02705b7fc1d(Dec 30 2021 02:47:32) | 1970-01-01 08:00:00.000000 |  
| zone3 | 192.168.56.32:2882 | 62 | 49.5 | 13 | 2 | 1970-01-01 08:00:00.000000 | 2022-03-11 09:18:36.393163 | active | 3.1.2_10000392021123010-d4ace121deae5b81d8f0b40afbc4c02705b7fc1d(Dec 30 2021 02:47:32) | 1970-01-01 08:00:00.000000 |  
+-------+--------------------+-----------+----------+--------------+-------------+----------------------------+----------------------------+--------+----------------------------------------------------------------------------------------+----------------------------+  
3 rows in set (0.028 sec)  
 
MySQL [oceanbase]>  

三、进行测试

准备测试数据

cd /usr/local/share/sysbench  
[root@localhost sysbench]# sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=2883 --mysql-user=tpcc@tpcc --mysql-password='tpcc123' --mysql-db=tpcc --db-driver=mysql --tables=15 --table-size=50000 --report-interval=10 --threads=128 --time=120 prepare  
sysbench 1.1.0-df89d34 (using bundled LuaJIT 2.1.0-beta3)  
  
Initializing worker threads...  

运行测试

[root@localhost sysbench]# sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=2883 --mysql-user=tpcc@tpcc --mysql-password='tpcc123' --mysql-db=tpcc --db-driver=mysql --tables=15 --table-size=50000 --report-interval=10 --threads=128 --time=120 --db-ps-mode=disable run  
sysbench 1.1.0-df89d34 (using bundled LuaJIT 2.1.0-beta3)  
  
Running the test with following options:  
Number of threads: 128  
Report intermediate results every 10 second(s)  
Initializing random number generator from current time  
  
Initializing worker threads...  
Threads started!  
[ 10s ] thds: 128 tps: 81.26 qps: 1789.59 (r/w/o: 1276.43/337.85/175.32) lat (ms,95%): 2082.91 err/s: 0.00 reconn/s: 0.00  
[ 20s ] thds: 128 tps: 90.70 qps: 1816.48 (r/w/o: 1273.58/361.50/181.40) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00  
[ 30s ] thds: 128 tps: 92.41 qps: 1849.77 (r/w/o: 1291.52/373.43/184.82) lat (ms,95%): 1836.24 err/s: 0.00 reconn/s: 0.00  
[ 40s ] thds: 128 tps: 92.30 qps: 1840.77 (r/w/o: 1290.18/365.99/184.60) lat (ms,95%): 1973.38 err/s: 0.00 reconn/s: 0.00  
[ 50s ] thds: 128 tps: 88.40 qps: 1780.10 (r/w/o: 1247.20/356.10/176.80) lat (ms,95%): 1938.16 err/s: 0.00 reconn/s: 0.00  
[ 60s ] thds: 128 tps: 91.69 qps: 1834.15 (r/w/o: 1286.90/363.87/183.39) lat (ms,95%): 1869.60 err/s: 0.00 reconn/s: 0.00  
[ 70s ] thds: 128 tps: 92.50 qps: 1828.50 (r/w/o: 1275.27/368.22/185.01) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00  
[ 80s ] thds: 128 tps: 92.30 qps: 1857.70 (r/w/o: 1301.90/371.20/184.60) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00  
[ 90s ] thds: 128 tps: 92.60 qps: 1849.84 (r/w/o: 1294.22/370.41/185.20) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00  
[ 100s ] thds: 128 tps: 92.00 qps: 1850.59 (r/w/o: 1297.19/369.40/184.00) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00  
[ 110s ] thds: 128 tps: 92.49 qps: 1847.28 (r/w/o: 1292.94/369.36/184.98) lat (ms,95%): 1869.60 err/s: 0.00 reconn/s: 0.00  
[ 120s ] thds: 128 tps: 91.51 qps: 1829.80 (r/w/o: 1281.24/365.64/182.92) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00  
SQL statistics:  
queries performed:  
read: 154406  
write: 44116  
other: 22058  
total: 220580  
transactions: 11029 (91.07 per sec.)  
queries: 220580 (1821.31 per sec.)  
ignored errors: 0 (0.00 per sec.)  
reconnects: 0 (0.00 per sec.)  
  
Throughput:  
events/s (eps): 91.0654  
time elapsed: 121.1108s  
total number of events: 11029  
  
Latency (ms):  
min: 498.62  
avg: 1399.76  
max: 3432.97  
95th percentile: 1903.57  
sum: 15437956.99  
  
Threads fairness:  
events (avg/stddev): 86.1641/2.06  
execution time (avg/stddev): 120.6090/0.30  

清理测试数据

sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=2883 --mysql-user=tpcc@tpcc --mysql-password='tpcc123' --mysql-db=tpcc --db-driver=mysql --tables=15 --table-size=50000 --report-interval=10 --threads=128 --time=120 cleanup

用obd带的sysbench测试

[admin@obp ~]$ obd test sysbench obcluster --threads=128 --time=120 --tables=15 --table-size=50000 --interval=10 --user=tpcc --password=tpcc123 --tenant=tpcc --database=tpcc --sysbench-bin=/usr/local/bin/sysbench --sysbench-script-dir=/usr/local/share/sysbench --script-name=oltp_read_write.lua  
Get local repositories and plugins ok  
Open ssh connection ok  
Cluster status check ok  
Connect obproxy(192.168.56.22:2883) ok  
Connect obproxy(192.168.56.22:2883) ok  
sysbench 1.1.0-df89d34 (using bundled LuaJIT 2.1.0-beta3)  
  
Running the test with following options:  
Number of threads: 128  
Report intermediate results every 10 second(s)  
Initializing random number generator from current time  
Initializing worker threads...  
Threads started!  
[ 10s ] thds: 128 tps: 84.48 qps: 1855.21 (r/w/o: 1323.02/350.43/181.76) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00  
[ 20s ] thds: 128 tps: 91.60 qps: 1844.78 (r/w/o: 1291.56/370.02/183.21) lat (ms,95%): 1869.60 err/s: 0.00 reconn/s: 0.00  
[ 30s ] thds: 128 tps: 93.80 qps: 1873.32 (r/w/o: 1311.14/374.58/187.59) lat (ms,95%): 1836.24 err/s: 0.00 reconn/s: 0.00  
[ 40s ] thds: 128 tps: 92.51 qps: 1849.55 (r/w/o: 1296.30/368.23/185.01) lat (ms,95%): 1836.24 err/s: 0.00 reconn/s: 0.00  
[ 50s ] thds: 128 tps: 95.40 qps: 1890.74 (r/w/o: 1320.43/379.51/190.80) lat (ms,95%): 1836.24 err/s: 0.00 reconn/s: 0.00  
[ 60s ] thds: 128 tps: 92.49 qps: 1868.60 (r/w/o: 1310.93/372.68/184.99) lat (ms,95%): 1836.24 err/s: 0.00 reconn/s: 0.00  
[ 70s ] thds: 128 tps: 93.51 qps: 1859.23 (r/w/o: 1298.89/373.33/187.01) lat (ms,95%): 1803.47 err/s: 0.00 reconn/s: 0.00  
[ 80s ] thds: 128 tps: 92.59 qps: 1859.79 (r/w/o: 1303.72/370.88/185.19) lat (ms,95%): 1869.60 err/s: 0.00 reconn/s: 0.00  
[ 90s ] thds: 128 tps: 95.00 qps: 1883.90 (r/w/o: 1319.97/373.92/190.01) lat (ms,95%): 1836.24 err/s: 0.00 reconn/s: 0.00  
[ 100s ] thds: 128 tps: 93.29 qps: 1888.90 (r/w/o: 1321.16/381.16/186.58) lat (ms,95%): 1771.29 err/s: 0.00 reconn/s: 0.00  
[ 110s ] thds: 128 tps: 93.91 qps: 1875.90 (r/w/o: 1311.54/376.54/187.82) lat (ms,95%): 1836.24 err/s: 0.00 reconn/s: 0.00  
[ 120s ] thds: 128 tps: 94.40 qps: 1871.18 (r/w/o: 1311.88/370.50/188.80) lat (ms,95%): 1869.60 err/s: 0.00 reconn/s: 0.00  
SQL statistics:  
queries performed:  
read: 157612  
write: 45032  
other: 22516  
total: 225160  
transactions: 11258 (92.82 per sec.)  
queries: 225160 (1856.42 per sec.)  
ignored errors: 0 (0.00 per sec.)  
reconnects: 0 (0.00 per sec.)  
Throughput:  
events/s (eps): 92.8212  
time elapsed: 121.2869s  
total number of events: 11258  
Latency (ms):  
min: 396.69  
avg: 1372.27  
max: 3611.86  
95th percentile: 1836.24  
sum: 15449017.41  
Threads fairness:  
events (avg/stddev): 87.9531/1.84  
execution time (avg/stddev): 120.6954/0.32  

二者结果差不多

最后修改时间:2023-04-02 21:58:10
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论