MySQL 5.5和MySQL 5.6的吞吐量测试

2014-11-24 17:24:16 · 作者: · 浏览: 0

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上下文切换很厉害,影响性能。