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.

Generally, you should experience more CPU regression if:<br />

► You use non-padded indexes (the default in V8 install) with small varchar columns.<br />

There is a fixed CPU overhead in processing varchar columns in INDEX KEY. As the size<br />

of each varchar column increases, the overhead gets not only diluted but eventually it can<br />

result in positive per<strong>for</strong>mance gain. See Chapter 5, “Availability and capacity<br />

enhancements” on page 217 <strong>for</strong> more details and in<strong>for</strong>mation about changing the default.<br />

► You use DPSIs in some SQL statements.<br />

DPSIs can currently only be non-unique. Some queries, <strong>for</strong> example, queries with<br />

predicates which only reference indexed columns of the index, may experience some<br />

per<strong>for</strong>mance degradation. These types of queries may need to probe each partition of the<br />

DSPI, where only one probe was needed <strong>for</strong> an NPI. Additional qualifiers might help.<br />

► You manipulate lots of columns in your SQL.<br />

This code has already been heavily optimized over the years and in V8 it carries the<br />

overhead due to 64-bit processing. Reducing the number of columns to the ones really<br />

needed is always advisable.<br />

Impact on class 2 CPU time<br />

As you begin to review the CPU utilization <strong>for</strong> your workload in V8 compared with V7, keep in<br />

mind that you may see a slightly higher accounting class 2 CPU time in V8. However the news<br />

is not all bad. Table 4-3 compares the increase in accounting class 2 CPU times to the overall<br />

CPU consumed.<br />

Table 4-3 Accounting class 2 CPU time increase<br />

Accounting class 2<br />

CPU time<br />

MSTR/DBM1/IRLM<br />

CPU time<br />

Non-data<br />

sharing<br />

+6% +14%<br />

-14% -51%<br />

Total +1% -9%<br />

Data sharing<br />

We can see that <strong>for</strong> our tests Accounting class 2 CPU times have increased by 6% <strong>for</strong><br />

non-data sharing and 14% <strong>for</strong> data sharing in V8 compared to V7.<br />

As we have mentioned earlier, 64-bit addressing has brought its own per<strong>for</strong>mance challenges<br />

to <strong>DB2</strong>. 64-bit instructions are typically twice as big as 31-bit instructions and some 64-bit<br />

instructions can take as much as 15% more CPU to execute. This impacts class 2 CPU time.<br />

This is what contributed to driving the accounting class 2 CPU times higher in <strong>DB2</strong> V8.<br />

New <strong>DB2</strong> V8 function, like removing the 180 CI limit <strong>for</strong> list prefetch and castout processing,<br />

and long term page fixing of <strong>DB2</strong> buffers, works to decrease the overall SRB CPU time, which<br />

in turn offsets the increase in accounting class 2 CPU times.<br />

The higher class 2 CPU time in data sharing compared with non-data sharing (14%<br />

compared with 6%) is largely attributed to the changes V8 has introduced to the<br />

IMMEDWRITE BIND option. In V7, <strong>DB2</strong> charges the CPU <strong>for</strong> writing changed pages to the<br />

group buffer pool at commit, to the MSTR address space. In V8, this cost is charged to the<br />

allied address space. The cost of writing these changed pages has moved from the MSTR<br />

address space to the allied agents Accounting class 2 CPU times. See the discussion on<br />

IMMEDWRITE in Chapter 8, “Data sharing enhancements” on page 319 <strong>for</strong> more details.<br />

Chapter 4. <strong>DB2</strong> subsystem per<strong>for</strong>mance 137

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

Saved successfully!

Ooh no, something went wrong!