TPCC-UVA测试环境搭建与结果分析


一、    准备

操作系统 :Linux, 内核版本2.6

需要软件:tpccuva-1.2.3, postgresql-8.1.15, gnuplot-4.2.5。

tccuva是实现标准TPC-C。

Postgresql是最稳定的开源sql数据库。

gunplot是一个数学软件,可以根据数据画出相应的函数图形。

 

二、    安装

1.  创建用户

[root@RedHat /]# useradd -m tpcctest

[root@RedHat /]# passwd tpcctest(密码自行创建)

以tpcctest身份登录到系统

[root@RedHat /]# su tpcctest

[tpcctest@RedHat /]$

创建相关目录

tpcctest@linux:>mkdir $HOME/tpcc-uva

tpcctest@linux:>mkdir $HOME/tpcc-uva/pgsql

tpcctest@linux:>mkdir $HOME/tpcc-uva/bin

2.  安装PostgreSQL

1)执行下列命令安装PostgreSQL数据库

tpcctest@linux:> ./configure --prefix=$HOME/tpcc-uva/pgsql

tpcctest@linux:>gmake

tpcctest@linux:>gmake install

2)修改PATH和LD_LIBRARY_PATH环境变量。

3)编辑~/.bash_profile文件,添加以下内容

PATH=/usr/local/pgsql/bin:$PATH

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib

export PATH LD_LIBRARY_PATH

4)执行下面的命令,使修改的环境变量生效。

tpcctest@linux :> source ~/.bash_profile

5)输入以下命令,检验环境变量的修改是否生效

tpcctest@linux:> which initdb

如果修改正确,则会输出以下信息

$HOME/tpcc-uva/bin/initdb

6) 启动PostgreSQL

tpcctest@linux:>initdb -D $HOME/tpcc-uva/pgsql/data

tpcctest@linux:> postmaster -D $HOME/tpcc-uva/pgsql/data >log.out 2>log.err&

每次重启系统后都要执行上面的命令来启动PostgreSQL。

7)修改PostgreSQL的参数

修改$HOME/tpcc-uva/pgsql/data/postgresql.conf

将#checkpoint_segments = 3 # in logfile segments (16MB each), min 1

替换为checkpoint_segments = 10 # in logfile segments (16MB each), min 1

 将#checkpoint_timeout = 300 # in seconds, range 30-3600

替换为checkpoint_timeout = 3600 # in seconds, range 30-3600

 

8)强制PostgreSQL重新读取配置文件

tpcctest@linux:>killall -HUP postmaster

 

3.  安装gnuplot

解压gnuplot后,进入gnuplot的源代码的目录,执行下列命令安装

tpcctest@linux:> ./configure --prefix=$HOME/tpcc-uva/bin --without-x

tpcctest@linux:> make

tpcctest@linux:> make install

 

4.  安装tpcc-uva.

将tpcc-uva的安装包放在$HOME/tpcc-uva目录下

解压,进入解压后的目录,执行下列命令安装

tpcctest@linux:> make

tpcctest@linux:> make install

更多见下一页:

  • 1
  • 2
  • 下一页

相关内容

    暂无相关文章