tpcc-mysql 安装使用
测试环境
ESX5.1
cpu 4核
内存4G
硬盘:sata2
[root@localhost testfile]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU X5550 @ 2.67GHz
stepping : 4
cpu MHz : 2666.762
cache size : 8192 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock pni ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida dts
bogomips : 5333.52
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
========================操作系统==================
centos6.3 x86_64
mysql-5.6.13-linux-glibc2.5-x86_64
#######################################################
tpcc-mysql
安装
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh –nodeps epel-release-6-8.noarch.rpm
yum install bzr
bzr branch lp:~percona-dev/perconatools/tpcc-mysq
cd tpcc-mysql/src
make
在tpcc-mysql目录下生成
tpcc_load tpcc_start
创建5个数据仓库
tpcc_load localhost tpcc root "" 10
开始测试,使用10个线程操作10个数据仓库,预热60秒,测试60秒
[root@localhost tpcc-mysql]# tpcc_start localhost tpcc root "" 10 10 60 60
***************************************
*** ###easy### TPC-C Load Generator ***
***************************************
non-option ARGV-elements: localhost tpcc root 10 10 60 60
[server]:
[port]: 3306
[DBname]: tpcc
[user]:
[pass]:
[warehouse]: 1
[connection]: 10
[rampup]: 10 (sec.)
[measure]: 20 (sec.)
RAMP-UP TIME.(10 sec.)
MEASURING START.
10, 4054(0):1.159|1.730, 4064(0):0.256|0.497, 406(0):0.118|0.140, 405(0):1.302|1.668, 405(0):3.474|4.477
20, 4038(0):1.011|1.682, 4034(0):0.223|0.336, 403(0):0.105|0.212, 404(0):1.114|1.392, 403(0):3.224|3.749
STOPPING THREADS……….
[0] sc:8092 lt:0 rt:0 fl:0
[1] sc:8098 lt:0 rt:0 fl:0
[2] sc:809 lt:0 rt:0 fl:0
[3] sc:809 lt:0 rt:0 fl:0
[4] sc:808 lt:0 rt:0 fl:0
in 20 sec.
[0] sc:8093 lt:0 rt:0 fl:0
[1] sc:8098 lt:0 rt:0 fl:0
[2] sc:809 lt:0 rt:0 fl:0
[3] sc:809 lt:0 rt:0 fl:0
[4] sc:808 lt:0 rt:0 fl:0
(all must be [OK])
[transaction percentage]
Payment: 43.50% (>=43.0%) [OK]
Order-Status: 4.35% (>= 4.0%) [OK]
Delivery: 4.35% (>= 4.0%) [OK]
Stock-Level: 4.34% (>= 4.0%) [OK]
[response time (at least 90% passed)]
New-Order: 100.00% [OK]
Payment: 100.00% [OK]
Order-Status: 100.00% [OK]
Delivery: 100.00% [OK]
Stock-Level: 100.00% [OK]
24276.000 TpmC
最后一行是每分钟执行的事务数 24276