-
Notifications
You must be signed in to change notification settings - Fork 18
/
oltp.html
286 lines (210 loc) · 9.88 KB
/
oltp.html
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Tue Apr 2 10:51:48 2024 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>oltp</title>
</head>
<body>
<h1 align="center">oltp</h1>
<a href="#NAME">NAME</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#PROJECT USE">PROJECT USE</a><br>
<a href="#TRANSACTIONS">TRANSACTIONS</a><br>
<a href="#TAGS">TAGS</a><br>
<a href="#ENVIRONMENT">ENVIRONMENT</a><br>
<a href="#EXTERNAL CONTROL">EXTERNAL CONTROL</a><br>
<a href="#COPYRIGHT">COPYRIGHT</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">oltp −
The RWP*Load Simulator oltp Workload</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The oltp
workload is a general purpose workload that executes a mix
of different "business transactions" that emulate
an oltp workload. Some transactions have resemblance to
transactions from actual applications while others are
complete artificial.</p>
<h2>PROJECT USE
<a name="PROJECT USE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">To use in your
own project, copy the two files named <b>oltp.env</b> and
<b>oltp.rwl</b> to your working directory giving them names
after your project. Modify the files according to the
comments in them. The second file (copy of oltp.rwl) is
frequently referred to as the parameter file as it contains
all parameters specifying runs.</p>
<p style="margin-left:11%; margin-top: 1em">It is
recommended that you set RWLOADSIM_PATH to (include) the
directory where you have your copy of oltp.rwl. Otherwise,
to execute any of the oltp commands, your current directory
must be the directory where you have your project specific
copy of <b>oltp.rwl</b>. You should normally set all needed
environment variables such as RWLOLTP_NAME and
RWLOADSIM_PATH in your project specific copy of
<b>oltp.env</b>. If you have several related projects, it is
suggested that you have each projects .env and .rwl file in
the same directory as that allows you to easily switch
simply by sourcing the appropriate .env file.</p>
<p style="margin-left:11%; margin-top: 1em">The only
environment variable that <i>must</i> be set in your copy of
<b>oltp.env</b> is RWLOLTP_NAME which is your project
name.</p>
<p style="margin-left:11%; margin-top: 1em">Typing
<b>oltpverify</b> without any options is a fast way to
verify settings are fine.</p>
<p style="margin-left:11%; margin-top: 1em">Note that the
project specific .rwl file often contains passwords and that
you therefore should limit permissions to directories and
files appropriately.</p>
<p style="margin-left:11%; margin-top: 1em">Further details
about setup is available in <a href="oltpsetup.html">oltpsetup(2rwl)</a>.</p>
<h2>TRANSACTIONS
<a name="TRANSACTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The oltp
workload contains the following simulated business
transactions that are fast and of true oltp nature:</p>
<p style="margin-left:11%; margin-top: 1em"><b>makeorder</b></p>
<p style="margin-left:17%;">Simulates creating an order by
choosing a random customer, inserting one line to the
<b>order</b> table, and a random number of lines into the
<b>order_items</b> table.</p>
<p style="margin-left:11%; margin-top: 1em"><b>queryorder</b></p>
<p style="margin-left:17%;">Simulates querying an order by
choosing a random order, querying the <b>order</b> and
<b>order_items</b> tables, the latter with a join to the
<b>products</b> table.</p>
<p style="margin-left:11%; margin-top: 1em"><b>searchproducts</b></p>
<p style="margin-left:17%;">Simulates a product search by
doing a full table scan with a like condition on the
<b>product</b> table.</p>
<p style="margin-left:11%; margin-top: 1em"><b>aw_transactions</b></p>
<p style="margin-left:17%;">A completely artificial
transaction that does a select for update, and update and an
insert, and in 20% of the cases does a few more DML
statements. It is designed to potentially cause scalability
issues on RAC.</p>
<p style="margin-left:11%; margin-top: 1em"><b>awindex_query</b></p>
<p style="margin-left:17%;">Does an index-based query
against a table using an index with an extremely poor
clustering factor. During initial setup, the table size is
defined; it if is much less than the available buffer cache,
the whole table is likely to be cached, otherwise the query
is likely to always case physical reads.</p>
<p style="margin-left:11%; margin-top: 1em">The oltp
workload additionally contains the following simulated
business transactions that have heavy resource consumption
(compared to those above) and that therefore a more of a
batch nature:</p>
<p style="margin-left:11%; margin-top: 1em"><b>makeinvoices</b></p>
<p style="margin-left:17%;">Picks a random customer and
emulates printing/mailing of invoices for all orders that
have been shipped.</p>
<p style="margin-left:11%; margin-top: 1em"><b>complex_query</b></p>
<p style="margin-left:17%;">A completely artificial query
with high CPU usage compared to the above. It also has
potential for changes in execution plans.</p>
<p style="margin-left:11%; margin-top: 1em"><b>shiporder</b></p>
<p style="margin-left:17%;">Attempts fulfilling one order
from a single warehouse, and if not possible, uses multiple
warehouses. While doing so, inventories are locked
potentially causing waits; on purpose, this part may
occasionally cause deadlocks producing ORA-00060. It will
also update the status in the <b>orders</b> table to
"shipped" It is always executed in a loop that
attempts shipping all orders with status
"ordered".</p>
<p style="margin-left:11%; margin-top: 1em"><b>stockup</b></p>
<p style="margin-left:17%;">Simulates adding inventory to
many products in a random warehouse.</p>
<h2>TAGS
<a name="TAGS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The oltp
directory contains an experimental shell script,
maketags.sh, that will create a tags file for use by vi. The
tags file itself is also included. If you change current
directory to the oltp directory, you can e.g. do</p>
<p style="margin-left:11%; margin-top: 1em"><b>vi -t
runrun</b></p>
<p style="margin-left:11%; margin-top: 1em">to start vi at
the main run command for the workload found in the run.rwl
file. Note that the first "run" above is generated
by the rwloadsim tags generation and the second
"run" is the name of the file without the .rwl
suffix. You can similarly do</p>
<p style="margin-left:11%; margin-top: 1em"><b>vi -t
runrunsys</b></p>
<p style="margin-left:11%; margin-top: 1em">to start vi at
the run command from the runsys.rwl file, which is
everything related to system such as gathering of awr
snapshots.</p>
<h2>ENVIRONMENT
<a name="ENVIRONMENT"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The following
environment variables are used by the oltp workload:</p>
<p style="margin-left:11%; margin-top: 1em"><b>RWLOLTP_NAME</b></p>
<p style="margin-left:17%;">Sets your project name and will
also be the default key used when the various oltp commands
save data in your repository. This variable must exist.</p>
<p style="margin-left:11%; margin-top: 1em"><b>RWLOLTP_GNUPLOT1
RWLOLTP_GNUPLOT2</b></p>
<p style="margin-left:17%;">When using the -g option to
display running graphs using X-Windows, these environment
variables will be given to the gnuplot command line for
respectively the plot of resource usage such as database CPU
and throughput.</p>
<h2>EXTERNAL CONTROL
<a name="EXTERNAL CONTROL"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The oltp
workload is created with scripting and post-analysis of
results in mind, and except for the -g option to oltprun and
oltpcore, not much output is generated. To do live
demonstrations, typically showing much more live graphs, the
oltp workload can be running using "External
Control". When enabled, several parameters that
normally require changes to your {key}.rwl file can be
changed while a run is in progress, using either the
<a href="oltpxcset.html">oltpxcset(2rwl)</a> command or direct updates to the rwlrun_xc
table in the repository.</p>
<h2>COPYRIGHT
<a name="COPYRIGHT"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Copyright
© 2023 Oracle Corporation <br>
Licensed under the Universal Permissive License v 1.0 as
shown at https://oss.oracle.com/licenses/upl</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><a href="oltpcheckkey.html">oltpcheckkey(2rwl)</a>,
<a href="oltpcore.html">oltpcore(2rwl)</a>, <a href="oltpcreate.html">oltpcreate(2rwl)</a>, <a href="oltpday.html">oltpday(2rwl)</a>,
<a href="oltpdrop.html">oltpdrop(2rwl)</a>, <a href="oltpfilloe.html">oltpfilloe(2rwl)</a>, <a href="oltpforever.html">oltpforever(2rwl)</a>,
<a href="oltpforever2.html">oltpforever2(2rwl)</a>, <a href="oltpparams.html">oltpparams(2rwl)</a>, <a href="oltpplot.html">oltpplot(2rwl)</a>,
<a href="oltprun.html">oltprun(2rwl)</a>, <a href="oltpscale.html">oltpscale(2rwl)</a>, <a href="oltpscalereport.html">oltpscalereport(2rwl)</a>,
<a href="oltpsetup.html">oltpsetup(2rwl)</a>, <a href="oltpverify.html">oltpverify(2rwl)</a>, <a href="oltpplus.html">oltpplus(2rwl)</a>,
<a href="rwloadsim.html">rwloadsim(1rwl)</a>, <a href="oltpdirectory.html">oltpdirectory(2rwl)</a>, <a href="oltprunnumber.html">oltprunnumber(2rwl)</a>,
<a href="oltpping.html">oltpping(2rwl)</a></p>
<hr>
</body>
</html>