Percona的mysql 5.5.33和mysql 5.6.14效能測試對比:
系統為:rhel 5.5,
測試載入器:sysbench
CPU為2核,超執行緒,4個邏輯CPU
innodb_buffer_pool_size配置為1G,串連數配置1000
每種資料測試時間:30分鐘
由於我的io處理有限,所以在提交時不重新整理日誌.querycache設定為禁用.
mysql> show global variables like '%innodb_flush_log_at_trx_commit%';
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| innodb_flush_log_at_trx_commit | 0 |
+--------------------------------+-------+
1 row in set (0.00 sec)
mysql> show global variables like '%query_cache%';
+------------------------------+---------+
| Variable_name | Value |
+------------------------------+---------+
| have_query_cache | YES |
| query_cache_limit | 1048576 |
| query_cache_min_res_unit | 4096 |
| query_cache_size | 0 |
| query_cache_strip_comments | OFF |
| query_cache_type | OFF |
| query_cache_wlock_invalidate | OFF |
+------------------------------+---------+
7 rows in set (0.00 sec)
資料準備
[root@localhost ~]# sysbench --test=oltp --oltp-table-size=1000000 --mysql-host=127.0.0.1 --mysql-db=frank
--mysql-user=root --mysql-password=root prepare
5.5.33的測試結果
線程數 事務每秒(TPS)
1 666.94
8 2732.59
16 2708.15
32 2617.72
64 2605.82
128 2506.13
5.6.14的測試結果
線程數 事務每秒(TPS)
1 690.29
8 2534.15
16 2544.34
32 2500.91
64 2479.60
128 2394.28
結論:5.6.14的輸送量沒有提升.在多線程伺服器上,當線程數達到cpu的兩到三倍時吞量最大,繼續增大線程,輸送量反而下降.由於線程數增大,導致cpug環境切換很厲害,影響效能。
Fedora 20下安裝搭建LAMP環境Apache+MySQL+PHP
《MySQL權威指南(原書第2版)》清晰中文掃描版 PDF
源碼包編譯安裝MySQL 5.6指令碼
本文永久更新連結地址: