ã¯ããã«
PostgreSQLã®ãã³ãããŒã¯ãè¡ãéãpgbenchãšããããŒã«ã¯PostgreSQLã«ä»å±ããŠããããšããããããçšãããããšæããŸãã
pgbenchã¯TPC-B(éè¡ã®çªå£æ¥åãã¢ãã«ã«ããåçŽãªãã©ã³ã¶ã¯ã·ã§ã³ã«ããæ§èœè©äŸ¡åºæº)ãããŒã¹ãšãããã³ãããŒã¯ã§ãããå°ãé«åºŠãªãã³ãããŒã¯ã宿œããŠã¿ãããšæããTPC-CããŒã¹ã®ãã³ãããŒã¯ãå®è¡ã§ããTPCC-UVaãšããããŒã«ãå©çšããŠã¿ãŸããã
éçºãçµãã£ãŠããã®ã2006幎ãæåŸã«ãªãªãŒã¹ãæ¢ãŸã£ãŠããŸãããPostgreSQL 9.2ã«å¯ŸããŠãå®è¡ã§ããŸããã®ã§ããã®æé çããŸãšããŠãããŸãã
TPCã®ãã³ãããŒã¯åºæº
æŠèŠ
äžè¬çã«ããŒã¿ããŒã¹ã®ãã³ãããŒã¯ã«ã¯ãTPCïŒTransaction Processing Performance Council)ããšããå£äœãå®çŸ©ããŠãããTPC-AããTPC-BããTPC-CããTPC-DããTPC-HããTPC-RããTPC-Wããšããæ§èœè©äŸ¡åºæºããããŸãããã®ãã¡ãTPC-AãBãDãRãWã¯æ¢ã«å»æ¢(observe)ãšãªã£ãŠããããšãããå©çšãå°ãªããçŸåšã§ã¯TPC-CãTCP-EãTPC-Hããããããå©çšããããã®ãšæããŸãã
TPC-C,E,Hã®æŠèŠã«ã€ããŠã¯TPCã®ãµã€ããåç
§ããŠããã ããã°ãšæããŸãããæ¥µç°¡åã«èšèŒããŸããšã
- TPC-C
åžå£²ãäŒç€Ÿã®æ¥åãã¢ãã«ãšãããã©ã³ã¶ã¯ã·ã§ã³åŠçãã·ãã¥ã¬ãŒãããŠæ§èœãè©äŸ¡ãããã³ãããŒã¯ - TPC-E
蚌åžäŒç€Ÿã®æ ªååŒæ¥åãã¢ãã«ãšãããã©ã³ã¶ã¯ã·ã§ã³åŠçãã·ãã¥ã¬ãŒãããŠæ§èœãè©äŸ¡ãããã³ãããŒã¯ - TPC-H
倧ååºå¹¹æ¥ååãæææ±ºå®æ¯æŽç°å¢ãã·ãã¥ã¬ãŒãããŠæ§èœãè©äŸ¡ãããã³ãããŒã¯
ãšãªããŸãã
ç¹ã«TPC-Eã¯ããªãè€éãªã¢ãã«ã§ãããã¹ãããŒã¿ãå®éã®ããŒã¿ãçšããããŠããããã§ããã®åããæ£ç¢ºãªãã³ãããŒã¯çµæãåŸããããšèããããŸããããããã®ãã³ãããŒã¯ãã¹ãã¯ããããCPUããã£ã¹ã¯ã®ã©ã¡ãã«ããè² è·ããããããªã©ãç°ãªããŸãã®ã§ããã³ãããŒã¯ã®ä»æ§ãææ¡ããŠãå®éã«å©çšããã·ã¹ãã ã®ç®çã«å³ãããã®ãéžæããã®ãè¯ããšæããŸãã
PostgreSQLã®TPC-Cã®ãã³ãããŒã¯ããŒã« TPCC-UVa
å
¬åŒãµã€ãã«èšèŒããããŸãããTPCC-UVaã¯Linuxç°å¢ã§å®è¡ã§ããCèšèªã§æžãããPostgreSQLçšã®TPC-CããŒã¹ã®ãã³ãããŒã¯ããŒã«ã§ããDiego R. Llanosæ°ãEduardo Hernández Perdigueroæ°ãJulio Alberto Hernández Gonzaloæ°ããã¹ãã€ã³ã®ããªã£ããªãŒã倧åŠã®åæ¥ç ç©¶ãšããŠéçºããããã®ã®ããã§ãã
Although the TPC-C specifications are public, there was not a public implementation: each company develops and uses its own. We have developed an open-source version of the TPC-C benchmark, following the terms of the GPL license. This version, called TPCC-UVa, is written entirely in C language and can be run in any Linux system. It uses the PostgreSQL database system and a simple transaction monitor. This benchmark can be used to measure the speed of different computers or to analyze the behavior of individual components, either hardware or software, and its impact on the overall performance of the system. The development was started by Eduardo Hernández Perdiguero and Julio Alberto Hernández Gonzalo as their Bachelor's Thesis in the Escuela Universitaria Politécnica, University of Valladolid, with the advise of Diego R. Llanos.
ãŸããããã¯PostgreSQLåãã®TPC-Cã®ã·ã³ãã«ãªå®è£
ã§ãããä»ã®TPC-Cã«ããçµæãšã¯æ¯èŒã§ããªããšã®ããšã§ãã
Note: To release TPCC-UVa as an open-source program, we use our own version of a very simple Transaction Monitor (TM), instead of using any commercial TM. Because of that, the results obtained with TPCC-UVa, particularly our performance parameter "TPCC-UVa Transactions per minute (tpmC-uva)" should not be compared with values of tpmC obtained with other implementations.
å®è¡ç°å¢æ
å ±
ã€ã³ã¹ããŒã«ããã³ãããŒã¯ãå®è¡ããç°å¢ã以äžã«ç€ºããŸãã
HWç°å¢
HWç°å¢ã¯ä»¥äžã®éãã§ãã
ãã©ãããã©ãŒã | ãããã®VPS 512 |
OS | CentOS 6.3 |
CPU | Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz |
Memory | 1GB |
HDD | QEMU Virtual HARDDISK (Sector(Block) Size 512B) |
ã€ã³ã¹ããŒã«ãã£ã¬ã¯ããª
ååŸããTPCC-UVaã®ã¢ãŒã«ã€ãã®äžã«TPCC-UVaã®ä»ã«PostgreSQL 8.1.4, GunPlotãå«ãŸããŠããŸãã®ã§ãããããå
šãŠã€ã³ã¹ããŒã«ããããšãšããŠãã€ã³ã¹ããŒã«å
ãã£ã¬ã¯ããª/äœæ¥ãã£ã¬ã¯ããªããããã以äžãšããŸãã
â»TPCC-UVaã®å©çšã«ã¯PostgreSQL 8.1.4(ã®äžã«å«ãŸããŠããlibecpg.so.5.1ãšããã©ã€ãã©ãª)ãå¿
èŠã«ãªããŸãã
äœæ¥çšãã£ã¬ã¯ã㪠| /tmp |
PostgreSQL 8.1.4ã€ã³ã¹ããŒã«å
ãã£ã¬ã¯ã㪠| /home/tpcc-uva/pgsql |
Gunplotã€ã³ã¹ããŒã«å
ãã£ã¬ã¯ã㪠| /home/tpcc-uva/bin |
TPCC-UVaã€ã³ã¹ããŒã«å
ãã£ã¬ã¯ã㪠| /home/tpcc-uva/bin |
ã€ã³ã¹ããŒã«äºåæºå
äœæ¥ã¯å
šãŠrootã§å®è¡ããŠããŸãã
$ su -
ãã¹ã¯ãŒã:
å¿
èŠãªããã±ãŒãžã®ã€ã³ã¹ããŒã«
PostgreSQL 8.1.4ã®ã€ã³ã¹ããŒã«æã«äžèšã®ããã±ãŒãžãå¿
èŠã«ãªããŸãã®ã§ãååšããªãå Žåã¯ã€ã³ã¹ããŒã«ãè¡ããŸãã
# yum install zlib readline gcc
ã€ã³ã¹ããŒã«å
ãã£ã¬ã¯ããªã®äœæ
ã€ã³ã¹ããŒã«å
ãã£ã¬ã¯ããªãäœæããŸãã
# mkdir /home/tpccuva
TPCC-UVaã®ãœãŒã¹ã³ãŒãã®ååŸ
/tmpé
äžã«TPCC-UVaã®ãœãŒã¹ã³ãŒããååŸããŠå±éããŸãã
# cd /tmp
# wget http://www.infor.uva.es/~diego/tpccuva/tpccuva-1.2.3-tarball.tar.gz
# tar -zxvf tpccuva-1.2.3-tarball.tar.gz
å±éãããã¡ã€ã«ã®äžã«tpccuva-guide.pdfãšããPDFããããŸãã åºæ¬çã«ããã«èšèŒãããŠããæé ã«æ²¿ã£ãŠã€ã³ã¹ããŒã«ãè¡ããŸãã
ã€ã³ã¹ããŒã«
PostgreSQL 8.1.4ã®ã€ã³ã¹ããŒã«
PostgreSQL 8.1.4ã®ã¢ãŒã«ã€ããã¡ã€ã«ãå±éããŸãã
# cd /tmp/tpccuva-1.2.3-tarball
# bzip2 -dc postgresql-base-8.1.4.tar.bz2 | tar xvf -
å±éããŠäœæããããã£ã¬ã¯ããªã«ç§»åããmakeãã¡ã€ã«ãäœæããŸãã--prefixã§ã€ã³ã¹ããŒã«å
ãæå®ããŸãã
# cd /tmp/tpccuva-1.2.3-tarball/postgresql-base-8.1.4
# ./configure --prefix=/home/tpcc-uva/pgsql
ã³ã³ãã€ã«ãããã³ã€ã³ã¹ããŒã«ãè¡ããŸãã
# gmake && gmake install
gunplot 3.7.1ã®ã€ã³ã¹ããŒã«
ç¶ããŠä»å±ãããŠããgunplotã®ã€ã³ã¹ããŒã«ãè¡ããŸãã
# cd /tmp/tpccuva-1.2.3-tarball
# tar -zxvf gnuplot-3.7.1.tar.gz
# cd /tmp/tpccuva-1.2.3-tarball/gnuplot-3.7.1
# ./configure --prefix=/home/tpcc-uva/bin --without-x
# make && make install
TPCC-UVaã®ã€ã³ã¹ããŒã«
ãã°çæå
ãšãªããã£ã¬ã¯ããªãäœæããŸãã
# mkdir -p /home/tpcc-uva/var/tpcc
TPCC-UVaã®ãã¡ã€ã«ãå±éããŸãã
# cd /tmp/tpccuva-1.2.3-tarball
# tar -zxvf tpccuva-1.2.3.tar.gz
å±éããŠäœæããããã¡ã€ã«ã«ç§»åããMakefileãç°å¢ã«åãããŠä¿®æ£ããŸããMakefileã¯ããã¯ã¢ãããååŸããŠãããŸãã
# cd /tmp/tpccuva-1.2.3-tarball/tpccuva-1.2.3
# cp -p Makefile Makefile.backup
# vim Makefile
=== ä¿®æ£å
容 ===
# VARDIR stores where the auxiliary files will be stored during the
# benchmark execution. Do not forget the last slash!
-VARDIR = $(HOME)/tpcc-uva/var/tpcc/
+#VARDIR = $(HOME)/tpcc-uva/var/tpcc/
+VARDIR = /home/pgsql/tpcc-uva/var/tpcc/
# EXECDIR stores where the executable files will be stored during the
# installation. Do not forget the last slash!
-EXECDIR = $(HOME)/tpcc-uva/bin/
+#EXECDIR = $(HOME)/tpcc-uva/bin/
+EXECDIR = /home/pgsql/tpcc-uva/bin/
# INCLUDEPATH stores the location of PostgreSQL include files.
-export INCLUDEPATH = $(HOME)/tpcc-uva/pgsql/include/
+#export INCLUDEPATH = $(HOME)/tpcc-uva/pgsql/include/
+export INCLUDEPATH = /home/pgsql/tpcc-uva/pgsql/include/
# LIBSPATH stores the location of PostgreSQL library files.
-export LIBSPATH = $(HOME)/tpcc-uva/pgsql/lib/
+#export LIBSPATH = $(HOME)/tpcc-uva/pgsql/lib/
+export LIBSPATH = /home/pgsql/tpcc-uva/pgsql/lib/
ç°å¢å€æ°ãèšå®ããŸãã ããã¯åçš®ããã°ã©ã ãå®è¡ããäžã§å¿
èŠã§ãã®ã§ãå¿
èŠã§ããã°å®è¡ãŠãŒã¶ã®.bashrcãªã©ã«èšèŒããŠãããšè¯ããšæããŸãã
# export PATH=$PATH:/home/tpcc-uva/pgsql/bin:/home/tpcc-uva/bin
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/tpcc-uva/pgsql/lib
ã³ã³ãã€ã«ããŠãã€ã³ã¹ããŒã«ã宿œããŸãã
# make && make install
以äžã§ãã€ã³ã¹ããŒã«äœæ¥ãå®äºããŸããã
ãã³ãããŒã¯ã®å®è¡
ãã³ãããŒã¯ãå®è¡ããŠã¿ãŸãã
ãã³ãããŒã¯å¯Ÿè±¡ã¯PostgreSQLãµãŒãã¯9.2.2ã§ããããããã€ã³ã¹ããŒã«ãããŠãããã®ãšããŸããç¹ã«ãã©ã¡ãŒã¿ã¯å€æŽããŠããããã€ã³ã¹ããŒã«æã®ããã©ã«ããšããŠããŸãã
å®è¡ã«å¿
èŠãªç°å¢å€æ°ãèšå®ããŸããâ»ã€ã³ã¹ããŒã«æã«èšå®ãããã®ãšåæ§ã®å
容ã§ãã
# export PATH=$PATH:/home/tpcc-uva/pgsql/bin:/home/tpcc-uva/bin/
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/tpcc-uva/pgsql/lib
TPCC-UVaã«ãããã³ãããŒã¯ããã°ã©ã ãbenchãå®è¡ããŸãã
# /home/tpcc-uva/bin/bench
+---------------------------------------------------+
| BENCHMARK TPCC --- UNIVERSIDAD DE VALLADOLID --- |
+---------------------------------------------------+
1.- CREATE A NEW TEST DATABASE
8.- Quit
SELECT OPTION:
â»æ¥ç¶ã§ããªãå Žå
ããã以äžã®ãããªãšã©ãŒãåºãå Žåãæ¥ç¶ãŠãŒã¶ãååšããŠããªãå¯èœæ§ããããŸãã (ç§ã®ç°å¢ã§ã¯postgresãŠãŒã¶ãå«ãOSäžã®ã©ã®ãŠãŒã¶ã§å®è¡ããŠããrootã§æ¥ç¶ããããšããŠãšã©ãŒãšãªã£ãŠããŸãããæ¥ç¶ãŠãŒã¶ãå¶åŸ¡ããæ¹æ³ãããã®ãã¯ããã£ãŠããŸããã)
Error number: -402
Could not connect to database template1 in line 4208.
Error checking if database exists.
Error number: -220
No such connection NULL in line 4216.
PostgreSQLã«rootãŠãŒã¶ãäœæããŸããæäœéDBäœææš©éãäžããŠãããŸãã
# psql -U postgres
postgres=# CREATE USER root CREATEDB CREATEUSER;
postgres=# select * from pg_user;
usename | usesysid | usecreatedb | usesuper | usecatupd | userepl | passwd | valuntil | useconfig
----------+----------+-------------+----------+-----------+---------+----------+----------+-----------
postgres | 10 | t | t | t | t | ******** | |
pgbench | 16491 | f | f | f | f | ******** | |
root | 16517 | t | t | t | f | ******** | |
(5 rows)
ååå®è¡æã¯"1.- CREATE A NEW TEST DATABASE"ãéžãã§ãã³ãããŒã¯çšã®ããŒã¿ããŒã¹ãäœæããŸãã ãã°ããåŸ
ã€ãšãã³ãããŒã¯çšã®ããŒã¿ããŒã¹ãšããŒãã«ãäœæãããŸãã
SELECT OPTION: 1
warehouses(å庫)ãããã€äœæãããåãããŸããããã§ã¯1ãéžæããŠããŸãã
ããŒã¿ãäœæããããš"Continue..."ãšãªãã®ã§EnterããŒãæŒäžããŸãã
Enter the number of warehouses: 1
Continue? (y/n): y
Starting to populate database.
Start time: 2013-03-10 11:28:31
POPULATING DATABASE WITH 1 WAREHOUSES...
âŠ
POPULATION COMPLETED.
Start time: 2013-03-10 11:28:31
End time: 2013-03-10 11:39:58
Continue...
ç¶ããŠä»¥äžã®ãããªç»é¢ãšãªããŸãããäžæŠãªãã·ã§ã³ã®"8.- Quit"ãéžæããŠå®è¡ãçµäºããPostgreSQLãµãŒãã«ãã°ã€ã³ããŠããã¹ãããŒã¿ããŒã¹ã®æ
å ±ãã¿ãŠã¿ãŸãã
+---------------------------------------------------+
| BENCHMARK TPCC --- UNIVERSIDAD DE VALLADOLID --- |
+---------------------------------------------------+
2.- RESTORE EXISTING DATABASE.
3.- RUN THE TEST.
4.- CHECK DATABASE CONSISTENCY.
5.- DELETE DATABASE.
7.- CHECK DATABASE STATE.
8.- Quit
SELECT OPTION:
PostgreSQLãµãŒãã«ãã°ã€ã³ãããšãtpccãšããããŒã¿ããŒã¹ãäœæãããŠããããã®äžã«ä»¥äžã®ãããªããŒãã«ãäœæãããŠããããšãåãããŸãã
# psql -U root tpcc
tpcc=# \l
List of databases
Name | Owner | Encoding
---------------------+----------+----------
pgbench | pgbench | UTF8
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
tpcc | root | UTF8
(9 rows)
tpcc=# \d
List of relations
Schema | Name | Type | Owner
--------+------------+-------+-------
public | customer | table | root
public | district | table | root
public | history | table | root
public | item | table | root
public | new_order | table | root
public | order_line | table | root
public | orderr | table | root
public | stock | table | root
public | warehouse | table | root
(9 rows)
åããŒãã«ã¯ä»¥äžã®ãããªããŒã¿ãäœæãããŠããŸãã ããŒãã«ã®äžã«ã¯ãã¿ã©ã¡ãªå€ãå
¥åãããŠããŸãã
customer | 顧客ããŒãã«ã1å庫ããã3äžè¡ã®ããŒã¿ãäœæãããŸãã |
district | é
éå°åããŒãã«ã1å庫ããã10è¡ã®ããŒã¿ãäœæãããŸãã |
hisotory | æ¯æãåŠçå±¥æŽããŒãã«ã1å庫ããã3äžè¡ã®ããŒã¿ãäœæãããŸãã |
item | ååããŒãã«ãååº«ã®æ°ã«é¢ãããã10äžè¡ã®ããŒã¿ãäœæãããŸãã |
new_orders | æ°èŠæ³šæããŒãã«ã1å庫ããã9åè¡ã®ããŒã¿ãäœæãããŸãããã³ãããŒã¯å®è¡äžã«ããŒã¿ãå¢å (åæ³šåŸ)/æžå°(é
éåŸ)ããŠãããŸãã |
order_line | 泚ææçްããŒãã«ã1å庫ããã30äžè¡ã®ããŒã¿ãäœæãããŸãã |
orderr | 泚æããŒãã«ã1å庫ããã3äžè¡ã®ããŒã¿ãäœæãããŸãããã³ãããŒã¯å®è¡äžã«ããŒã¿ãå¢å ããŠãããŸãã |
stock | åšåº«ããŒãã«ã1å庫ããã10äžè¡ã®ããŒã¿ãäœæãããŸãã |
warehouse | å庫ããŒãã«ã1å庫ããã1è¡ã®ããŒã¿ãäœæãããŸãã |
ç¶ããŸããå床benchãå®è¡ããŸãã
# bench
+---------------------------------------------------+
| BENCHMARK TPCC --- UNIVERSIDAD DE VALLADOLID --- |
+---------------------------------------------------+
2.- RESTORE EXISTING DATABASE.
3.- RUN THE TEST.
4.- CHECK DATABASE CONSISTENCY.
5.- DELETE DATABASE.
7.- CHECK DATABASE STATE.
8.- Quit
SELECT OPTION:
ãªãã·ã§ã³ã®"3.- RUN THE TEST."ãéžæãããã³ãããŒã¯ãã¹ããå®è¡ããŠã¿ãŸããéžæè¢ã®
SELECT OPTION: 3
->Enter number of warehouses 1
->Enter number of terminals per warehouse (max. 10) 10
->Enter ramp-up period (minutes) 20
->Enter measurement interval (minutes) 300
Continue? (y/n): y
->Do you want to perform vacuums during the test? (y/n): y
->Enter interval between vacuums (minutes): 60
->Do you want to specify the maximum number of vacuums? (y/n): y
->Enter the maximum number of vacuums: 1
->Performing vacuums every 60 minutes, to reach a maximum number of 1.
Start the test? (y/n): y
- Number of warehousesïŒ
warehousesã®æ°ãå
ã»ã©äœæããæ°ãæå®ããŸãã - Number of terminals per warehouseïŒ
1ã€ã®warehousesã«å¯Ÿããåææ¥ç¶æ°ãTPC-Cå
¬åŒä»æ§æžã§ã¯10ãšãªã£ãŠããããã§ãã - Ramp-up periodïŒ
ãã³ãããŒã¯ã®èšé²ãéå§ãããŸã§ã®æé(ååäœ)ãããŒã¿ãã¡ã¢ãªã«ãã£ãã·ã¥ããããŸã§ã®æéåŸ
ã€ã®ãæãŸãããããããã°ã©ã å®è¡éå§ãããã³ãããŒã¯èšæž¬éå§ãŸã§ã®åŸ
ã¡æéãæå®ã§ããŸãããŠãŒã¶ã¬ã€ãã«ã¯20åçšåºŠãšèšèŒãããŠããŸãããç°å¢ã«åãããŠæå®ããŸãã - Measurement periodïŒ
ãã³ãããŒã¯æž¬å®ãè¡ãæé(ååäœ)ã2æé(120min)ããæå€§ã§8æé(480min)ã®å€ãæå®ããŸãã - interval between vacuumsïŒ
ããã¥ãŒã ãè¡ãéé(ååäœ)ã - maximum number of vacuumsïŒ
ããã¥ãŒã ãè¡ãæå€§åæ°ã
以äžã®ãããªåŠçãæµãç¶ããŸããçµäºãããŸã§åŸ
ã¡ãŸãã
âŠ
>> NEW_ORDER Transaction. Terminal 6. Done.
>> PAYMENT Transaction. Terminal 8. Done.
>> PAYMENT Transaction. Terminal 1. Done.
>> PAYMENT Transaction. Terminal 9. Done.
>> PAYMENT Transaction. Terminal 0. Done.
>> NEW_ORDER Transaction. Terminal 7. Done.
>> ORDER_STATUS Transaction. Terminal 3. Done.
>> DELIVERY Transaction. Terminal 7. Done.
>> NEW_ORDER Transaction. Terminal 2. Done.
>> PAYMENT Transaction. Terminal 5. Done.
>> NEW_ORDER Transaction. Terminal 6. Done.
>> PAYMENT Transaction. Terminal 2. Done.
>> PAYMENT Transaction. Terminal 8. Done.
âŠ
çµæããŒã¿ã®ååŸ
åŠçãå®äºããããçµæã®ããŒã¿ãåéããŸãã
ããŒã¿ã®ä¿åå
ãšããŠä»¥äžã®ãã£ã¬ã¯ããªãäœæããŠãããŸãã
# mkdir -p /tmp/tpccuva_result
benchã³ãã³ããå®è¡ãããªãã·ã§ã³ã®"6.- SHOW AND STORE TEST RESULTS"ãéžæããŸãã benchãå®è¡ããéã®ã«ã¬ã³ããã£ã¬ã¯ããªã«*.datãšããã°ã©ãã®çæã«å¿
èŠãªãã¡ã€ã«ãäœæãããŸãã®ã§ãåºåçµæãä¿åããå
ã®ãã£ã¬ã¯ããªã«ç§»åããŠãããŸãã
# cd /tmp/tpccuva_result
# /home/tpcc-uva/bin/bench
+---------------------------------------------------+
| BENCHMARK TPCC --- UNIVERSIDAD DE VALLADOLID --- |
+---------------------------------------------------+
2.- RESTORE EXISTING DATABASE.
3.- RUN THE TEST.
4.- CHECK DATABASE CONSISTENCY.
5.- DELETE DATABASE.
6.- SHOW AND STORE TEST RESULTS
7.- CHECK DATABASE STATE.
8.- Quit
SELECT OPTION: 6
以äžã®ãããªããŒã¿ãçµæã衚瀺ãããŸãããæåŸã«ãã¡ã€ã«ã«åºåã§ããã®ã§ãã®ãŸãŸEnterããŒãæŒäžãç¶ããŸãã
Computation of performance test done on 2013-03-10 at 13:25:27 for 1 warehouses.
Start of measurement interval: 20.000083 m
End of measurement interval: 320.000083 m
COMPUTED THROUGHPUT: 12.537 tpmC-uva using 1 warehouses.
8642 Transactions committed.
NEW-ORDER TRANSACTIONS:
3761 Transactions committed into measurement interval. Total transactions: 4015.
Percentage of Total transactions: 43.520%
Percentage of "well done": 100.000%
Response time (min/avg/max/90th): 0.012 / 0.047 / 0.277 / 0.040
Percentage of rolled-back transactions: 1.064% .
Average number of items per order: 9.360 .
Percentage of remote items: --- (One warehouse only).
Think time (min/avg/max): 0.000 / 12.167 / 109.000
Continue...
PAYMENT TRANSACTIONS:
3757 Transactions committed into measurement interval. Total transactions: 4019.
Percentage of Total transactions: 43.474%
Percentage of "well done": 100.000%
Response time (min/avg/max/90th): 0.002 / 0.018 / 0.299 / 0.000
Percentage of remote transactions: --- (One warehouse only)
Percentage of customers selected by C_ID: 40.964% .
Think time (min/avg/max): 0.000 / 12.141 / 109.000
Continue...
ORDER-STATUS TRANSACTIONS:
372 Transactions committed into measurement interval. Total transactions: 400.
Percentage of Total transactions: 4.305%
Percentage of "well done": 100.000%
Response time (min/avg/max/90th): 0.003 / 0.018 / 0.218 / 0.000
Percentage of customers selected by C_ID: 42.742% .
Think time (min/avg/max): 0.000 / 9.642 / 50.000
Continue...
DELIVERY TRANSACTIONS:
376 Transactions committed into measurement interval. Total transactions: 402.
Percentage of Total transactions: 4.351%
Percentage of "well done": 100.000%
Response time (min/avg/max/90th): 0.000 / 0.000 / 0.001 / 0.000
Percentage of execution time < 80s : 100.000%
Execution time min/avg/max: 0.031/0.061/0.171
No. of skipped districts: 0 .
Percentage of skipped districts: 0.000%.
Think time (min/avg/max): 0.000 / 5.136 / 25.000
Continue...
STOCK-LEVEL TRANSACTIONS:
376 Transactions committed into measurement interval. Total transactions: 402.
Percentage of Total transactions: 4.351%
Percentage of "well done": 100.000%
Response time (min/avg/max/90th): 0.003 / 0.020 / 0.150 / 0.000
Think time (min/avg/max): 0.000 / 4.987 / 25.000
Continue...
Longest checkpoints:
Start Time Elapsed time since test start (s) Execution time (s)
Sun Mar 10 13:45:27 2013 1200.029000 11.729000
Sun Mar 10 16:45:44 2013 12016.485000 4.010000
Sun Mar 10 14:45:39 2013 4812.168000 3.007000
Sun Mar 10 18:15:48 2013 17421.301000 0.601000
Continue ...
Longest vacuums:
Start Time Elapsed time since test start (s) Execution time (s)
Sun Mar 10 14:25:27 2013 3600.040000 7.242000
>> TEST PASSED
Continue...
ããã§ãã¡ã€ã«ã«åºåãããã©ããåãããŸãã
"y"ãå
¥åãããã¡ã€ã«åãé©åœã«ä»ããŠä¿åããŸããããã§ã¯/tmp/tpccuva_resulté
äžã«tpcc-uva_result_20130310.tpcãšããŠåºåãããããšãšãã/tmp/tpccuva_result/tpcc-uva_result_20130310.tpcãšããåœ¢ã§æå®ããŠããŸãããªãããã£ã¬ã¯ããªãæå®ããªãå Žåããã¡ã€ã«ã¯benchãå®è¡ããéã®ã«ã¬ã³ããã£ã¬ã¯ããªã«åºåãããŸãã
ããã§ä¿åãå¿ããŠãå床"6.- SHOW AND STORE TEST RESULTS"ãæå®ããŠåºåã§ããŸãã
Do yo want to store the results into a file? (y/n): y
Enter file name (prefereably with .tpc extension)
filename: /tmp/tpccuva_result/tpcc-uva_result_20130310.tpc
Results have been written on file /tmp/tpccuva_result/tpcc-uva_result_20130310.tpc.
Continue...
Gnuplotã§ã®ã°ã©ãåºå
Gnuplotã§çµæãã°ã©ãåºåããŸããä»å±ã®PDRãã¡ã€ã«ïŒtpccuva-guide.pdfã®P17ïœP18ããŒãžã®å
容ãå
ã«ä»¥äžã®ãããªã¹ã¯ãªãããäœæããŸãã
# vim /tmp/tpccuva_result/tpccuva_result/516.gnp
set terminal postscript 22
set size 1 , 1
set pointsize 1
set output "/tmp/tpccuva_result/561-NewOrder.eps"
set title "Response Time Distribution, New Order transactions"
set xlabel "Response Time (s)"
set ylabel "Number of Transactions"
plot [0: XX ] "/tmp/tpccuva_result/g1NewOrder.dat" with lines
set output "/tmp/tpccuva_result/561-Delivery.eps"
set title "Response Time Distribution, Delivery transactions"
set xlabel "Response Time (s)"
set ylabel "Number of Transactions"
plot [0: XX ] "/tmp/tpccuva_result/g1Delivery.dat" with lines
set output "/tmp/tpccuva_result/561-OrderStatus.eps"
set title "Response Time Distribution, Order Status transactions"
set xlabel "Response Time (s)"
set ylabel "Number of Transactions"
plot [0: XX ] "/tmp/tpccuva_result/g1OrderStatus.dat" with lines
set output "/tmp/tpccuva_result/561-Payment.eps"
set title "Response Time Distribution, Payment transactions"
set xlabel "Response Time (s)"
set ylabel "Number of Transactions"
plot [0: XX ] "/tmp/tpccuva_result/g1Payment.dat" with lines
set output "/tmp/tpccuva_result/561-StockLevel.eps"
set title "Response Time Distribution, Stock Level transactions"
set xlabel "Response Time (s)"
set ylabel "Number of Transactions"
plot [0: XX ] "/tmp/tpccuva_result/g1StockLevel.dat" with lines
"set output"ã§åºåãããã¡ã€ã«åãæå®ããŸãã
ã°ã©ãã®ãµã€ãºã¯"set size X, X"ã§èª¿æŽããŸãã
"plot[0: XX]"ã®"XX"ã¯åãã³ãããŒã¯çµæã®"Response time (min/avg/max/90th)"ã®"90th"ã®4åã®å€ãæå®ããŸãã
äœæããã¹ã¯ãªãããå®è¡ããŸãã
# /home/tpcc-uva/bin/bin/gnuplot /tmp/tpccuva_result/516.gnp
äœæããããã¡ã€ã«ã®1ã€ãç»åãã¥ãŒã¢ã§èгãŠã¿ãŸããšä»¥äžã®ãããªåœ¢ãšãªããŸãã
![]()
以äžã®ããã«çµæãã°ã©ããåéããåæ/ãã¥ãŒãã³ã°ãããŠããããšã«ãªããŸãã
ãŸã çµæããã¡ããšç¢ºèªã§ããŠããŸããããäžèšã®å
容ã§å®è¡ããéã«ã¯CPUã®%user䜿çšçã100%ã«åŒµãä»ããç¶æ
ãšãªããã»ãšãã©I/Oè² è·ã¯çºçããŸããã§ããã "COMPUTED THROUGHPUT: 12.537"ãšãªã£ãŠãããCPUãããã¯ãªã®ãCPUã«è² è·ãããã仿§ãªã®ãåãããŸãããããŸãã¯ããã³ãããŒã¯ã®å
容ãèŠçŽããŠã¿ãå¿
èŠãããããã«æã£ãŠããŸãã
ãããã«
PostgreSQLã®ãã³ãããŒã¯ãããã©ãŒãã³ã¹ãã¥ãŒãã³ã°çã®ããã«äœ¿ããããšæã£ãŠTPCC-UVaã詊ããŠã¿ãŸãããéçºãé²ãã§ããªãããã«æãæ®å¿µã§ããããã³ãããŒã¯çšã®DBã®äœæããã³ãããŒã¯çµæåºåããã³ãããŒã¯çšã®ããŒãã«ã®åé€ãªã©ãã€ã³ã¿ã©ã¯ãã£ãã«å®è¡ã§ããç¹ã¯å²ãšäœ¿ããããããã«æããŸããã
ãã ãæè¿ã§ã¯PostgreSQLã«å¯Ÿå¿ãããã³ãããŒã¯ããŒã«ã¯æè¿ã§ã¯ä»ã«ããã£ãšè¯ãããŒã«ãããããç¥ããŸããã