Mysql-Cluster

  • Category: 電腦相關
  • Last Updated: Saturday, 22 July 2017 12:56
  • Published: Thursday, 20 July 2017 12:11
  • Written by sam

Mysql-Cluster

最小cluster要求,三臺主機

10.0.252.140 MGM

10.0.252.141 SQL NODE, DATA NODE

10.0.252.142 SQL NODE, DATA NODE

[root@CT1140 bin]# wget https://xxxxxx/mysql-cluster-gpl-7.5.6-linux-glibc2.5-x86_64.tar.gz
[root@CT1140 bin]# tar zxf mysql-cluster-gpl-7.5.6-linux-glibc2.5-x86_64.tar.gz
[root@CT1140 bin]# mv mysql-cluster-gpl-7.5.6-linux-glibc2.5-x86_64 /usr/local/mysql

以上是每臺都要做的

 

[root@CT1140 bin]# mkdir /var/lib/mysql-cluster
[root@CT1140 bin]# vi /var/lib/mysql-cluster/config.ini
[ndb_mgmd default]
datadir=/var/lib/mysql-cluster

[ndbd default]
NoOfReplicas=3
DataMemory=4096M
IndexMemory=1024M
datadir=/usr/local/mysql/data

[ndb_mgmd]
NodeId=1
hostname=10.0.252.140

[ndbd]
NodeId=2
hostname=10.0.252.141

[ndbd]
NodeId=3
hostname=10.0.252.142

[mysqld]
NodeId=4
hostname=10.0.252.141

[mysqld]
NodeId=5
hostname=10.0.252.142

[ndbd]
NodeId=6
hostname=10.0.252.143

[mysqld]
NodeId=7
hostname=10.0.252.143

當然…架構又改了,多了一臺

[root@CT1140 bin]# cp -rp /usr/local/mysql/bin/ndb_mgm* /usr/local/bin/
[root@CT1140 bin]# chmod +x /usr/local/bin/ndb_mgm*

SQL NODE, DATA NODE

因為我都是放一起,所以設定檔相同

[root@CT1142 bin]# cat /etc/my.cnf
[mysqld]
ndbcluster
ndb-connectstring=10.0.252.140:1186

[mysql_cluster]
ndb-connectstring=10.0.252.140:1186

[mysqld]
datadir=/usr/local/mysql/data
socket=/usr/local/mysql/data/mysql.sock
#socket=/var/lib/mysql/mysql.sock
user=mysql
#skip-grant-tables
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

default_storage_engine=ndbcluster

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[client]
socket=/usr/local/mysql/data/mysql.sock
[root@CT1142 bin]# useradd -d /usr/local/mysql mysql
[root@CT1142 bin]# cd /usr/local/mysql
[root@CT1142 bin]# chown -R mysql:mysql .

SQL NODES

[root@CT1142 bin]#cd /usr/local/mysql/bin
[root@CT1142 bin]#./mysqld --initialize --user=mysql

目前新版都會告訴你"預設密碼"而不是空白了

2017-07-20T03:11:20.458099Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-07-20T03:11:20.460046Z 1 [Note] A temporary password is generated for root@localhost: Vkc1SB:9#gDQ

或是真的找不到請重設

MANAGER NODE

[root@CT1140 bin]# ndb_mgmd --nodaemon -v -f /var/lib/mysql-cluster/config.ini

DATA NODE

[root@CT1140 bin]# /usr/local/mysql/bin/ndbd --defaults-file=/etc/my.cnf -v --initial (first time)

SQL NODE

[root@CT1140 bin]# /etc/init.d/mysql.server start

報錯的話請ln一下

[root@CT1143 bin]# ln -s /usr/local/mysql/data/mysql.sock /var/lib/mysql/

到MANAGER NODE

[root@CT1140 bin]# ndb_mgm -e show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]	3 node(s)
id=2	@10.0.252.141  (mysql-5.7.18 ndb-7.5.6, Nodegroup: 0, *)
id=3	@10.0.252.142  (mysql-5.7.18 ndb-7.5.6, Nodegroup: 0)
id=6	@10.0.252.143  (mysql-5.7.18 ndb-7.5.6, Nodegroup: 0)

[ndb_mgmd(MGM)]	1 node(s)
id=1	@10.0.252.140  (mysql-5.7.18 ndb-7.5.6)

[mysqld(API)]	3 node(s)
id=4	@10.0.252.141  (mysql-5.7.18 ndb-7.5.6)
id=5	@10.0.252.142  (mysql-5.7.18 ndb-7.5.6)
id=7	@10.0.252.143  (mysql-5.7.18 ndb-7.5.6)

這樣就是正常了,異常的話會顯示 not connect

先試同步功能

mysql> CREATE DATABASE test;
mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| ndb_2_fs           |
| ndbinfo            |
| performance_schema |
| sys                |
| test               |
+--------------------+
7 rows in set (0.00 sec)

到每臺檢臺是否有同步成功

再來是測試安裝mysql-proxy 可以集中管理並順便測試一下sysbench

[root@CT1140 bin]# cat /etc/mysql-proxy.conf
[mysql-proxy]
daemon = true
proxy-address = 10.0.252.140:3306
proxy-skip-profiling = true
keepalive = true
event-threads = 50
pid-file = /var/run/mysql-proxy.pid
log-file = /var/log/mysql-proxy.log
log-level = debug
proxy-backend-addresses = 10.0.252.141:3306,10.0.252.142:3306,10.0.252.143:3306
proxy-lua-script=/root/mysql-proxy-0.8.5-linux-glibc2.3-x86-64bit/lib/mysql-proxy/lua/proxy/balance.lua

啟動mysql-proxy

[root@CT1140 bin]# chmod 0660 /etc/mysql-proxy.conf
[root@CT1140 bin]# ./mysql-proxy --defaults-file=/etc/mysql-proxy.conf &;

為了作到proxy功能,也要修改該帳號可以從任何地方連線(當然特定目標是比較好的選項)

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456';

完成後記得重啟mysqld

結果

寫到mysql-proxy

[ 10s ] thds: 4 tps: 156.60 qps: 3145.82 (r/w/o: 2203.71/628.00/314.10) lat (ms,95%): 42.61 err/s: 0.50 reconn/s: 0.00
[ 20s ] thds: 4 tps: 145.25 qps: 2910.32 (r/w/o: 2038.91/580.50/290.90) lat (ms,95%): 46.63 err/s: 0.40 reconn/s: 0.00
[ 30s ] thds: 4 tps: 145.70 qps: 2922.26 (r/w/o: 2046.17/584.29/291.80) lat (ms,95%): 44.17 err/s: 0.40 reconn/s: 0.00
[ 40s ] thds: 4 tps: 139.17 qps: 2786.08 (r/w/o: 1950.97/556.58/278.54) lat (ms,95%): 49.21 err/s: 0.20 reconn/s: 0.00
[ 50s ] thds: 4 tps: 146.83 qps: 2941.14 (r/w/o: 2059.65/587.53/293.96) lat (ms,95%): 48.34 err/s: 0.30 reconn/s: 0.00
[ 60s ] thds: 4 tps: 147.11 qps: 2946.10 (r/w/o: 2062.97/588.62/294.51) lat (ms,95%): 45.79 err/s: 0.30 reconn/s: 0.00

指定某臺mysql 主機 141

[ 10s ] thds: 4 tps: 411.98 qps: 8263.03 (r/w/o: 5788.54/1649.03/825.46) lat (ms,95%): 16.41 err/s: 1.10 reconn/s: 0.00
[ 20s ] thds: 4 tps: 407.87 qps: 8177.99 (r/w/o: 5727.07/1633.78/817.14) lat (ms,95%): 16.41 err/s: 1.40 reconn/s: 0.00
[ 30s ] thds: 4 tps: 414.62 qps: 8317.25 (r/w/o: 5826.35/1660.27/830.64) lat (ms,95%): 16.71 err/s: 1.50 reconn/s: 0.00
[ 40s ] thds: 4 tps: 411.32 qps: 8239.40 (r/w/o: 5769.81/1646.06/823.53) lat (ms,95%): 16.71 err/s: 0.80 reconn/s: 0.00
[ 50s ] thds: 4 tps: 418.30 qps: 8373.86 (r/w/o: 5863.14/1673.51/837.21) lat (ms,95%): 16.12 err/s: 0.60 reconn/s: 0.00
[ 60s ] thds: 4 tps: 389.10 qps: 7794.95 (r/w/o: 5458.36/1557.59/778.99) lat (ms,95%): 17.63 err/s: 0.80 reconn/s: 0.00

指定某臺mysql 主機 142

[ 10s ] thds: 4 tps: 423.26 qps: 8489.20 (r/w/o: 5946.24/1694.84/848.12) lat (ms,95%): 16.41 err/s: 1.20 reconn/s: 0.00
[ 20s ] thds: 4 tps: 409.21 qps: 8201.46 (r/w/o: 5743.09/1638.95/819.43) lat (ms,95%): 16.41 err/s: 1.00 reconn/s: 0.00
[ 30s ] thds: 4 tps: 426.50 qps: 8548.61 (r/w/o: 5987.74/1706.68/854.19) lat (ms,95%): 15.55 err/s: 1.30 reconn/s: 0.00
[ 40s ] thds: 4 tps: 434.30 qps: 8703.39 (r/w/o: 6095.86/1737.82/869.71) lat (ms,95%): 16.12 err/s: 1.00 reconn/s: 0.00
[ 50s ] thds: 4 tps: 407.20 qps: 8167.31 (r/w/o: 5719.90/1631.60/815.80) lat (ms,95%): 16.41 err/s: 1.40 reconn/s: 0.00
[ 60s ] thds: 4 tps: 408.90 qps: 8195.62 (r/w/o: 5740.14/1636.68/818.79) lat (ms,95%): 17.01 err/s: 1.00 reconn/s: 0.00
[ 70s ] thds: 4 tps: 408.70 qps: 8193.82 (r/w/o: 5738.21/1637.00/818.60) lat (ms,95%): 17.01 err/s: 1.20 reconn/s: 0.00

指定本機

[ 10s ] thds: 4 tps: 444.68 qps: 8913.00 (r/w/o: 6242.12/1780.32/890.56) lat (ms,95%): 15.83 err/s: 0.80 reconn/s: 0.00
[ 20s ] thds: 4 tps: 445.30 qps: 8916.82 (r/w/o: 6243.02/1782.50/891.30) lat (ms,95%): 15.27 err/s: 0.70 reconn/s: 0.00
[ 30s ] thds: 4 tps: 442.03 qps: 8850.24 (r/w/o: 6196.75/1768.83/884.66) lat (ms,95%): 15.83 err/s: 0.60 reconn/s: 0.00
[ 40s ] thds: 4 tps: 437.27 qps: 8764.64 (r/w/o: 6138.84/1750.07/875.73) lat (ms,95%): 15.55 err/s: 1.20 reconn/s: 0.00
[ 50s ] thds: 4 tps: 464.30 qps: 9300.21 (r/w/o: 6512.44/1858.08/929.69) lat (ms,95%): 15.27 err/s: 1.10 reconn/s: 0.00
[ 60s ] thds: 4 tps: 442.90 qps: 8876.81 (r/w/o: 6217.11/1772.90/886.80) lat (ms,95%): 16.41 err/s: 1.00 reconn/s: 0.00

相同mysql版本,但無安裝cluster的測試

[ 10s ] thds: 4 tps: 663.50 qps: 13293.68 (r/w/o: 9308.65/2656.62/1328.41) lat (ms,95%): 9.39 err/s: 1.00 reconn/s: 0.00
[ 20s ] thds: 4 tps: 681.51 qps: 13656.10 (r/w/o: 9564.31/2727.06/1364.73) lat (ms,95%): 9.39 err/s: 1.70 reconn/s: 0.00
[ 30s ] thds: 4 tps: 690.29 qps: 13832.61 (r/w/o: 9687.27/2762.96/1382.38) lat (ms,95%): 8.58 err/s: 1.80 reconn/s: 0.00
[ 40s ] thds: 4 tps: 644.30 qps: 12897.57 (r/w/o: 9030.68/2577.69/1289.20) lat (ms,95%): 10.27 err/s: 0.60 reconn/s: 0.00
[ 50s ] thds: 4 tps: 661.12 qps: 13236.56 (r/w/o: 9267.75/2645.67/1323.14) lat (ms,95%): 9.91 err/s: 0.90 reconn/s: 0.00
[ 60s ] thds: 4 tps: 662.39 qps: 13265.33 (r/w/o: 9289.01/2650.45/1325.87) lat (ms,95%): 9.22 err/s: 1.10 reconn/s: 0.00

測試指令

[root@CT1142 bin]# sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-host=10.0.252.142 --db-driver=mysql --mysql-db=test --mysql-user=root --mysql-password=123456 --num-threads=4 --report-interval=10 --max-time=3600 run

主機規格都相同4core 8Gram 8Gdisk No Swap space.

測試多一些連線數

錯誤

2017-07-20T06:37:53.241586Z 2082 [Note] Aborted connection 2082 to db: 'test1' user: 'root' host: '10.0.252.140' (Got an error reading communication packets)
2017-07-20T06:37:53.215000Z 2064 [Note] Aborted connection 2064 to db: 'test1' user: 'root' host: '10.0.252.140' (Got an error reading communication packets)
2017-07-20T06:37:53.242702Z 2010 [Note] Aborted connection 2010 to db: 'test1' user: 'root' host: '10.0.252.140' (Got an error reading communication packets)
2017-07-20T06:37:53.243773Z 2015 [Note] Aborted connection 2015 to db: 'test1' user: 'root' host: '10.0.252.140' (Got an error reading communication packets)
2017-07-20T06:37:53.244269Z 2037 [Note] Aborted connection 2037 to db: 'test1' user: 'root' host: '10.0.252.140' (Got an error reading communication packets)
mysql> show variables like "max_connections";
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+
1 row in set (0.00 sec)

再修改在my.cnf即可

max_connections = 20000

mysql-proxy config

error log

[root@CT1140 bin]# tail -f /var/log/mysql-proxy.log
2017-07-20 07:03:07: (debug) max open file-descriptors = 1024
2017-07-20 07:03:07: (message) proxy listening on port 10.0.252.140:3306
2017-07-20 07:03:07: (message) added read/write backend: 10.0.252.141:3306
2017-07-20 07:03:07: (message) added read/write backend: 10.0.252.142:3306
2017-07-20 07:03:07: (message) added read/write backend: 10.0.252.143:3306
2017-07-20 07:03:07: (critical) (libevent) evsig_init: socketpair: Too many open files
2017-07-20 07:03:07: (debug) chassis-unix-daemon.c:167: 1450 returned: 1450
2017-07-20 07:03:07: (message) chassis-unix-daemon.c:176: [angel] PID=1450 exited normally with exit-code = 1 (it used 4 kBytes max)
2017-07-20 07:03:07: (message) Initiating shutdown, requested from mysql-proxy-cli.c:273
2017-07-20 07:03:07: (message) shutting down normally, exit code is: 1
max-open-files = 
event-threads = 

for temp

[root@CT1140 bin]# ulimit -n 65534

正常了

[root@CT1140 bin]# tail -f /var/log/mysql-proxy.log
2017-07-20 07:14:32: (critical) mysql-proxy-cli.c:599: Failure from chassis_mainloop. Shutting down.
2017-07-20 07:14:32: (message) Initiating shutdown, requested from mysql-proxy-cli.c:600
2017-07-20 07:14:32: (message) shutting down normally, exit code is: 1
2017-07-20 07:18:44: (critical) plugin proxy 0.8.5 started
2017-07-20 07:18:44: (debug) max open file-descriptors = 65500
2017-07-20 07:18:44: (message) proxy listening on port 10.0.252.140:3306
2017-07-20 07:18:44: (message) added read/write backend: 10.0.252.141:3306
2017-07-20 07:18:44: (message) added read/write backend: 10.0.252.142:3306
2017-07-20 07:18:44: (message) added read/write backend: 10.0.252.143:3306
2017-07-20 07:18:46: (message) chassis-event-thread.c:491: starting 9999 threads

發現自建db及table會同步

但用sysbench的資料卻沒有…那它怎麼測的

先看一下Engine

[root@CT1143 ~]# /usr/local/mysql/bin/mysql -p123456 -D TEST -e "SHOW TABLE STATUS WHERE Name = 'sbtest1'"
mysql: [Warning] Using a password on the command line interface can be insecure.
+---------+------------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-------------------+----------+----------------+---------+
| Name    | Engine     | Version | Row_format | Rows  | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation         | Checksum | Create_options | Comment |
+---------+------------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-------------------+----------+----------------+---------+
| sbtest1 | InnoDB |      10 | Fixed      | 10000 |            212 |     2195456 |               0 |            0 |         0 |          10001 | NULL        | NULL        | NULL       | latin1_swedish_ci |     NULL | partitioned    |         |
+---------+------------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-------------------+----------+----------------+---------+

修改它

[root@CT1143 ~]# /usr/local/mysql/bin/mysql -p123456 -D TEST -e "ALTER TABLE sbtest1 ENGINE = ndbcluster;"

去別臺看一下

[root@CT1142 ~]# /usr/local/mysql/bin/mysql -p123456 -D TEST -e "SELECT COUNT(*) from sbtest1"
mysql: [Warning] Using a password on the command line interface can be insecure.
+----------+
| COUNT(*) |
+----------+
|    10000 |
+----------+

再換成mysql router

config

[DEFAULT]
logging_folder = /var/log/mysql-route
plugin_folder = /usr/local/mysql-router/lib/mysqlrouter
config_folder = /etc
runtime_folder = /var/run

[logger]
level = INFO

#[routing:basic_failover]
#bind_address = 10.0.252.140
#bind_port = 3307
#mode = read-write
#destinations = 10.0.252.142:3306,10.0.252.143:3306,10.0.252.141:3306

[routing:balancing]
bind_address = 10.0.252.140
bind_port = 3306
connect_timeout = 3
max_connections = 1024
destinations = 10.0.242.143:3306,10.0.252.141:3306,10.0.252.142:3306
mode = read-write

[keepalive]
interval = 60

結果很慘、很慢,其它就不試了 120 threads

[ 760s ] thds: 120 tps: 27.10 qps: 1253.50 (r/w/o: 1009.40/144.90/99.20) lat (ms,95%): 10343.39 err/s: 45.00 reconn/s: 0.00
[ 770s ] thds: 120 tps: 27.00 qps: 1231.90 (r/w/o: 989.80/144.40/97.70) lat (ms,95%): 12163.09 err/s: 43.70 reconn/s: 0.00
[ 780s ] thds: 120 tps: 28.30 qps: 1217.90 (r/w/o: 974.90/144.60/98.40) lat (ms,95%): 13550.80 err/s: 41.80 reconn/s: 0.00
[ 790s ] thds: 120 tps: 31.30 qps: 1316.11 (r/w/o: 1050.90/159.30/105.90) lat (ms,95%): 10531.32 err/s: 43.30 reconn/s: 0.00
[ 800s ] thds: 120 tps: 30.20 qps: 1295.19 (r/w/o: 1034.75/156.32/104.11) lat (ms,95%): 11523.48 err/s: 43.71 reconn/s: 0.00
[ 810s ] thds: 120 tps: 27.50 qps: 1257.50 (r/w/o: 1012.20/145.50/99.80) lat (ms,95%): 11317.84 err/s: 44.80 reconn/s: 0.00

8 treads

[ 10s ] thds: 8 tps: 245.03 qps: 4913.61 (r/w/o: 3441.62/981.12/490.86) lat (ms,95%): 59.99 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 8 tps: 154.11 qps: 3090.54 (r/w/o: 2164.79/616.83/308.91) lat (ms,95%): 62.19 err/s: 0.70 reconn/s: 0.00
[ 30s ] thds: 8 tps: 178.90 qps: 3590.21 (r/w/o: 2515.01/716.70/358.50) lat (ms,95%): 55.82 err/s: 0.70 reconn/s: 0.00
[ 40s ] thds: 8 tps: 185.89 qps: 3722.40 (r/w/o: 2606.33/743.88/372.19) lat (ms,95%): 63.32 err/s: 0.40 reconn/s: 0.00
[ 50s ] thds: 8 tps: 177.94 qps: 3562.29 (r/w/o: 2494.12/712.08/356.09) lat (ms,95%): 71.83 err/s: 0.20 reconn/s: 0.00
[ 60s ] thds: 8 tps: 187.36 qps: 3751.67 (r/w/o: 2625.99/750.75/374.93) lat (ms,95%): 58.92 err/s: 0.20 reconn/s: 0.00
read-only
直接指定主機
[ 10s ] thds: 8 tps: 328.78 qps: 5267.44 (r/w/o: 4609.08/0.00/658.35) lat (ms,95%): 44.98 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 8 tps: 387.36 qps: 6199.27 (r/w/o: 5424.54/0.00/774.72) lat (ms,95%): 36.24 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 8 tps: 346.42 qps: 5542.58 (r/w/o: 4849.74/0.00/692.83) lat (ms,95%): 43.39 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 8 tps: 387.25 qps: 6195.23 (r/w/o: 5420.74/0.00/774.49) lat (ms,95%): 34.95 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 8 tps: 373.00 qps: 5966.28 (r/w/o: 5220.29/0.00/746.00) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 8 tps: 392.17 qps: 6275.87 (r/w/o: 5491.52/0.00/784.35) lat (ms,95%): 36.89 err/s: 0.00 reconn/s: 0.00
透過mysql-router
[ 10s ] thds: 8 tps: 342.65 qps: 5488.53 (r/w/o: 4802.42/0.00/686.10) lat (ms,95%): 43.39 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 8 tps: 359.03 qps: 5745.64 (r/w/o: 5027.58/0.00/718.05) lat (ms,95%): 40.37 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 8 tps: 340.87 qps: 5453.10 (r/w/o: 4771.35/0.00/681.75) lat (ms,95%): 46.63 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 8 tps: 327.61 qps: 5241.74 (r/w/o: 4586.52/0.00/655.22) lat (ms,95%): 49.21 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 8 tps: 354.60 qps: 5676.00 (r/w/o: 4966.80/0.00/709.20) lat (ms,95%): 43.39 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 8 tps: 359.94 qps: 5756.61 (r/w/o: 5036.72/0.00/719.89) lat (ms,95%): 38.94 err/s: 0.00 reconn/s: 0.00
指定本機
[ 10s ] thds: 8 tps: 409.17 qps: 6554.49 (r/w/o: 5735.35/0.00/819.14) lat (ms,95%): 33.12 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 8 tps: 449.82 qps: 7196.25 (r/w/o: 6296.71/0.00/899.54) lat (ms,95%): 29.72 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 8 tps: 453.38 qps: 7253.73 (r/w/o: 6346.88/0.00/906.85) lat (ms,95%): 27.66 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 8 tps: 415.62 qps: 6650.75 (r/w/o: 5819.51/0.00/831.24) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 8 tps: 441.80 qps: 7065.91 (r/w/o: 6182.30/0.00/883.60) lat (ms,95%): 27.17 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 8 tps: 458.58 qps: 7339.02 (r/w/o: 6421.85/0.00/917.16) lat (ms,95%): 26.68 err/s: 0.00 reconn/s: 0.00
指定本機且無mysql-cluster(少了複寫,多很多效能)
[ 10s ] thds: 8 tps: 1587.81 qps: 25415.52 (r/w/o: 22239.09/0.00/3176.43) lat (ms,95%): 6.79 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 8 tps: 1626.98 qps: 26029.99 (r/w/o: 22776.13/0.00/3253.86) lat (ms,95%): 6.21 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 8 tps: 1540.81 qps: 24652.20 (r/w/o: 21570.47/0.00/3081.72) lat (ms,95%): 6.91 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 8 tps: 1609.52 qps: 25750.89 (r/w/o: 22531.84/0.00/3219.05) lat (ms,95%): 6.21 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 8 tps: 1644.00 qps: 26307.26 (r/w/o: 23019.26/0.00/3288.01) lat (ms,95%): 6.21 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 5 tps: 1604.99 qps: 25675.08 (r/w/o: 22465.49/0.00/3209.58) lat (ms,95%): 6.21 err/s: 0.00 reconn/s: 0.00