[Info-vax] RDB Question
Jan-Erik Söderholm
jan-erik.soderholm at telia.com
Tue Dec 4 10:16:58 EST 2018
Den 2018-12-04 kl. 14:26, skrev Arne Vajhøj:
> On 12/3/2018 11:10 PM, Dave Froble wrote:
>> On 12/3/2018 9:50 PM, Kerry Main wrote:
>>> Also, Rdb supports row level locking which is a pretty big performance
>>> feature that some DB's do not support.
>>
>> Why do we need different names for things. Not that I've ever used Rdb,
>> but, isn't that basically the same as a record lock?
>
> Yes.
>
>> And without that, I'm not sure I'd want to use a RDBMS ....
>
> It works without.
>
> Note that we are not talking functionality of record locking
> vs functionality of no locking.
>
> We are talking performance impact of database locking rows vs
> performance impact of database locking pages.
>
> Both support the integrity of the database.
>
> But in some cases the performance is better if the
> database can lock individual rows instead of locking
> pages (8 KB or whatever chunks).
>
> Arne
>
Note also that, even if Rdb supports record locking (has done from
V1.0, if I'm not wrong), it also has something called "Adjustable
record locking". So Rdb doesn't move locks down to the record level
if it doesn't have to (row contention between users).
The default is what is shown from this database dump below.
So one single process doing a large query on its own will put
locks at blocks of 1000 database pages at a time (to start with).
$ rmu/dump/head=lock xxxxxxxx
*---------------------------------------------------
* Oracle Rdb V7.3-300 4-DEC-2018 15:38:20.69
*
* Dump of Database header
* Database: DB_ROOT:[RDB]xxxxxx.RDB;1
*
*---------------------------------------------------
Database Parameters:
Root filename is "DB_ROOT:[RDB]xxxxxxxx.RDB;1"
Locking...
- Adjustable record locking is enabled
Fanout factor 1 is 10 (10 pages)
Fanout factor 2 is 10 (100 pages)
Fanout factor 3 is 10 (1000 pages)
- Carry-over lock optimization is enabled
- Lock tree partitioning is disabled
$
You can get all sorts of statistics from the Rdb “show stat” page.
You want the “timeout” and “deadlocks” to be low, of course…
statistic......... rate.per.second........ total...... average..
name.............. max.... cur... avg..... count...... per.trans
locks requested 2616 0 136.7 1498212727 12.4
rqsts not queued 710 0 10.1 110878016 0.9
rqsts stalled 1 0 0.1 1821949 0.0
rqst timeouts 0 0 0.0 15 0.0
rqst deadlocks 0 0 0.0 21 0.0
locks promoted 648 174 112.0 1228298204 10.1
proms not queued 45 18 10.9 120503685 1.0
proms stalled 61 31 15.1 166502162 1.3
prom timeouts 0 0 0.0 39 0.0
prom deadlocks 0 0 0.0 10 0.0
locks demoted 694 154 147.9 1620781031 13.4
locks released 1905 0 126.1 1382032251 11.4
blocking ASTs 99 48 24.9 272962448 2.2
stall time x1000 7239 47 31.1 341033144 2.8
invalid lock block 0 0 0.0 9811 0.0
ignored lock mode 0 0 0.0 0 0.0
More information about the Info-vax
mailing list