473,654 Members | 3,042 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Lock Escalation - Share Lock

Our db2diag.log is full of messages like this:

2004-05-31-17.15.10.383766 Instance:tminst 1 Node:000
PID:394948(db2a gent (TMDB1) 0) TID:1 Appid:GA140956. EF26.03A4B12026 47
data management sqldEscalateLoc ks Probe:3 Database:TMDB1

ADM5502W The escalation of "4759" locks on table "I2TM .SHPM_T" to lock
intent "S" was successful.

The message is always about Shared locks. What can I do to eliminate these errors?

Do we need to changes these parameters?
Interval for checking deadlock (ms) (DLCHKTIME) = 10000
Percent. of lock lists per application (MAXLOCKS) = 10
Lock timeout (sec) (LOCKTIMEOUT) = -1

Thanks,
-Jane
Nov 12 '05 #1
9 7355
"Jane" <ja**********@i 2.com> wrote in message
news:75******** *************** ***@posting.goo gle.com...
Our db2diag.log is full of messages like this:

2004-05-31-17.15.10.383766 Instance:tminst 1 Node:000
PID:394948(db2a gent (TMDB1) 0) TID:1 Appid:GA140956. EF26.03A4B12026 47
data management sqldEscalateLoc ks Probe:3 Database:TMDB1

ADM5502W The escalation of "4759" locks on table "I2TM .SHPM_T" to lock intent "S" was successful.

The message is always about Shared locks. What can I do to eliminate these errors?
Do we need to changes these parameters?
Interval for checking deadlock (ms) (DLCHKTIME) = 10000
Percent. of lock lists per application (MAXLOCKS) = 10
Lock timeout (sec) (LOCKTIMEOUT) = -1

Thanks,
-Jane


That is a warning message, not an error message. It indicates that row
locking has been escalated to table locking. Multiple S (share) table locks
can exist without any contention among different applications, unless
another application needs to update the table at the same time.

You can discourage lock escalation (from row to table) by increasing the
LOCKLIST memory size (DB2 will start escalation when the LOCKLIST is full
with other locks) and increasing MAXLOCKS (the percent of the LOCKLIST that
any one application can use before escalation occurs). If you increase
LOCKLIST memory, you should also increase DBHEAP by the same amount
(LOCKLIST memory comes out of DBHEAP).

Lock escalation to table level can improve performance (because DB2 does not
need to spend time locking and unlocking each row), but can create
contention with other applications if they need to do updates. Lock
escalation to table level is usually a benefit in an ad-hoc query
environment (so long as loads are done when others are not querying). In an
OLTP environment, lock escalation can be a real problem.

LOCKTIMEOUT -1 means that no application waiting for a lock will ever time
out with a -911 reason code 68, it will wait indefinitely. Most people set
this to somewhere between 10 and 60 seconds.

DLCHKTIME indicates how often DB2 checks for deadlocks, which is a slightly
different occurrence than a locktimeout. That looks OK.

Nov 12 '05 #2
Mark, are you sure locklist comes out of dbheap?
I think it is part of Global Shared Memory and thus "fights" for same
segments as dbheap, buffer pools, package and catalog caches.
BTW, if those caches run out of defined memory allocation, they will (in
V8) "steal" their needed pages from each other, locklist and/or dbheap.
HTH, Pierre.

Mark A wrote:
"Jane" <ja**********@i 2.com> wrote in message
news:75******** *************** ***@posting.goo gle.com...
Our db2diag.log is full of messages like this:

2004-05-31-17.15.10.383766 Instance:tminst 1 Node:000
PID:394948(db 2agent (TMDB1) 0) TID:1 Appid:GA140956. EF26.03A4B12026 47
data management sqldEscalateLoc ks Probe:3 Database:TMDB1

ADM5502W The escalation of "4759" locks on table "I2TM .SHPM_T" to


lock
intent "S" was successful.

The message is always about Shared locks. What can I do to eliminate these


errors?
Do we need to changes these parameters?
Interval for checking deadlock (ms) (DLCHKTIME) = 10000
Percent. of lock lists per application (MAXLOCKS) = 10
Lock timeout (sec) (LOCKTIMEOUT) = -1

Thanks,
-Jane

That is a warning message, not an error message. It indicates that row
locking has been escalated to table locking. Multiple S (share) table locks
can exist without any contention among different applications, unless
another application needs to update the table at the same time.

You can discourage lock escalation (from row to table) by increasing the
LOCKLIST memory size (DB2 will start escalation when the LOCKLIST is full
with other locks) and increasing MAXLOCKS (the percent of the LOCKLIST that
any one application can use before escalation occurs). If you increase
LOCKLIST memory, you should also increase DBHEAP by the same amount
(LOCKLIST memory comes out of DBHEAP).

Lock escalation to table level can improve performance (because DB2 does not
need to spend time locking and unlocking each row), but can create
contention with other applications if they need to do updates. Lock
escalation to table level is usually a benefit in an ad-hoc query
environment (so long as loads are done when others are not querying). In an
OLTP environment, lock escalation can be a real problem.

LOCKTIMEOUT -1 means that no application waiting for a lock will ever time
out with a -911 reason code 68, it will wait indefinitely. Most people set
this to somewhere between 10 and 60 seconds.

DLCHKTIME indicates how often DB2 checks for deadlocks, which is a slightly
different occurrence than a locktimeout. That looks OK.



--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Nov 12 '05 #3
Instead of pumping up the locklist, you can also use the LOCK statement at
the table level or change the
lock level table attribute.

Of course, the choice depends on the situation.

PM
Nov 12 '05 #4
"Pierre Saint-Jacques" <se*****@attglo bal.net> wrote in message
news:40******** ******@attgloba l.net...
Mark, are you sure locklist comes out of dbheap?
I think it is part of Global Shared Memory and thus "fights" for same
segments as dbheap, buffer pools, package and catalog caches.
BTW, if those caches run out of defined memory allocation, they will (in
V8) "steal" their needed pages from each other, locklist and/or dbheap.
HTH, Pierre.

Pierre you are correct and I was wrong. Log buffers and catalog cache comes
out of the dbheap.
Nov 12 '05 #5
"PM (pm3iinc-nospam) CGO" <PM (pm3iinc-nospam)@cgocabl e.ca> wrote in message
news:lw******** *********@charl ie.risq.qc.ca.. .
Instead of pumping up the locklist, you can also use the LOCK statement at
the table level or change the
lock level table attribute.

Of course, the choice depends on the situation.

PM

Increasing the locklist discourages DB2 from lock escalation from row to
table level.

You force escalation with SQL lock table, but I don't know any way to
prevent it with SQL of bind parameters.
Nov 12 '05 #6
The default locklist is minuscule for data warehousing applications.
Increase it
"Jane" <ja**********@i 2.com> wrote in message
news:75******** *************** ***@posting.goo gle.com...
Our db2diag.log is full of messages like this:

2004-05-31-17.15.10.383766 Instance:tminst 1 Node:000
PID:394948(db2a gent (TMDB1) 0) TID:1 Appid:GA140956. EF26.03A4B12026 47
data management sqldEscalateLoc ks Probe:3 Database:TMDB1

ADM5502W The escalation of "4759" locks on table "I2TM .SHPM_T" to lock intent "S" was successful.

The message is always about Shared locks. What can I do to eliminate these errors?
Do we need to changes these parameters?
Interval for checking deadlock (ms) (DLCHKTIME) = 10000
Percent. of lock lists per application (MAXLOCKS) = 10
Lock timeout (sec) (LOCKTIMEOUT) = -1

Thanks,
-Jane

Nov 12 '05 #7
The Lock list is currently set at the following level:

Max storage for lock list (4KB) (LOCKLIST) = 650

Should I increase it even more? The database is small (1 gig) but
there are large number of 'select' statements.

Thanks for every one's feedback.
-Jane
Nov 12 '05 #8
"Jane" <ja**********@i 2.com> wrote in message
news:75******** *************** ***@posting.goo gle.com...
The Lock list is currently set at the following level:

Max storage for lock list (4KB) (LOCKLIST) = 650

Should I increase it even more? The database is small (1 gig) but
there are large number of 'select' statements.

Thanks for every one's feedback.
-Jane


If you want to discourage lock escalation from row to table level, then
increase the locklist (which is currently using about 2MB of memory).
Increase it by a factor of 5-10 times if you have enough real memory.

Lock escalation can cause lock contention problems when one application is
updating and another application is accessing the same table (reading or
updating). This includes utilities. To minimize lock escalation, increase
the size of the locklist and increase maxlocks (to about 60%).

However, if your environment is query only (except during off hours when
utilities are single threaded and no queries are running), then lock
escalation to table level improves performance since DB2 does not have to
spend time locking and unlocking individual rows (the whole table is
locked).

To repeat: multiple S (share) locks at the table level can coexist without
any contention problem, and the lock escalation improves performance.

When lock escalation occurs, it may be logged in the db2dai.log file, but it
is not an error. It is an information message. You may be able to change the
message logging level to prevent this message from appearing in the log.
Nov 12 '05 #9
We run with 30000. 650 is far too small for data warehouse type processing.

"Jane" <ja**********@i 2.com> wrote in message
news:75******** *************** ***@posting.goo gle.com...
The Lock list is currently set at the following level:

Max storage for lock list (4KB) (LOCKLIST) = 650

Should I increase it even more? The database is small (1 gig) but
there are large number of 'select' statements.

Thanks for every one's feedback.
-Jane

Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
7323
by: xixi | last post by:
hi, we are using db2 udb v8.1 on 64 bit windows, this message is in the db2diag.log file ADM5502W The escalation of "38200" locks on table "xxx.xxx" to lock intent "X" was successful. currently i have locklist = 1075, maxlock=60, so based on the formula (((locks held * 36)/ (locklist *4096)) *100) , i have the answer is
3
5832
by: Amy Woodward | last post by:
Does DB2 have a setting to turn off lock escalation? I've just done several hours of newsgroup googling, and have found only a couple references to such a setting, for DB2 v4.1 back in the late 90's. One of our apps is (fairly) regularly grabbing table locks instead of row locks. I've bumped maxlocks up as high as 95% with locklist at 2048 (4kB chunks). I'm only dealing with a few hundred rows of data in my test environment. And...
0
3375
by: Bruce Pullen | last post by:
DB2 v7.2 (FP7 - DB2 v7.1.0.68) on AIX 5.2.0.0. We're seeing unexpected single row (then commit) insert locking behaviour. We're seeing Applications that already hold row-level W locks in lock-wait, waiting to acquire row-level X locks. The lock-waits are behind applications that have row-level X locks on different rows (honestly). Both executing and lock-waiting applications have been granted IX table locks.
3
4017
by: db2group88 | last post by:
we are using db2 udb v8.1 on windows, the configure parameter for locks is locklist 1000, maxlocks 60, but somehow i still have the error message ADM5502W The escalation of "1" locks on table "SYSIBM ..SYSSCHEMAAUTH" to lock intent "X" was successful. so why even one lock on table still escalate to X lock? our application doesn't use this table, so why there is lock on it, is it
2
3683
by: Trent | last post by:
Hello, all. I have the following production DB2 environment. DB2 8.1.4 (fp4) WG edition with 2 production databases on Windows 2003 standard edition. My first question is regard with locking. I found some escalations for X lock on some tables. How do I work out an appropriate MAXLOCK & LOCKTIMEOUT settings to optimize the lock escalation issue.
9
15519
by: kavallin | last post by:
I receives the following in the db2diag.log file many times / day : 2007-03-05-14.55.24.836553+060 E12415C457 LEVEL: Warning PID : 2785 TID : 1 PROC : db2agent (dbname) INSTANCE: db2inst1 NODE : 000 DB : dbname APPHDL : 0-946 APPID: *LOCAL.db2inst1.070305135434 FUNCTION: DB2 UDB, data management, sqldEscalateLocks, probe:3 MESSAGE : ADM5502W The escalation of...
3
2199
by: stefan.albert | last post by:
Hi folks, we have a little discussion about lock escalation... What is better for performance: To have an escalation "early" (smaller locklist) or aviod the escalation with a big lock list? We don't care about concurrency - because the changes have to be done, other SQL waiting for this is OK. Anyhow - I think: A lock table in exclusive mode would be the the most
1
773
by: clilush | last post by:
I'm getting entries in the windows event log saying "DB2 is performing lock escalation" which of course is followed by another entrie saying "The escalation of 'xxxx' locks on table 'SYSIBM .SYSCOLDIST' to lock intent 'X' was successful." I'm assuming these are just warnings about the database making it's own adjustments, but I thought I'd be sure before sweeping them under the carpet. Any advice? (DB2 8 Workgroup Edition)
18
3168
by: dunleav1 | last post by:
I have db2 9 installation and I think our application isn't handling locking optimally. I have Maxlocks(96) and locklist (104832) setup to be auto tuned. The value of these parameters in the parenthesis are the auto tuned values after running my application for a while. I notice values in db2diag.log that these values are being increased to prevent lock escalation. How do I determine the sql that is causing these high escalations?
0
8375
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8593
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2714
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.