Help with TPCC and MySQL

Hy,
I have to do a tpcc benchmark with MySQL on my PC :slight_smile:
I saw that on this link http://bazaar.launchpad.net/~percona…w/head:/README
I have everything that i need but I don’t know how to run it.

First of all, I have istalled XAMPP on my windows 7.
Readme file is saying that I have to build binaries from src folder, right?
Where do I have to compile them? In foledre where is mysql on xampp folder?
Can someone give me some directions?

Thanks

all i had to do was install MySQL server on Ubuntu and run makeFile :slight_smile:
Next thing I would like to do is to see graphic representation of TPCC benchmark. How can I do this with gnuplot?

Thanks

Nikpraskaton,

I tried on my laptop an saved all steps.

This is step by step summary:

I do everything in homedir assuming that tpcc-mysql installed and located on ~/tpcc-mysql/ and gnuplot installed too

cd ~/tpcc-mysql/

create db

mysql -u root -p -e “CREATE DATABASE tpcc1000;”
mysql -u root -p tpcc1000 < create_table.sql
mysql -u root -p tpcc1000 < add_fkey_idx.sql

run tpcc, save output

./tpcc_load 127.0.0.1 tpcc1000 root “[COLOR=#FF0000]” 3
./tpcc_start -h127.0.0.1 -dtpcc1000 -uroot -p[COLOR=#FF0000] -w3 -c8 -r5 -l180 > ~/tpcc-output.log

generate datafile

cd ~/
./tpcc-output-analyze.sh ~/tpcc-output.log > tpcc-data.txt

generate graph

./tpcc-graph-build.sh tpcc-data.txt

==================================================

file: tpcc-output-analyze (I got it here http://bazaar.launchpad.net/~percona…pts/analyze.sh and modified a bit)

TIMESLOT=1

if [ -n “$2” ]
then
TIMESLOT=$2
echo “Defined $2”
fi

cat $1 | grep -v HY000 | grep -v payment | grep -v neword | awk -v timeslot=$TIMESLOT ’ BEGIN { FS="[,():]"; s=0; cntr=0; aggr=0 } /MEASURING START/ { s=1} /STOPPING THREADS/ {s=0} /0/ { if (s==1) { cntr++; aggr+=$2; } if ( cntr==timeslot ) { printf ("%d %3d\n",$1,(aggr/’$TIMESLOT’)) ; cntr=0; aggr=0 } } ’

==================================================

file: tpcc-graph-build.sh

#!/bin/bash

goto user homedir and remove previous file

cd ~/
rm -f tpcc-graph.jpg

gnuplot << EOP

set data source file

datafile = “tpcc-data.txt”

set graph type and size

set terminal jpeg size 640,480

set grid x y
set xlabel “Time (sec)”
set ylabel “Transactions”
set output “tpcc-graph.jpg”

build graph

plot datafile with lines

plot datafile title “TpmC” with lines

EOP

==================================================

graph is saved to tpcc-graph.jpg file

Generated file

attachment

Thanks for detailed explanation. I followed all the steps and able to install and run the benchmarking test.
I was using sysbench for a long time so i thought results would be same as sysbench like qps or tps over number of threads/connections.
How will i get the same results here in tpcc-mysql.
i want tps or qps on number of threads, can any body guide me?
also how can we get read and read/write test separately in tpcc-mysql?

Hi Mixa,

On this file http://bazaar.launchpad.net/~percona…w/head:/README, I try at the first step with “make” command, but it didn’t work. It seems I didn’t configure the mysql_configure file. But I don’t know how to configure it in the $PATH.
Could you show me, please?

Many thanks.

Try with this link http://dev.mysql.com/doc/refman/5.0/en/setting-environment-variables.html

Dear Nikpraskaton,

Thank you

I install “libmysqlclient15-dev” and it works now.
But I can not generate datafile like tutorial:

generate datafile

cd ~/
./tpcc-output-analyze.sh ~/tpcc-output.log > tpcc-data.txt

generate graph

./tpcc-graph-build.sh tpcc-data.txt

I didn’t find tpcc-output-analyze.sh file in ~/

Could you help me?

Look at mixa’s post, there is tpcc-output-analyze written in code.
You have to open text editor (eg. gedit) and copy paste mixa’s code.
Copy and paste this code:

TIMESLOT=1

if [ -n “$2” ]
then
TIMESLOT=$2
echo “Defined $2”
fi

cat $1 | grep -v HY000 | grep -v payment | grep -v neword | awk -v timeslot=$TIMESLOT ’ BEGIN { FS="[,():]"; s=0; cntr=0; aggr=0 } /MEASURING START/ { s=1} /STOPPING THREADS/ {s=0} /0/ { if (s==1) { cntr++; aggr+=$2; } if ( cntr==timeslot ) { printf ("%d %3d\n",$1,(aggr/’$TIMESLOT’)) ; cntr=0; aggr=0 } } ’

in tex editor and name it tpcc-output-analyze.sh.
Read once again mixa’s second post. There is code for tpcc-graph-build.sh.