TPC(Tracsaction Processing Performance Council) 事务处理性能协会是一个评价大型数据库系统软硬件性能的非盈利的组织,TPC-C是TPC协会制定的,用来测试典型的复杂OLTP系统的性能。Tpcc-mysql是percona基于tpcc衍生出来的产品,专用于mysql基准测试,其源码放在bazaar上,因此需要先安装bazaar客户端。

  一 下载工具

  安装rpm包 ,根据系统的不同选择合适的rpm

  rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

  rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

  安装bzr 客户端

  yum install bzr

  下载tpcc-mysql

[root@rac1 markbench]# bzr branch lp:~percona-dev/perconatools/tpcc-mysql
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access privatedata.  See "bzr help launchpad-login".
Branched 48 revision(s).
bzr: warning: some compiled extensions could not be loaded; see <https://answers.launchpad.net/bzr/+faq/703>
[root@rac1 markbench]#

  遇到的问题

[root@rac1 markbench]# bzr branch lp:~percona-dev/perconatools/tpcc-mysql
bzr: ERROR: Couldn't import bzrlib and dependencies.
Please check the directory containing bzrlib is on yourPYTHONPATH.
Traceback (most recent call last):
File "/usr/bin/bzr", line 102, in <module>
import bzrlib
ImportError: No module named bzrlib

  python安装环境,建议使用python2.6的版本,提示找不到 bzrlib 模块

  解决方法:

[root@rac1 markbench]#   find / -name bzrlib -print
/usr/lib64/python2.4/site-packages/bzrlib
[root@rac1 markbench]# exportPYTHONPATH=/usr/lib64/python2.4/site-packages

  再次下载ok.