Skip to content

Commit 3fd5cc4

Browse files
committed
Merge branch 'bkedev' into 'jfkdev'
# Conflicts: # src/rwl.h
2 parents 56c8e1b + 41a2e07 commit 3fd5cc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1126
-282
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# RWP\*Load Simulator Release Notes
22

3+
## 3.1.1
4+
5+
* Bug fixes
6+
* Add parsefailure to oltp external control
7+
38
## 3.1.0
49

510
* Bug fixes

admin/rwl311.sql

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- update the RWP*Load Simulator repository
2+
-- for version 3.1.1
3+
--
4+
-- Copyright (c) 2023 Oracle Corporation
5+
-- Licensed under the Universal Permissive License v 1.0
6+
-- as shown at https://oss.oracle.com/licenses/upl/
7+
--
8+
-- Changes
9+
--
10+
-- NAME DATE COMMENTS
11+
-- bengsig 3-oct-2023 Add parsefailure column to oltpxc
12+
-- bengsig 25-apr-2023 Creation
13+
--
14+
alter table oltpxc add
15+
( parsefailure number )
16+
/
17+
18+
update oltpxc set parsefailure = 0
19+
/
20+
commit
21+
/

admin/rwloadsim.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ create table oltpxc
181181
, affinity number
182182
, rowspins number
183183
, arraysize number
184+
, parsefailure number
184185
, constraint oltpxc_pk primary key(key, hostname)
185186
)
186187
/

bin/mtitcore

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
# Changes
1212
#
13-
# bengsig 10-may-2023 Creation
13+
# bengsig 9-nov-2023 - support multiple application servers
14+
# bengsig 10-may-2023 - Creation
1415

1516
# If stdin is not a tty
1617
# show how we were called
@@ -156,7 +157,7 @@ fi
156157
eval `rwloadsim -q -i proccount:=$procs -i runperiod:=$runperiod parameters2shell.rwl`
157158

158159
# verify that it compiles
159-
rwloadsim -u -v $extra_args -e -- '-x $mute:141' $runfile || exit $?
160+
rwloadsim -u -v $extra_args -e '-x $mute:141' $runfile || exit $?
160161

161162
if test $mtitxc = yes
162163
then
@@ -189,7 +190,7 @@ then
189190
rwloadsim -u -v -c 15 -sss -P $prepfile -k $key -K "$komment" -q \
190191
--fulltitle="$komment" \
191192
-i runperiod:=$runperiod -i proccount:=$procs prepare.rwl
192-
mute59='-x$mute:59'
193+
mute59='--mute=59'
193194
else
194195
rwloadsim -u -v -c $rampup -sss -P $prepfile -k $key -K "$komment" -q \
195196
--fulltitle="$komment" \
@@ -227,7 +228,6 @@ then
227228
echo $! >> $killfile
228229
fi
229230

230-
markerfile='string(1000)xc_marker_file:="'$resultsdir/$subdir/$runnumber/markers.txt'";'
231231
quiet=''
232232

233233
# Start sys gather
@@ -239,17 +239,20 @@ then
239239
echo $awrpid >> $killfile
240240
fi
241241

242+
prepvalue=`cat $prepfile`
242243
# show countdown to user
243244
echo -n '**** remaining:'
244245
# Start the real workers
245246
while test $procnumber -le $procs
246247
do
247248
sleep $script_ramp
248249
echo -n " "`expr $procs - $procnumber`
249-
rwloadsim $mute59 -u -r -i procnumber:=$procnumber \
250+
eval $(rwloadsim -q -i proccount:=$procs -i runperiod:=$runperiod rwlcall.rwl -i procnumber:=$procnumber)
251+
252+
$rwlcall $rwlcallargs $mute59 -u -r -i procnumber:=$procnumber \
250253
--flush-stop=$runperiod --flush-every=2 -v -i runperiod:=$runperiod \
251-
--procno $procnumber \
252-
-W -i doawr:=$doawr -x "$markerfile" $mtitsetxc $extra_args -i proccount:=$procs -R $prepfile $quiet $runfile &
254+
--procno $procnumber --markerfile=$resultsdir/$subdir/$runnumber/markers.txt \
255+
-W -i doawr:=$doawr $mtitsetxc $extra_args -i proccount:=$procs -M $prepvalue $quiet $runfile &
253256
quiet='-q' # only messages from first
254257
procnumber=`expr $procnumber + 1`
255258
if test x$killfile != x

bin/mtitplot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ help=no
2121
markerfile=`mktemp`
2222
trap "rm -f $markerfile" 0 int
2323
xcolor=''
24+
runnumber=0
2425

2526
while test $1 != '--'
2627
do

bin/oltpcore

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
# Changes
1313
#
14+
# bengsig 9-nov-2023 - support multiple application servers
15+
# bengsig 2-nov-2023 - Add extra_args plots, etc
16+
# bengsig 17-oct-2023 - Add extra_args to prepare
1417
# bengsig 29-sep-2023 - No ash if no awr
1518
# bengsig 7-aug-2023 - Also mute59 in graphs
1619
# bengsig 1-aug-2023 - Add oltpxcset markers from oltpxcrun
@@ -161,6 +164,9 @@ rwloadsim -i simulatebatch:=$simulatebatch parameters.rwl || exit $?
161164
# show the contents of our parameters file as a reference
162165
rwloadsim -q $extra_args -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -i proccount:=$procs -i show_changed_values:=1 -x 'string key_to_show := "'$key'";' parameters.rwl
163166

167+
# Show size of aw_cols and skewness in access
168+
rwloadsim -q aw_sizeinfo.rwl
169+
164170
# Check parameters.rwl is silent
165171
shouldbezero=`rwloadsim -q parameters.rwl | wc -c`
166172
if test "$shouldbezero" -ne 0
@@ -171,10 +177,10 @@ then
171177
fi
172178

173179
# Set shell variables
174-
eval `rwloadsim -q -i proccount:=$procs -i runperiod:=$runperiod parameters2shell.rwl`
180+
eval `rwloadsim -q $extra_args -i proccount:=$procs -i runperiod:=$runperiod parameters2shell.rwl`
175181

176182
# verify that it compiles
177-
rwloadsim -u -v $extra_args -e -- '-x $mute:141' $runfile || exit $?
183+
rwloadsim -q -u -v $extra_args -e '-x $mute:141' $runfile || exit $?
178184

179185
if test $oltpxc = yes
180186
then
@@ -184,9 +190,6 @@ else
184190
oltpsetxc='';
185191
fi
186192

187-
# Show size of aw_cols and skewness in access
188-
rwloadsim -q aw_sizeinfo.rwl
189-
190193
# Truncate the artificial transaction tables
191194
# this is mostly a precaution, as it should have been done
192195
# after finishing last run
@@ -210,12 +213,12 @@ komment=`echo $RWLOLTP_NAME $rwl_title $extrakomment | sed 's/[\\"'"']//g"`
210213
# prepare the run; this will also create the $resultsdir/$subdir/$runnumber/env file
211214
if test $oltpxc = yes
212215
then
213-
rwloadsim -u -v -c 15 -sss -P $prepfile -k $key -K "$komment" -q \
216+
rwloadsim $extra_args -u -v -c 15 -sss -P $prepfile -k $key -K "$komment" -q \
214217
--fulltitle="$komment" \
215218
-i runperiod:=$runperiod -i proccount:=$procs prepare.rwl
216-
mute59='-x$mute:59'
219+
mute59='--mute=59'
217220
else
218-
rwloadsim -u -v -c $rampup -sss -P $prepfile -k $key -K "$komment" -q \
221+
rwloadsim $extra_args -u -v -c $rampup -sss -P $prepfile -k $key -K "$komment" -q \
219222
--fulltitle="$komment" \
220223
-i runperiod:=$runperiod -i proccount:=$procs prepare.rwl
221224
mute59=''
@@ -234,27 +237,29 @@ echo $runnumber > $runnumberfile
234237

235238
echo "runperiod=$runperiod" >> $resultsdir/$subdir/$runnumber/env
236239
echo "komment='$komment'" >> $resultsdir/$subdir/$runnumber/env
240+
echo "showfail='$showfail'" >> $resultsdir/$subdir/$runnumber/env
237241
if test $pool_type = sessionpool -o $pool_type = connectionpool
238242
then
239243
echo "plotactive=yes" >> $resultsdir/$subdir/$runnumber/env
240244
else
241245
echo "plotactive=no" >> $resultsdir/$subdir/$runnumber/env
242246
fi
243247
rwloadsim $oltpsetxc -q $extra_args -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -i proccount:=$procs -i show_changed_values:=1 -x 'string key_to_show := "'$key'";' parameters.rwl > $resultsdir/$subdir/$runnumber/parmatstart.txt
248+
# add size of aw_cols and skewness in access
249+
rwloadsim -q aw_sizeinfo.rwl >> $resultsdir/$subdir/$runnumber/parmatstart.txt
244250

245251
# Start ping gather and also ask for event notification
246-
rwloadsim $oltpsetxc $mute59 -u -E -q -R $prepfile -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod runping.rwl &
252+
rwloadsim $extra_args $oltpsetxc $mute59 -u -E -q -R $prepfile -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod runping.rwl &
247253

248254
if test x$killfile != x
249255
then
250256
echo $! >> $killfile
251257
fi
252258

253-
markerfile='string(1000)xc_marker_file:="'$resultsdir/$subdir/$runnumber/markers.txt'";'
254259
quiet=''
255260

256261
# Start sys gather
257-
rwloadsim $mute59 $oltpsetxc -u -A 1 -r -q -i procnumber:=99999 -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -i proccount:=$procs -R $prepfile -i doawr:=$doawr runsys.rwl $starttime &
262+
rwloadsim $extra_args $mute59 $oltpsetxc -u -A 1 -r -q -i procnumber:=99999 -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -i proccount:=$procs -R $prepfile -i doawr:=$doawr runsys.rwl $starttime &
258263
awrpid=$!
259264

260265
if test x$killfile != x
@@ -268,16 +273,21 @@ then
268273
rwloadsim -u -q -i simulatebatch:=$simulatebatch -i runperiod:=$runperiod -R $prepfile runtrunc.rwl &
269274
fi
270275

276+
prepvalue=`cat $prepfile`
277+
271278
# show countdown to user
272279
echo -n '**** remaining:'
273280
# Start the real workers
274281
while test $procnumber -le $procs
275282
do
276283
sleep $script_ramp
277284
echo -n " "`expr $procs - $procnumber`
278-
rwloadsim $mute59 -u -r -i simulatebatch:=$simulatebatch -i procnumber:=$procnumber \
285+
# get the actual call to execute in background
286+
eval $(rwloadsim -q -i proccount:=$procs -i runperiod:=$runperiod rwlcall.rwl -i procnumber:=$procnumber)
287+
# by default, rwlcall=rwloadsim and rwlcallargs is empty
288+
$rwlcall $rwlcallargs $mute59 -u -r -i simulatebatch:=$simulatebatch -i procnumber:=$procnumber \
279289
--flush-stop=$runperiod --flush-every=2 -v -i runperiod:=$runperiod \
280-
-W -i xc_run_dedicated:=$xc_run_dedicated -i doawr:=$doawr -x $markerfile $oltpsetxc $extra_args -i proccount:=$procs -R $prepfile $quiet $runfile &
290+
-W -i xc_run_dedicated:=$xc_run_dedicated -i doawr:=$doawr --markerfile=$resultsdir/$subdir/$runnumber/markers.txt $oltpsetxc $extra_args -i proccount:=$procs -M $prepvalue $quiet $runfile &
281291
quiet='-q' # only messages from first
282292
procnumber=`expr $procnumber + 1`
283293
if test x$killfile != x
@@ -291,13 +301,13 @@ echo '****' started all background jobs at `date`
291301

292302
sleep 3
293303
# show running graph of dbcpu and dbtime
294-
test $graphs != no && rwloadsim $mute59 $oltpsetxc -u -q -R $prepfile plotfigures.rwl -i runperiod:=$runperiod ';' $runnumber | gnuplot $RWLOLTP_GNUPLOT1 &
304+
test $graphs != no && rwloadsim $extra_args $mute59 $oltpsetxc -u -q -R $prepfile plotfigures.rwl -i runperiod:=$runperiod ';' $runnumber | gnuplot $RWLOLTP_GNUPLOT1 &
295305

296306
# show running graph of throughput
297-
test $graphs = yes && rwloadsim $mute59 $oltpsetxc -u -q -R $prepfile plotruntp.rwl -i runperiod:=$runperiod ';' $runnumber | gnuplot $RWLOLTP_GNUPLOT2 &
307+
test $graphs = yes && rwloadsim $extra_args $mute59 $oltpsetxc -u -q -R $prepfile plotruntp.rwl -i runperiod:=$runperiod ';' $runnumber | gnuplot $RWLOLTP_GNUPLOT2 &
298308

299309
# show running graph of queue/exec time
300-
test $graphs = qe && rwloadsim $mute59 $oltpsetxc -u -q -R $prepfile plotrunwetim.rwl -i runperiod:=$runperiod ';' $runnumber | gnuplot $RWLOLTP_GNUPLOT2 &
310+
test $graphs = qe && rwloadsim $extra_args $mute59 $oltpsetxc -u -q -R $prepfile plotrunwetim.rwl -i runperiod:=$runperiod ';' $runnumber | gnuplot $RWLOLTP_GNUPLOT2 &
301311

302312
# with external control, we simply wait
303313
if test $oltpxc = no

bin/oltpdirectory

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ help=no
2020
awr=no
2121
scalekey=''
2222
runnumber=''
23+
mykey="$RWLOLTP_NAME"
24+
wantlatest=no
2325

24-
usage="Usage: $commandname [-a|--awrdirectory] [-h|-H|--help] [-s|--scalekey key] [-r|--runnumber N] [-l|--latest]"
25-
options='aAhHs:r:l -l latest,awrdirectory,help,scalekey:,runnumber:'
26+
usage="Usage: $commandname [-a|--awrdirectory] [-h|-H|--help] [-s|--scalekey key] [-k|--key key] [-r|--runnumber N] [-l|--latest]"
27+
options='aAhHs:r:lk: -l key:,latest,awrdirectory,help,scalekey:,runnumber:'
2628

2729
# Get directory names from parameters.rwl
2830

@@ -34,19 +36,26 @@ set -- `getopt -u -n $commandname -o $options -- "$@"`
3436
while test $1 != '--'
3537
do
3638
case $1 in
37-
-l|--latest) runnumber=`rwloadsim latest.rwl`; shift;
38-
;;
3939
-r|--runnumber) runnumber=`expr 0 + $2`; shift; shift;
4040
;;
41+
-k|--key) mykey=$2; shift; shift;
42+
;;
4143
-s|--scalekey) scalekey=$2; shift; shift;
4244
;;
45+
-l|--latest) wantlatest=yes; shift;
46+
;;
4347
-a|-A|--awrdirectory) awr=yes; shift;
4448
;;
4549
--help|-h|-H) help=yes; shift;
4650
;;
4751
esac
4852
done
4953

54+
if test $wantlatest = yes
55+
then
56+
runnumber=`rwloadsim --mykey=$mykey latest.rwl`
57+
fi
58+
5059
shift # removes --
5160

5261
if test $# -ge 1 -o x$help = xyes

bin/oltpforever

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,37 @@
33
# Licensed under the Universal Permissive License v 1.0
44
# as shown at https://oss.oracle.com/licenses/upl/
55

6+
# History
7+
#
8+
# bengsig 10-oct-2023 - Smarter run file
9+
# bengsig 4-oct-2023 - Longoptions, --sleep
10+
# bengsig 2019 - Creation
11+
612
. oltp-setup-env
713

8-
options="Ggk:HaR:WK:"
9-
usage="$commandname [-H] [-g|-G] [-a] [-k key] [-R file] [-W] [-K nn] [komment text ...]"
14+
options="Ggk:HaR:WK:s: -l sleep:,help,graphs,qegraphs,preallocate,key:,runfile:,awrwait,awrkill:"
15+
usage="$commandname [-H|--help] [-g|-G] [-a] [-k key] [-R file] [-W] [-K nn] [komment text ...]"
1016

1117
copyargs=''
1218
help=no
19+
sleeptime=0
1320
key=$RWLOLTP_NAME
1421

22+
getopt -Q -o $options -- "$@" || exit 1
1523
set -- `getopt -u -n $commandname -o $options -- "$@"`
1624

1725
while test $1 != '--'
1826
do
1927
case $1 in
20-
-K|-R) copyargs="$copyargs $1 $2"; shift; shift;
28+
--awrkill|-K|-R) copyargs="$copyargs $1 $2"; shift; shift;
29+
;;
30+
--sleep|-s) sleeptime=$2; shift; shift;
2131
;;
22-
-k) key=$2; shift; shift;
32+
--key|-k) key=$2; shift; shift;
2333
;;
24-
-W|-a|-g|-G) copyargs="$copyargs $1"; shift;
34+
--awrwait|--graphs|--qegraphs|--preallocate|-W|-a|-g|-G) copyargs="$copyargs $1"; shift;
2535
;;
26-
-H ) help=yes; shift;
36+
--help|-H ) help=yes; shift;
2737
;;
2838
esac;
2939
done
@@ -34,12 +44,13 @@ if test x$help = xyes
3444
then
3545
echo "$usage"
3646
cat <<END
37-
-H : show this help
38-
-k key : set the value of the key to be used in repository, default $RWLOLTP_NAME
39-
-g : show running graphs - requires X windows
40-
-G : show alternative running graphs - requires X windows
41-
-a : pre allocate partitions - use with great care
42-
-R fil : Set non-default file to execute, default run.rwl
47+
-H --help : show this help
48+
-k --key key : set the value of the key to be used in repository, default $RWLOLTP_NAME
49+
-g --graphs : show running graphs - requires X windows
50+
-G --qegraphs : show alternative running graphs - requires X windows
51+
-a --preallocate : pre allocate partitions - use with great care
52+
-R --runfile fil : Set non-default file to execute, default run.rwl
53+
-s --sleep sec : sleep this many seconds after each run
4354
END
4455
exit 0
4556
fi
@@ -59,19 +70,24 @@ then
5970
fi
6071

6172

62-
echo Workload started on `date` from `tty` on `hostname` > $runfile
73+
echo '# Workload started on' `date` from `tty` on `hostname` > $runfile
6374

6475
# this is the normal runtime settings
6576
runtime=3590 # just under 1h
66-
separation=1700 # delay in starting forever2.sh
77+
# delay in starting forever2.sh
78+
separation=`expr 1700 + $sleeptime / 2`
6779

6880
# for debug use these:
6981
#runtime=295
70-
#separation=150
82+
#separation=`expr 150 + $sleeptime / 2`
7183

7284
trap "rm -f $runfile $side2time $side2args; exit 1" sigint
73-
echo Remove this file to stop workload after at most $runtime seconds. >> $runfile
74-
echo The process id of ./forever.sh starting this workload is $$ >> $runfile
85+
echo '# Remove this file to stop workload after at most' $runtime seconds. >> $runfile
86+
echo '# The process id of oltpforever starting this workload is' $$ >> $runfile
87+
echo '# You may want to execute one of these commands:' >> $runfile
88+
echo 'echo OLTPFOREVER IS RUNNING HERE >' `tty` >> $runfile
89+
echo 'ps -fp'$$ -wwww >> $runfile
90+
7591

7692
# run until the file is removed
7793
while test -f $runfile
@@ -91,6 +107,11 @@ do
91107
echo "-k $key $extrascript $copyargs -r $runtime -n $forever_proccount $komment" > $side2args
92108

93109
oltprun -k $key $extrascript $copyargs -r $runtime -n $forever_proccount $komment
110+
if test $sleeptime -gt 0
111+
then
112+
echo sleeping for $sleeptime seconds
113+
sleep $sleeptime
114+
fi
94115

95116
done
96117
rm -f $runfile $side2time $side2args

0 commit comments

Comments
 (0)