Profesjonalny benchmark dysku twardego

2010-09-30 , Papiewski Łukasz , Hardware / Sprzęt / Gadżety

Poniżej znajduję się log z instalacji oraz procesu przeprowadzania diagnostyki obciążenia bazy danych na komputerze typu desktop, przy wykorzystaniu programu tpccuva

export $ROOT=/path/to/directory
cd $ROOT
wget http://www.infor.uva.es/~diego/tpccuva/tpccuva-1.2.3-tarball.tar.gz
tar zxvf tpccuva-1.2.3-tarball.tar.gz 
cd tpccuva-1.2.3-tarball/
tar jxvf postgresql-base-8.1.4.tar.bz2 
mkdir $ROOT/pgsql
cd $ROOT/postgresql-base-8.1.4
./configure  --prefix=$ROOT/pgsql/
#libreadline5-dev wymagane
make
make install
mkdir $ROOT/pgsql/data
PATH=$ROOT/bin:$ROOT/pgsql/bin:$PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOT/pgsql/lib
export PATH LD_LIBRARY_PATH
if [ `which initdb | grep $ROOT` ]; 
    then echo "ok"; 
else echo "error"; 
fi;
initdb -D $ROOT/pgsql/data
 
 
    Success. You can now start the database server using:
    postmaster -D /home/papi/pkg/tpccuva-1.2.3-tarball/pgsql/data
    or
    pg_ctl -D /home/papi/pkg/tpccuva-1.2.3-tarball/pgsql/data -l logfile start
 
 
postmaster -D $ROOT/pgsql/data > log.out 2> log.err &
 
sed -i $ROOT/pgsql/data/postgresql.conf -rne 's/(checkpoint_segmentss+=).*/1 4/gip'
sed -re 's/#(checkpoint_segmentss+=s+)[[:digit:]]+/1 4/gi' -i $ROOT/pgsql/data/postgresql.conf
sed -re 's/#(checkpoint_timeouts+=s+)[[:digit:]]+/1 3600/gi' -i $ROOT/pgsql/data/postgresql.conf 
 
killall -HUP postmaster
cd $ROOT && tar zxvf tpccuva-1.2.3.tar.gz  
cd tpccuva-1.2.3 && make && make install
mkdir -p $ROOT/var/tpcc
sed -re "s%$(HOME)/tpcc-uva%$ROOT%"  -i Makefile   
make && make install
bench

TPC-C jest systemem sprawdzającym wydajność wysokiej klasy serwerów wraz z systemem operacyjnym i bazą danych. Symuluję wykonywanie trnsakcji typu OLTP w czasie od 2 do 8 godzin. Wyposażony jest w 5 typów takich tr

Item table       100,000 rows.
Warehouse table  1 row for each warehouse.
District table   10 rows for each warehouse.
Customer table   30,000 rows for each warehouse.
History table    30,000 rows for each warehouse.
Orderr table     30,000 rows for each warehouse.
Order-line table A mean value of 300,000 rows for each warehouse.
New-Order table  9,000 rows for each warehouse.
Stock table      100,000 rows for each warehouse.

Jak przeprowadzić taki benchmark

Na początku należy stowrzyć bazę danych z określoną liczbą magazynów (warhouses). Liczba ta jest określona wartością od 1 do 100 i dobiera testując przy jakiej największej wartości test jest pomyślnie zakończony. Jednostką jest tutaj tpmC (TPC-C transactions per minute)

[papi@turnip ~/tpcc-uva/tpccuva-1.2.3]$ $HOME/tpcc-uva/bin/bench




    +---------------------------------------------------+
        | BENCHMARK TPCC  --- UNIVERSIDAD DE VALLADOLID --- |
            +---------------------------------------------------+




        1.- CREATE A NEW TEST DATABASE







        8.- Quit





SELECT OPTION: 1
Enter the number of warehouses: 1
Continue? (y/n): y
Starting to populate database.
Start time: 2010-06-30 12:56:36
POPULATING DATABASE WITH 1 WAREHOUSES...

POPULATING TABLE WAREHOUSE ...
2010-06-30 12:56:36> Warehouse 1 Created
TABLE WAREHOUSE CREATED.
POPULATING TABLE ITEM ...
2010-06-30 12:57:16> 10000 Items created out of 100000
2010-06-30 12:57:32> 20000 Items created out of 100000
2010-06-30 12:57:54> 30000 Items created out of 100000
2010-06-30 12:58:17> 40000 Items created out of 100000
2010-06-30 12:58:59> 50000 Items created out of 100000
2010-06-30 12:59:33> 60000 Items created out of 100000
2010-06-30 12:59:49> 70000 Items created out of 100000
2010-06-30 13:00:06> 80000 Items created out of 100000
2010-06-30 13:00:30> 90000 Items created out of 100000
2010-06-30 13:00:58> 100000 Items created out of 100000
TABLE ITEM CREATED.
POPULATING TABLE DISTRICT ...
2010-06-30 13:00:58> Created District 1, Warehouse 1
2010-06-30 13:00:58> Created District 2, Warehouse 1
2010-06-30 13:00:58> Created District 3, Warehouse 1
2010-06-30 13:00:58> Created District 4, Warehouse 1
2010-06-30 13:00:58> Created District 5, Warehouse 1
2010-06-30 13:00:58> Created District 6, Warehouse 1
2010-06-30 13:00:58> Created District 7, Warehouse 1
2010-06-30 13:00:58> Created District 8, Warehouse 1
2010-06-30 13:00:58> Created District 9, Warehouse 1
2010-06-30 13:00:58> Created District 10, Warehouse 1
TABLE DISTRICT CREATED.
POPULATING TABLE CUSTOMER ...
2010-06-30 13:01:06> Created customers. Warehouse 1, District 1
2010-06-30 13:01:19> Created customers. Warehouse 1, District 2
2010-06-30 13:01:27> Created customers. Warehouse 1, District 3
2010-06-30 13:01:38> Created customers. Warehouse 1, District 4
2010-06-30 13:01:46> Created customers. Warehouse 1, District 5
2010-06-30 13:01:54> Created customers. Warehouse 1, District 6
2010-06-30 13:02:01> Created customers. Warehouse 1, District 7
2010-06-30 13:02:12> Created customers. Warehouse 1, District 8
2010-06-30 13:02:22> Created customers. Warehouse 1, District 9
2010-06-30 13:02:30> Created customers. Warehouse 1, District 10
TABLE CUSTOMER CREATED.
POPULATING TABLE STOCK ...
2010-06-30 13:02:36> 2000 Items Created of Warehouse 1
2010-06-30 13:02:41> 4000 Items Created of Warehouse 1
2010-06-30 13:02:50> 6000 Items Created of Warehouse 1
2010-06-30 13:02:55> 8000 Items Created of Warehouse 1
2010-06-30 13:03:01> 10000 Items Created of Warehouse 1
2010-06-30 13:03:09> 12000 Items Created of Warehouse 1
2010-06-30 13:03:14> 14000 Items Created of Warehouse 1
2010-06-30 13:03:23> 16000 Items Created of Warehouse 1
2010-06-30 13:03:28> 18000 Items Created of Warehouse 1
2010-06-30 13:03:34> 20000 Items Created of Warehouse 1
2010-06-30 13:03:41> 22000 Items Created of Warehouse 1
2010-06-30 13:03:46> 24000 Items Created of Warehouse 1
2010-06-30 13:03:51> 26000 Items Created of Warehouse 1
2010-06-30 13:03:56> 28000 Items Created of Warehouse 1
2010-06-30 13:04:01> 30000 Items Created of Warehouse 1
2010-06-30 13:04:06> 32000 Items Created of Warehouse 1
2010-06-30 13:04:11> 34000 Items Created of Warehouse 1
2010-06-30 13:04:20> 36000 Items Created of Warehouse 1
2010-06-30 13:04:25> 38000 Items Created of Warehouse 1
2010-06-30 13:04:30> 40000 Items Created of Warehouse 1
2010-06-30 13:04:35> 42000 Items Created of Warehouse 1
2010-06-30 13:04:40> 44000 Items Created of Warehouse 1
2010-06-30 13:04:50> 46000 Items Created of Warehouse 1
2010-06-30 13:04:55> 48000 Items Created of Warehouse 1
2010-06-30 13:05:00> 50000 Items Created of Warehouse 1
2010-06-30 13:05:05> 52000 Items Created of Warehouse 1
2010-06-30 13:05:10> 54000 Items Created of Warehouse 1
2010-06-30 13:05:15> 56000 Items Created of Warehouse 1
2010-06-30 13:05:20> 58000 Items Created of Warehouse 1
2010-06-30 13:05:29> 60000 Items Created of Warehouse 1
2010-06-30 13:05:34> 62000 Items Created of Warehouse 1
2010-06-30 13:05:39> 64000 Items Created of Warehouse 1
2010-06-30 13:05:44> 66000 Items Created of Warehouse 1
2010-06-30 13:05:49> 68000 Items Created of Warehouse 1
2010-06-30 13:05:54> 70000 Items Created of Warehouse 1
2010-06-30 13:06:04> 72000 Items Created of Warehouse 1
2010-06-30 13:06:09> 74000 Items Created of Warehouse 1
2010-06-30 13:06:14> 76000 Items Created of Warehouse 1
2010-06-30 13:06:19> 78000 Items Created of Warehouse 1
2010-06-30 13:06:24> 80000 Items Created of Warehouse 1
2010-06-30 13:06:29> 82000 Items Created of Warehouse 1
2010-06-30 13:06:38> 84000 Items Created of Warehouse 1
2010-06-30 13:06:43> 86000 Items Created of Warehouse 1
2010-06-30 13:06:48> 88000 Items Created of Warehouse 1
2010-06-30 13:06:53> 90000 Items Created of Warehouse 1
2010-06-30 13:06:58> 92000 Items Created of Warehouse 1
2010-06-30 13:07:03> 94000 Items Created of Warehouse 1
2010-06-30 13:07:10> 96000 Items Created of Warehouse 1
2010-06-30 13:07:21> 98000 Items Created of Warehouse 1
2010-06-30 13:07:26> 100000 Items Created of Warehouse 1
TABLE STOCK CREATED.
POPULATING TABLE HISTORY ...
2010-06-30 13:07:33> Created. Warehouse 1, District 1
2010-06-30 13:07:39> Created. Warehouse 1, District 2
2010-06-30 13:07:56> Created. Warehouse 1, District 3
2010-06-30 13:08:10> Created. Warehouse 1, District 4
2010-06-30 13:08:18> Created. Warehouse 1, District 5
2010-06-30 13:08:41> Created. Warehouse 1, District 6
2010-06-30 13:08:52> Created. Warehouse 1, District 7
2010-06-30 13:08:59> Created. Warehouse 1, District 8
2010-06-30 13:09:06> Created. Warehouse 1, District 9
2010-06-30 13:09:22> Created. Warehouse 1, District 10
TABLE HISTORY CREATED.
POPULATING TABLE ORDER ...
2010-06-30 13:10:52> Created orders of Warehouse 1, District 1
2010-06-30 13:12:13> Created orders of Warehouse 1, District 2
2010-06-30 13:13:42> Created orders of Warehouse 1, District 3
2010-06-30 13:15:14> Created orders of Warehouse 1, District 4
2010-06-30 13:16:36> Created orders of Warehouse 1, District 5
2010-06-30 13:18:04> Created orders of Warehouse 1, District 6
2010-06-30 13:19:38> Created orders of Warehouse 1, District 7
2010-06-30 13:21:02> Created orders of Warehouse 1, District 8
2010-06-30 13:22:31> Created orders of Warehouse 1, District 9
2010-06-30 13:23:55> Created orders of Warehouse 1, District 10
TABLE ORDER AND ORDER_LINE CREATED.
POPULATING TABLE NEW-ORDER ...
2010-06-30 13:23:57> New-orders created. Warehouse 1, District 1
2010-06-30 13:23:59> New-orders created. Warehouse 1, District 2
2010-06-30 13:24:00> New-orders created. Warehouse 1, District 3
2010-06-30 13:24:02> New-orders created. Warehouse 1, District 4
2010-06-30 13:24:05> New-orders created. Warehouse 1, District 5
2010-06-30 13:24:06> New-orders created. Warehouse 1, District 6
2010-06-30 13:24:08> New-orders created. Warehouse 1, District 7
2010-06-30 13:24:10> New-orders created. Warehouse 1, District 8
2010-06-30 13:24:11> New-orders created. Warehouse 1, District 9
2010-06-30 13:24:13> New-orders created. Warehouse 1, District 10
TABLE NEW_ORDER CREATED.

POPULATION COMPLETED.
Start time: 2010-06-30 12:56:36
End time: 2010-06-30 13:24:13

Continue...    




    +---------------------------------------------------+
        | 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
->Enter number of warehouses 1
->Enter number of terminals per warehouse (max. 10) 1

Cytaty

- Simplicity is the ultimate sophistication. - Leonardo da Vinci,
- Popularny człowiek wzbudza zawiść potężnych - Thufir Hawat o Leto Atrydzie (na Kaladanie),
- Szczęście następuje po smutku, a smutek po szczęściu; człowiek jest naprawdę wolny, gdy przestaje rozróżniać między smutkiem a szczęściem, między dobrem a złem - Aforyzmy buddyjskie.