forked from muehlbau/dbt3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuickStart
168 lines (117 loc) · 5.41 KB
/
QuickStart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
OSDL DBT-3 QuickStart for TCP Postgres
=====================
Modified to run with remote Postgres servers, it will not fully comply with the TPC-H
specification because it has disabled parts that require control over the database instance (start/stop). The refresh and database instance running checks are disabled.
Benchmark results will provide enough information to take decisions about implementations of cloud/remote postgres running servers.
Requirements
------------
- PostgreSQL
- sysstat
- gnuplot 4.0
How to install
--------------
(1) Run autogen to create a configure script.
$ sh autogen.sh
(2) Run configure with several options as you need.
To configure set the path to postgres location, you can also specify
PostgreSQL options:
$ ./configure --with-postgresql=/lib/postgresql/14
For more details about configure options, run with --help option:
$ ./configure --help
(3) Run make to build dbgen, qgen, and other tools.
$ make
How to run
----------
(1) Make sure that `dbt3_profile' has been configured correctly, and
modify it if needed.
Check your `dbt3_profile' in `scripts' directory. `DSS_PATH' is
a directory that holds data files generated by dbgen.
Other variables need not to be modified by hand.
(2) Make sure that `pgsql_profile' have been
configured correctly, and modify it if needed.
You have to specify PGHOME and PGDATA
correctly in `pgsql_profile' in the `scripts/pgsql' directory.
Other options need not to be modified by hand.
(3) Run `gen_data.sh' to generate a data set in flat file format to be
loaded.
Running `gen_data.sh' script with specifying a scalefactor parameter
would generate flat files into `DSS_PATH' directory.
$ cd scripts
$ ./gen_data.sh 1
(generate dataset with scale factor 1)
For creating bigger data, set the scale factor N+1, this will multiply the size of the generation, each factor is like 1.1 GB of data. You must have enough free disk space for this.
After gen_data.sh script, make sure the data files have been generated
correctly.
$ ls -l ~/local/data
total 10895544
-rw-rw-r-- 1 snaga snaga 243386690 Apr 16 00:57 customer.tbl
-rw-rw-r-- 1 snaga snaga 7715685934 Apr 16 01:01 lineitem.tbl
-rw-rw-r-- 1 snaga snaga 2078 Apr 16 00:56 nation.tbl
-rw-rw-r-- 1 snaga snaga 1734296707 Apr 16 01:00 orders.tbl
-rw-rw-r-- 1 snaga snaga 1196552305 Apr 16 00:57 partsupp.tbl
-rw-rw-r-- 1 snaga snaga 242067136 Apr 16 00:57 part.tbl
-rw-rw-r-- 1 snaga snaga 391 Apr 16 00:56 region.tbl
-rw-rw-r-- 1 snaga snaga 14090274 Apr 16 00:56 supplier.tbl
$
(4) Run `dbt3-run-workload' to run test workloads.
To see what options can be used with the workload script use the `-h` option.
$ ./dbt3-run-workload -h
Options are:
usage: run_workload.sh [-123eghou] [-c comment] [-d data dir]
[-f scale factor] [-l database port] [-n streams]
[-p load test database parameters]
[-q power test database parameters]
[-r throughput test database parameters]
[-s seed]
1 - run load test
2 - run power test
3 - run throughput test
c - comment about the test
d - database directory
e - EXPLAIN ANALYZE (PostgreSQL only)
g - generate flat files
h - this help message
l - database port
n - number of throughput streams
o - enable oprofile
p - database parameters for the load test
q - database parameters for the power test
r - database parameters for the throughput test
s - seed
u - use tablespaces
Now, you have been prepared to load data into the database and run
workloads. Run `dbt3-run-workload' in the `scripts' directory.
$ ./dbt3-run-workload
You can determine the progress by refering 'time_statistics' table
in the test database while running those workloads.
$ psql -c 'select * from time_statistics' dbt3
(5) Make sure that the result has been published in the `output'
directory.
The result would be generated in `scripts/output/<run number>'
directory.
Make sure that `index.html', `q_time.png' and other result
files have been generated in the directory, and you can see
the report in HTML format with opening `index.html' with
your brower.
$ ls -lF output/1/
total 40
-rw-rw-r-- 1 snaga snaga 387 Apr 29 04:37 config.txt
-rw-rw-r-- 1 snaga snaga 1108 Apr 29 04:39 index.html
drwxrwxr-x 3 snaga snaga 4096 Apr 28 01:33 load/
drwxrwxr-x 6 snaga snaga 4096 Apr 29 04:39 power1/
-rw-rw-r-- 1 snaga snaga 537 Apr 29 04:39 q_time.input
-rw-rw-r-- 1 snaga snaga 2634 Apr 29 04:38 q_time.out
-rw-rw-r-- 1 snaga snaga 332 Apr 29 04:39 q_time_p.data
-rw-rw-r-- 1 snaga snaga 4032 Apr 29 04:39 q_time.png
-rw-rw-r-- 1 snaga snaga 10 Apr 28 01:33 seed
drwxrwxr-x 4 snaga snaga 4096 Apr 29 04:39 throughput1/
$
DBT-3 consists of three tests, Load Test, Power Test and
Throughput Test, so there are three subdirectories in
the result directory by default.
Any questions?
--------------
Please visit the project page at sourceforge, and ask your
questions in the forum or the mailing lists:
Database Test Suite
http://sourceforge.net/projects/osdldbt/