码迷,mamicode.com
首页 > 数据库 > 详细

tpcc-mysql测试mysql5.6

时间:2015-07-30 12:51:45      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

操作系统版本:CentOS release 6.5 (Final)  2.6.32-431.el6.x86_64 #1

内存:32G

CPU:Intel(R) Xeon(R) CPU E5-2450 v2 @ 2.50GHz (逻辑32核)

磁盘:PCIE-SSD(型号稍后补上)

文件系统类型:ext4

mysql数据库版本:Server version:   5.6.22-72.0-log Percona Server (GPL), Release 72.0, Revision 738

innodb_buffer_pool: 24G

 

测试准备:


mysql> create database tpcc1000;
Query OK, 1 row affected (0.00 sec)

mysql10044 tpcc1000 <create_table.sql

通过load.sh并发加载数据(创建1000个warsehouse:

[root@BJS0-D140-044 tpcc-mysql]# ./load.sh  tpcc1000 1000  

加载完数据后,创建相关索引和主外键:

mysql10044 tpcc1000 <add_fkey_idx.sql

下面附上load数据时,sdb的读写情况:

技术分享
Device:   rrqm/s wrqm/s    r/s   w/s       rsec/s  wsec/s     avgrq-sz avgqu-sz await  svctm %util
sdb       0.00  3487.00    7.00 5386.00    56.00 232504.00    43.12     2.70    0.50   0.04  21.40
sdb       0.00  3553.00    8.00 4798.00    64.00 167512.00    34.87     2.60    0.54   0.03  15.60
sdb       0.00  2249.00    6.00 6920.00    48.00 232976.00    33.64     3.37    0.48   0.03  22.90
sdb       0.00   200.00    5.00 1669.00    40.00 117624.00    70.29     0.55    0.35   0.07  11.00
sdb       0.00  6928.00    5.00 7439.00    40.00 245136.00    32.94     4.13    0.55   0.03  25.90
sdb       0.00  1864.00    6.00 6700.00    48.00 163824.00    24.44     3.25    0.49   0.04  25.00
sdb       0.00   395.00    0.00 3293.00     0.00 232928.00    70.73     1.25    0.38   0.06  21.20
sdb       0.00  3173.00    3.00 4443.00    24.00 140616.00    31.63     2.52    0.57   0.03  14.40
sdb       0.00  3669.00    6.00 6062.00    48.00 243256.00    40.10     2.98    0.49   0.04  22.50
sdb       0.00  4249.00    8.00 8157.00    64.00 181400.00    22.22     4.34    0.53   0.02  20.10
sdb       0.00  4615.00    8.00 4602.00    64.00 265872.00    57.69     2.15    0.47   0.05  23.20
sdb       0.00  3585.00    9.00 5959.00    72.00 160336.00    26.88     3.15    0.53   0.03  18.60
sdb       0.00  2143.00   11.00 6919.00   184.00 247488.00    35.74     3.36    0.49   0.04  24.90
sdb       0.00  3941.00    7.00 2430.00    56.00 192528.00    79.03     1.41    0.58   0.06  14.10
sdb       0.00  9322.00    9.00 3759.00    72.00 251888.00    66.87     2.47    0.66   0.05  18.30
sdb       0.00  3742.00    8.00 4712.00    64.00 179488.00    38.04     2.28    0.48   0.03  15.60
sdb       0.00  1608.00    7.00 5831.00    56.00 194160.00    33.27     2.72    0.47   0.03  18.70
sdb       0.00  1352.00    6.00 8311.00    48.00 164472.00    19.78     3.92    0.47   0.03  21.70
sdb       0.00  1237.00    7.00 7117.00    56.00 210920.00    29.61     3.52    0.49   0.03  22.80
sdb       0.00  3690.00   17.00 5743.00   256.00 187488.00    32.59     3.15    0.55   0.04  20.80
sdb       0.00   187.00    7.00 3941.00    56.00 229480.00    58.14     1.50    0.38   0.06  21.80
sdb       0.00  3914.00    9.00 8834.00    72.00 197160.00    22.30     4.63    0.53   0.03  22.20
sdb       0.00  1018.00    9.00 4198.00    72.00 195672.00    46.53     1.85    0.44   0.05  20.20
sdb       0.00  6457.00    3.00 5075.00    24.00 177392.00    34.94     3.12    0.62   0.03  16.50
sdb       0.00  1280.00   12.00 3625.00    96.00 196496.00    54.05     1.60    0.44   0.05  18.40
sdb       0.00  4343.00    5.00 3811.00    40.00 198256.00    51.96     2.12    0.56   0.05  18.30
sdb       0.00  6645.00    8.00 6460.00    64.00 226648.00    35.05     3.71    0.57   0.03  21.50
sdb       0.00  2238.00    6.00 2622.00    48.00 157120.00    59.81     1.41    0.54   0.05  14.40
sdb       0.00  3970.00    6.00 8574.00    48.00 253768.00    29.58     4.35    0.51   0.03  26.80
sdb       0.00  1112.00    8.00 3981.00    64.00 161856.00    40.59     1.69    0.42   0.04  16.40
sdb       0.00 89507.00    4.00 18256.00    32.00 946392.00    51.83    16.98    0.92   0.04  64.40
sdb       0.00 142741.00    6.00 8778.00    48.00 1373344.00   156.35    29.77    3.41   0.07  65.10
sdb       0.00  1124.00   18.00 7881.00   144.00 191752.00    24.29     3.62    0.47   0.03  25.60
sdb       0.00 19239.00   10.00 10434.00    80.00 379848.00    36.38     6.26    0.60   0.03  34.50
sdb       0.00  4972.00   10.00 4454.00    80.00 234456.00    52.54     2.47    0.56   0.04  18.80
sdb       0.00   338.00    6.00 2042.00    48.00 124712.00    60.92     0.88    0.43   0.06  12.90
sdb       0.00  2464.00    7.00 8480.00    56.00 243176.00    28.66     3.95    0.47   0.03  27.30
sdb       0.00  2058.00    7.00 5434.00    56.00 175968.00    32.35     2.60    0.48   0.03  17.10
sdb       0.00  3541.00   10.00 10119.00    80.00 228264.00    22.54     5.16    0.51   0.03  31.50
sdb       0.00   397.00    8.00 7528.00    64.00 151808.00    20.15     3.40    0.45   0.03  20.60
sdb       0.00  2343.00   10.00 6950.00    80.00 229616.00    33.00     3.35    0.48   0.04  27.30
sdb       0.00  5378.00    7.00 3790.00    56.00 224864.00    59.24     1.96    0.52   0.05  18.20
sdb       0.00  1503.00    8.00 7825.00    64.00 203128.00    25.94     3.63    0.47   0.03  23.70
sdb       0.00  3391.00    8.00 3535.00    64.00 159728.00    45.10     1.80    0.50   0.04  13.80
sdb       0.00  1268.00    6.00 6597.00    48.00 224408.00    33.99     2.87    0.44   0.04  23.40
sdb       0.00  3480.00    8.00 6968.00    64.00 188744.00    27.07     3.59    0.52   0.03  19.60
sdb       0.00  2095.00    8.00 4434.00    64.00 209632.00    47.21     1.92    0.43   0.04  19.50
sdb       0.00  5172.00    5.00 1855.00    40.00 140400.00    75.51     1.31    0.71   0.05   8.70
sdb       0.00  5246.00    7.00 5139.00    56.00 220056.00    42.77     2.96    0.58   0.04  22.50
sdb       0.00  4036.00    7.00 2835.00    56.00 155816.00    54.85     1.36    0.48   0.04  11.30
sdb       0.00  1064.00   22.00 7819.00   632.00 204808.00    26.20     3.67    0.47   0.03  23.10
sdb       0.00   877.00    5.00 2381.00    40.00 141336.00    59.25     1.13    0.48   0.05  12.90
sdb       0.00  6176.00    5.00 8540.00    40.00 275832.00    32.28     4.45    0.52   0.03  25.70
sdb       0.00   178.00    5.00 2176.00    40.00 130592.00    59.90     0.85    0.39   0.06  13.70
sdb       0.00  8077.00    7.00 3226.00    56.00 228272.00    70.62     2.24    0.68   0.05  16.80
sdb       0.00  2415.00    8.00 6335.00    64.00 180128.00    28.41     3.31    0.52   0.03  20.70
sdb       0.00  1813.00    6.00 6447.00    48.00 227184.00    35.21     3.03    0.47   0.04  24.70
sdb       0.00  5689.00    5.00 3738.00    40.00 221824.00    59.27     2.06    0.55   0.05  17.40
sdb       0.00  7433.00    9.00 2916.00    72.00 232904.00    79.65     2.30    0.79   0.07  19.40
sdb       0.00 10585.00    8.00 4893.00    64.00 210104.00    42.88     3.25    0.67   0.03  16.00
sdb       0.00  2123.00    7.00 5140.00    56.00 234664.00    45.60     2.31    0.45   0.04  22.20
sdb       0.00   685.00   11.00 7679.00    88.00 200688.00    26.11     3.52    0.46   0.03  22.70
sdb       0.00  5046.00    7.00 4992.00    56.00 228256.00    45.67     2.88    0.58   0.04  20.30
sdb       0.00  1845.00    5.00 7595.00    40.00 187704.00    24.70     3.58    0.47   0.03  22.40
sdb       0.00  7518.00    8.00 4145.00    64.00 244528.00    58.90     2.41    0.58   0.04  18.40
sdb       0.00  3816.00    8.00 3295.00    64.00 160200.00    48.52     1.90    0.58   0.04  14.60
sdb       0.00 84441.00    4.00 20997.00    32.00 967352.00    46.06    17.57    0.84   0.03  71.70
sdb       0.00 115701.00    3.00 34690.00    24.00 1220160.00    35.17    28.22    0.82   0.03  93.90
sdb       0.00  1413.00    6.00 2691.00    48.00 144544.00    53.61     1.40    0.52   0.05  13.30
sdb       0.00  1937.62    6.93 6831.68    55.45 222384.16    32.53     2.85    0.42   0.04  24.75
sdb       0.00  2375.00    7.00 5821.00    56.00 164888.00    28.30     3.11    0.54   0.03  17.70
sdb       0.00  4061.00    4.00 5180.00    32.00 208328.00    40.19     2.96    0.57   0.05  24.00
sdb       0.00 13406.00   10.00 20328.00    80.00 374664.00    18.43    11.14    0.55   0.03  51.10
sdb       0.00  5410.00    4.00 2763.00    32.00 216080.00    78.10     1.48    0.53   0.06  17.90
sdb       0.00  2808.00    9.00 5818.00    72.00 181696.00    31.19     2.89    0.50   0.03  20.00
sdb       0.00  3952.00   11.00 5188.00    88.00 223728.00    43.05     2.91    0.56   0.04  22.50
sdb       0.00  1758.00    7.00 7032.00    56.00 189376.00    26.91     3.39    0.48   0.03  21.30
sdb       0.00  4652.00   10.00 4923.00    80.00 219144.00    44.44     2.60    0.53   0.04  21.80
sdb       0.00  1483.00   10.00 1969.00    80.00 132440.00    66.96     0.89    0.45   0.05  10.80
sdb       0.00   834.00    5.00 6090.00    40.00 214200.00    35.15     2.81    0.46   0.03  21.00
sdb       0.00  7992.00    8.00 2845.00    64.00 188696.00    66.16     2.10    0.74   0.05  15.20
sdb       0.00  4030.00    8.00 3678.00    64.00 228584.00    62.03     2.16    0.59   0.06  22.20
sdb       0.00  5123.00    4.00 3874.00    32.00 174256.00    44.94     2.62    0.68   0.04  16.60
sdb       0.00  5995.00    9.00 4380.00    72.00 225504.00    51.40     2.44    0.56   0.05  20.10
sdb       0.00  4042.00    9.00 4185.00    72.00 189528.00    45.21     2.33    0.56   0.04  17.90
sdb       0.00  5997.00    2.00 4438.00    16.00 234120.00    52.73     2.71    0.61   0.05  21.20
View Code

 为了每次测试结果的客观性,应该重启数据库实例,并清除操作系统的cache:echo 3 > /proc/sys/vm/drop_caches 

各个测试表的数据量情况:

select count(w_id) from warehouse;    ---1000
select count(d_w_id) from district;    ---10000
select count(c_w_id) from customer;    ---30000000
select count(h_c_id) from history;    ---30000000
select count(no_w_id) from new_orders;    ---9000000
select count(o_w_id) from orders;    ---30000000
select count(ol_w_id) from order_line;    ---299985497
select count(i_id) from item;     ---100000
select count(s_w_id) from stock;    ---100000000

 

测试命令:tpcc_start -h127.0.0.1 -P10044 -dtpcc1000 -uroot -w1000 -c32 -r300 -l1800

初步测试结果:

线程数 Tpmc
32 36547.5
64 35288.77
128 31155.97
256 28148.03
512 33274.93

直观图:

 

 

技术分享

 

以上测试结果是基于默认IO调度(cfg)所得,后续将测试sdb磁盘IO调度为[noop]时的Tpmc的趋势图:

Ps:感谢叶老师(叶金荣)的支持

tpcc-mysql测试mysql5.6

标签:

原文地址:http://www.cnblogs.com/yiyuf/p/4683110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!