08.06.2014 Views

DB2 9 for z/OS: Buffer Pool Monitoring and Tuning - IBM Redbooks

DB2 9 for z/OS: Buffer Pool Monitoring and Tuning - IBM Redbooks

DB2 9 for z/OS: Buffer Pool Monitoring and Tuning - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

To page fix or not to page fix<br />

The recommendation is to use long term page fix (PGFIX=YES) <strong>for</strong> any pool with a high<br />

buffer I/O intensity. The buffer intensity can be measured by:<br />

<strong>Buffer</strong> Intensity = (pages read + pages written) / buffer pool size<br />

where:<br />

pages read = total number of pages read in a given statistics interval, including<br />

synchronous read <strong>and</strong> sequential, dynamic <strong>and</strong> list prefetch.<br />

(trace fields QBSTRIO + QBSTSPP + QBSTDPP + QBSTLPP)<br />

pages written = total number of pages written in a given statistics interval including<br />

synchronous write <strong>and</strong> deferred write.<br />

(trace field QBSTPWS)<br />

It cannot be emphasized too strongly that using PAGEFIX=YES has to be agreed with<br />

whomever manages the z/<strong>OS</strong> storage <strong>for</strong> the LPAR, because running out of storage can<br />

have catastrophic effects <strong>for</strong> the whole of z/<strong>OS</strong>.<br />

It is worth remembering that any pool where I/O is occurring will utilize all the allocated<br />

storage. This is why the recommendation is to use PGFIX=YES <strong>for</strong> <strong>DB2</strong> V8 <strong>and</strong> above <strong>for</strong><br />

any pool where I/Os occur, provided all virtual frames above <strong>and</strong> below the 2 GB bar are fully<br />

backed by real memory <strong>and</strong> <strong>DB2</strong> virtual buffer pool frames are not paged out to auxiliary<br />

storage. If I/Os occur <strong>and</strong> PGFIX=NO then it is possible that the frame will have been paged<br />

out to auxiliary storage by z/<strong>OS</strong> <strong>and</strong> there<strong>for</strong>e two synchronous I/Os will be required instead<br />

of one. This is because both <strong>DB2</strong> <strong>and</strong> z/<strong>OS</strong> are managing storage on a least recently used<br />

basis. The number of page-ins <strong>for</strong> read <strong>and</strong> write can be monitored either by using the<br />

DISPLAY BUFFERPOOL comm<strong>and</strong> to display messages DSNB411I <strong>and</strong> DSNB420I or by<br />

producing a Statistics report.<br />

There is also a CPU overhead <strong>for</strong> PGFIX=NO because <strong>DB2</strong> has to fix the page in storage<br />

be<strong>for</strong>e the I/O <strong>and</strong> unfix afterwards. Some customers have seen measurable reductions in<br />

CPU by setting PAGEFIX=YES, hence the general recommendation is to use YES <strong>for</strong> this<br />

parameter. Note PGFIX=YES is also applicable to GBP reads <strong>and</strong> writes. The disadvantage<br />

of PGFIX=YES is that the page cannot be paged out under any circumstances. This could<br />

cause paging to occur on other applications to their detriment should a need arise <strong>for</strong> a large<br />

number of real frames, such as during a dump.<br />

Measurement<br />

No tuning should be attempted until a solid base of reliable data is available <strong>for</strong> comparison.<br />

The simplest measures are the getpage <strong>and</strong> I/O rates. The number of getpages per second is<br />

a measure of the amount of work being done. If the intention is to reduce I/O, then by<br />

measuring the getpages per I/O be<strong>for</strong>e <strong>and</strong> after any change, an estimate can be made of the<br />

number of I/Os saved. Another metric is the wait time due to synchronous I/O, which is<br />

tracked in the accounting trace data class 3 suspensions.<br />

The CPU cost of synchronous I/O is accounted to the application <strong>and</strong> so the CPU is normally<br />

credited to the agent thread. However, asynchronous I/O is accounted <strong>for</strong> in the <strong>DB2</strong> address<br />

space DBM1 SRB measurement. The <strong>DB2</strong> address space CPU consumption is reported in<br />

the <strong>DB2</strong> statistics trace which can be captured <strong>and</strong> displayed by a tool such as <strong>IBM</strong> Tivoli<br />

OMEGAMON XE <strong>for</strong> <strong>DB2</strong> Per<strong>for</strong>mance Monitor on z/<strong>OS</strong>.<br />

<strong>DB2</strong> 9 <strong>for</strong> z/<strong>OS</strong>: <strong>Buffer</strong> <strong>Pool</strong> <strong>Monitoring</strong> <strong>and</strong> <strong>Tuning</strong> 15

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

Saved successfully!

Ooh no, something went wrong!