MySQL 5.5和MySQL 5.6的輸送量測試

來源:互聯網
上載者:User

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指令碼

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.