Skip to content

Commit d798845

Browse files
committed
Merge branch 'bkemain' into 'oramain'
Bkemain to Oramain See merge request rwp/rwloadsim!25
2 parents 6bb6d05 + e853b15 commit d798845

24 files changed

+3450
-3022
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* OLTP workload gets ociping and connect times
88
* Bitwise operations and input of hexadecimal constants
99
* Bit set/clear assignments
10+
* session pool can set max usage count and max lifetime
1011
* dbsecounds() and ociseconds() functions
1112

1213
## 3.1.3

docs/ERRORLIST.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,10 @@ allowed.
13381338
The right operand of the bitwise shift operation is larger than or equal to
13391339
the bit width of the left operand. The right operand should be at most 63.
13401340

1341+
### RWL-328 error: "the connection pool database '%s' cannot use release %s"
1342+
The release count or every time can only be provided for session pools, you can
1343+
use release time (without the count or every keyword) as an alternative.
1344+
13411345
### RWL-600 internal error: '%s'
13421346
An abnormal situation caused an internal error in rwloadsim.
13431347
This is in most cases due to a programming error and it

docs/refman/connping.html

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/refman/databasedeclaration.html

Lines changed: 42 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/refman/ociping.html

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/refman/utilities.html

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/man1rwl/databasedeclaration.1rwl

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ databasedeclaration \- RWP*Load Simulator declare a database connection
66
\fC
77
databasedeclaration ::=
88
\fBdatabase\fR identifier [ concatenation ]
9-
databasespecification { databasespecification }
9+
{ databasespecification }
1010

1111
databasespecification ::=
1212
\fBusername\fR concatenation
@@ -18,14 +18,25 @@ databasespecification ::=
1818
| \fBreconnect\fR
1919
| [ \fBthreads\fR ] \fBdedicated\fR [ \fBrequestmark\fR | \fBstatemark\fR ]
2020
| \fBcursorcache\fR expression
21-
| \fBsessionpool\fR expression [ \fB..\fR expression ] [ releasepool ] [ waitsession ]
21+
| \fBsessionpool\fR expression [ \fB..\fR expression ] { sessionrelease } ] [ waitsession ]
2222
| \fBconnectionclass\fR concatenation
23-
| \fBconnectionpool\fR expression [ \fB..\fR expression ] [ releasepool ]
23+
| \fBconnectionpool\fR expression [ \fB..\fR expression ] [ idlerelease ]
2424
| \fBconnect\fR \fBconnectionpool\fR identifier
2525

26-
releasepool ::=
26+
sessionrelease ::=
27+
idlerelease
28+
| countrelease
29+
| lifetimerelease
30+
31+
idlerelease ::=
2732
\fBrelease\fR expression
2833

34+
lifetimerelease ::=
35+
\fBrelease\fR \fBevery\fR expression
36+
37+
countrelease ::=
38+
\fBrelease\fR \fBcount\fR expression
39+
2940
waitsession ::=
3041
\fBwait\fR expression
3142
| \fBwait\fR expression \fBthen break\fR
@@ -121,7 +132,7 @@ Note that this can imply a high number of database connections and dis-connectio
121132
.RE
122133
.P
123134
\fBdedicated\fR
124-
.P
135+
.br
125136
\fBthreads dedicated\fR
126137
.RS 4
127138
Use dedicated connections that are established once and kept logged on during
@@ -169,13 +180,25 @@ does not have the counterpart of an OCIConnectionPool.
169180
.RE
170181
.P
171182
.B \fBrelease\fR value
183+
.br
184+
.B \fBrelease count\fR value
185+
.br
186+
.B \fBrelease every\fR value
172187
.RS 4
173-
For a pool, set the timeout value for idle
188+
For a pool, the first option sets the timeout value for idle
174189
sessions (OCI_ATTR_SPOOL_TIMEOUT)
175190
or connections (OCI_ATTR_CONN_TIMEOUT);
176191
the default is 60s.
177192
Sessions or connections in the pool that have been idle for more than the release value
178193
will disconnect unless the pool already has its minimum size.
194+
.P
195+
For a session pool, you can also set the max usage count (OCI_ATTR_SPOOL_MAX_USE_SESSION)
196+
or the max lifetime (OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION)
197+
using the either of the two last options.
198+
The default is 0 implying sessions will not have a max usage count or max lifetime.
199+
.P
200+
For all three attributes, you may provide a double value, but since the value used in OCI
201+
is an integer, only the integer part of the value will be used.
179202
.RE
180203
.P
181204
.B \fBwait\fR value

oltp/oltp.rwl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ rwl_daily_html := "daily.html";
387387
# You can modify the aggresiveness of logons by changing the time
388388
# OCI waits until it disconnects an unused session in the pool
389389
# rwl_pool_release := 5.0; # default is 5.0
390+
# The next two will set OCI_ATTR_SPOOL_MAX_USE_SESSION or
391+
# OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION. Default are not set (null)
392+
# implying there will be no max use or lifetime
393+
# rwl_pool_max_use;
394+
# rwl_pool_max_lifetime;
390395

391396
# By default, an instance level awr report is gathered for all
392397
# instances that are open. If you also want to create a global

oltp/parameters.rwl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Licensed under the Universal Permissive License v 1.0
33
# as shown at https://oss.oracle.com/licenses/upl/
44

5+
# bengsig 10-oct-2023 - sessionpool max use/lifetime
56
# bengsig 31-jul-2023 - rategradientstep
67
# bengsig 17-jun-2023 - add mtit_partitions parameter
78
# bengsig 23-may-2024 - Fix s24 full scan message
@@ -67,6 +68,8 @@ double rampfactor := 0.1;
6768
integer rwl_min_pool := 3;
6869
integer rwl_max_pool := 10;
6970
double rwl_pool_release := 5.0;
71+
integer rwl_pool_max_use;
72+
integer rwl_pool_max_lifetime;
7073
double max_sessionwait := 30; # how long to wait max to get a session
7174

7275
# Reduce if you want more parsing, increase if you want less
@@ -631,6 +634,8 @@ if show_changed_values then
631634
end if;
632635
printline "rwl_max_pool="||rwl_max_pool;
633636
printline "rwl_pool_release="||rwl_pool_release;
637+
printf "rwl_pool_max_use=%Nd\n", rwl_pool_max_use;
638+
printf "rwl_pool_max_lifetime=%Nd\n", rwl_pool_max_lifetime;
634639
else
635640
if pool_type = "drcp" then
636641
printline "normal pool uses drcp";

oltp/run_user.rwl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Licensed under the Universal Permissive License v 1.0
33
# as shown at https://oss.oracle.com/licenses/upl/
44

5+
# bengsig 10-oct-2024 - rwl_pool_max_use/lifetime
56
# bengsig 11-sep-2023 - max_sessionwait
67
# bengsig 21-mar-2023 - connection pool
78
# bengsig 25-oct-2022 - External control
@@ -57,6 +58,8 @@ $if $RWLOLTP_SIDE = "2" $then
5758
$if pool_type = "sessionpool" $then
5859
sessionpool rwl_min_pool .. rwl_max_pool
5960
release rwl_pool_release
61+
$if rwl_pool_max_use is not null $then release count rwl_pool_max_use $endif
62+
$if rwl_pool_max_lifetime is not null $then release every rwl_pool_max_lifetime $endif
6063
$if xc_enabled $then
6164
wait xc_sessionwait then call_failure("No session available due to ORA-" oraerror)
6265
$else
@@ -138,6 +141,8 @@ $else
138141
$if pool_type = "sessionpool" $then
139142
sessionpool rwl_min_pool .. rwl_max_pool
140143
release rwl_pool_release
144+
$if rwl_pool_max_use is not null $then release count rwl_pool_max_use $endif
145+
$if rwl_pool_max_lifetime is not null $then release every rwl_pool_max_lifetime $endif
141146
$if xc_enabled $then
142147
wait xc_sessionwait then call_failure("No session available due to ORA-" oraerror)
143148
$else

0 commit comments

Comments
 (0)