19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DB2</strong> member already has the table space open <strong>for</strong> RW, global lock contention generally<br />

occurs.<br />

<strong>DB2</strong> V8 attempts to reduce this global contention by remapping parent IX L-locks from XES-X<br />

to XES-S locks. Data sharing locking per<strong>for</strong>mance benefits because parent IX and IS L-locks<br />

are now both mapped to XES-S locks and are there<strong>for</strong>e compatible and can now be granted<br />

locally by XES. <strong>DB2</strong> no longer needs to wait <strong>for</strong> global lock contention processing to<br />

determine that a new parent IX or IS L-lock is compatible with existing parent IX or IS L-locks.<br />

The majority of parent L-lock contention occurs when the table space is opened by at least<br />

one <strong>DB2</strong> member in RW:<br />

► IS-IS: We want to execute some read-only SQL against a table space and there are some<br />

other members who currently have some read-only SQL active against the same table<br />

space.<br />

► IS-IX: We want to execute some read-only SQL against a table space and there are some<br />

other members who currently have some update SQL active against the same table<br />

space.<br />

► IX-IS: We want to execute some update SQL against a table space and there are some<br />

other members who currently have some read-only SQL active against the same table<br />

space.<br />

► IX- IX: We want to execute some update SQL against a table space and there are some<br />

other members who currently have some update SQL active against the same table<br />

space.<br />

Parent lock contention with parent S L-locks is less frequent than checking <strong>for</strong> contention with<br />

parent IS and IX L-locks. Parent S L-locks are only acquired when <strong>DB2</strong> is about to issue<br />

read-only SQL against a table space opened <strong>for</strong> RO.<br />

To ensure that parent IX L-locks remain incompatible with parent S L-locks, S table and table<br />

space L-locks are remapped to XES-X locks. This means that additional global contention<br />

processing will now be done to verify that an S L-lock is compatible with another S L-lock, but<br />

this is a relatively rare case (executing read-only SQL against a table space, where at least<br />

one other <strong>DB2</strong> member has the table space open in RO and currently has some read-only<br />

SQL active against the same table space).<br />

Another impact of this change is that child L-locks are no longer propagated based on the<br />

parent L-lock. Instead, child L-locks are propagated based on the held state of the table<br />

space P-lock. If the table space P-lock is negotiated from X to SIX or IX, then child L-locks<br />

must be propagated.<br />

It may be that some child L-locks are acquired be<strong>for</strong>e the page set P-lock is obtained. In this<br />

case child L-locks will automatically be propagated. This situation occurs because <strong>DB2</strong><br />

always acquires locks be<strong>for</strong>e accessing the data. In this case, <strong>DB2</strong> acquires that L-lock be<strong>for</strong>e<br />

opening the table space to read the data. It can also happen during <strong>DB2</strong> restart.<br />

An implication of this change is that child L-locks will be propagated <strong>for</strong> longer than they are<br />

needed, however this should not be a concern. There will be a short period from the time<br />

where there is no intersystem read/write interest until the table space becomes<br />

non-GBP-dependent, that is, be<strong>for</strong>e the page set P-lock reverts to X. During this time, child<br />

L-locks will be propagated unnecessarily.<br />

It is now important that L-locks and P-locks are maintained at the same level of granularity.<br />

Remember now that page set P-locks now determine when child L-locks must be propagated<br />

to XES.<br />

326 <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Per<strong>for</strong>mance <strong>Topics</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!