# 已有test庫的話先drop掉 drop database test; create database test; # prepare準備階段,構建壓測環境 sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/select.lua \ --oltp-table-size=20000 --mysql-table-engine=innodb --db-driver=mysql \ --mysql-user=root --mysql-password=root123 --mysql-port=3306 \ --mysql-host=10.245.231.202 --mysql-db=test \ --events=0 --time=60 --oltp-tables-count=20 --report-interval=10 --threads=2 prepare # 開始壓測 sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/select.lua \ --oltp-table-size=20000 --mysql-table-engine=innodb --db-driver=mysql \ --mysql-user=root --mysql-password=root123 --mysql-port=3306 \ --mysql-host=10.245.231.202 --mysql-db=test \ --events=0 --time=60 --oltp-tables-count=20 --report-interval=10 --threads=2 run sysbench 1.0.5 (using bundled LuaJIT 2.1.0-beta2) Running the test with following options: Number of threads: 2 Report intermediate results every 10 second(s) Initializing random number generator from current time Initializing worker threads... Threads started! [ 10s ] thds: 2 tps: 8087.29 qps: 8087.29 (r/w/o: 8087.29/0.00/0.00) lat (ms,95%): 0.34 err/ s: 0.00 reconn/s: 0.00 [ 20s ] thds: 2 tps: 6949.28 qps: 6949.28 (r/w/o: 6949.28/0.00/0.00) lat (ms,95%): 0.35 err/ s: 0.00 reconn/s: 0.00 [ 30s ] thds: 2 tps: 7251.71 qps: 7251.71 (r/w/o: 7251.71/0.00/0.00) lat (ms,95%): 0.34 err/ s: 0.00 reconn/s: 0.00 [ 40s ] thds: 2 tps: 6927.19 qps: 6927.19 (r/w/o: 6927.19/0.00/0.00) lat (ms,95%): 0.35 err/ s: 0.00 reconn/s: 0.00 [ 50s ] thds: 2 tps: 7387.64 qps: 7387.64 (r/w/o: 7387.64/0.00/0.00) lat (ms,95%): 0.32 err/ s: 0.00 reconn/s: 0.00 [ 60s ] thds: 2 tps: 10171.21 qps: 10171.21 (r/w/o: 10171.21/0.00/0.00) lat (ms,95%): 0.26 err/ s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 467780 write: 0 other: 0 total: 467780 transactions: 467780 (7795.29 per sec.) queries: 467780 (7795.29 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.) General statistics: total time: 60.0008s total number of events: 467780 Latency (ms): min: 0.11 avg: 0.25 max: 27.63 95th percentile: 0.34 sum: 119092.82 Threads fairness: events (avg/stddev): 233890.0000/242.00 execution time (avg/stddev): 59.5464/0.00 |
[mysql@mydb1 ~]$ ./orzdba -lazy
.=================================================. | Welcome to use the orzdba tool ! | | Yep...Chinese English~ | '=============== Date : 2017-08-20 ===============' HOST: mydb1 IP: 10.245.231.202 DB : lyj|performance_schema Var : port[3306] read_only[OFF] version[5.6.35-log] binlog_format[ROW] max_binlog_cache_size[4G] max_binlog_size[500M] max_connect_errors[100] max_connections[214] max_user_connections[2800] open_files_limit[1024] sync_binlog[100] table_definition_cache[600] table_open_cache[400] thread_cache_size[10] innodb_adaptive_flushing[ON] innodb_adaptive_hash_index[ON] innodb_buffer_pool_instances[8] innodb_buffer_pool_size[4G] innodb_file_per_table[ON] innodb_flush_log_at_trx_commit[1] innodb_flush_method[O_DIRECT] innodb_io_capacity[1000] innodb_lock_wait_timeout[10] innodb_log_buffer_size[64M] innodb_log_file_size[1000M] innodb_log_files_in_group[4] innodb_max_dirty_pages_pct[60] innodb_open_files[400] innodb_read_io_threads[4] innodb_stats_on_metadata[OFF] innodb_thread_concurrency[0] innodb_write_io_threads[10] -------- -----load-avg---- ---cpu-usage--- ---swap--- -QPS- -TPS- -Hit%- ------threads------ time | 1m 5m 15m |usr sys idl iow| si so| ins upd del sel iud| lor hit| run con cre cac| 15:51:25| 0.07 0.04 0.05| 0 0 100 0| 0 0| 0 0 0 0 0| 0 100.00| 0 0 0 0| 15:51:28| 0.14 0.06 0.05| 8 2 90 0| 0 0| 0 0 0 7178 0| 15417 100.00| 3 4 0 0| 15:51:31| 0.13 0.06 0.05| 6 3 91 0| 0 0| 0 0 0 6757 0| 14528 100.00| 4 4 0 0| 15:51:34| 0.13 0.06 0.05| 7 2 91 0| 0 0| 0 0 0 6679 0| 14342 100.00| 4 4 0 0| 15:51:37| 0.12 0.06 0.05| 7 3 90 0| 0 0| 0 0 0 7569 0| 16285 100.00| 2 4 0 0| 15:51:40| 0.12 0.06 0.05| 8 2 90 0| 0 0| 0 0 0 7298 0| 15707 100.00| 3 4 0 0| 15:51:43| 0.19 0.07 0.06| 8 2 90 0| 0 0| 0 0 |