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.

In October 2003, a new enhancement was shipped to z/<strong>OS</strong> in PTF UA05789, known as HC3,<br />

that included very significant per<strong>for</strong>mance enhancements, especially (but not exclusively) <strong>for</strong><br />

conversions between UTF-8 and EBCDIC (or ASCII). The UTF-8 enhancement applies to<br />

both the 31-bit service and the 64-bit service. In order to take advantage of this per<strong>for</strong>mance<br />

enhancement, you must rebuild your conversion tables after this PTF has been applied. With<br />

this enhancement, Conversion Services under z/<strong>OS</strong> 1.4 can be as much as 3.75 times faster<br />

than under z/<strong>OS</strong> 1.3.<br />

In addition to the UTF-8 enhancement, the 64-bit service implemented some improved<br />

module linkage that gives <strong>DB2</strong> V8 an advantage over <strong>DB2</strong> V7. Studies have shown that <strong>DB2</strong><br />

V8 improves the per<strong>for</strong>mance of major conversion over <strong>DB2</strong> V7 and that this improvement is<br />

most evident with small strings. With a 10-byte string, V8 is 1.5 times faster. With a 200-byte<br />

string, V8 is only about 15% faster.<br />

zSeries processor hardware<br />

The z/<strong>OS</strong> Conversion Services take advantage of a number of new hardware instructions that<br />

are faster with the z990 and z890 processors. These instructions are:<br />

► CUTFU - Convert from UTF-8 to UTF-16<br />

► CUUTF - Convert from UTF-16 to UTF-8<br />

► TROO - Translate from One byte to another One byte (used to convert single byte codes)<br />

► TRTO - Translate from Two bytes to One byte (used to convert from UTF-16 to EBCDIC)<br />

► TROT - Translate from One byte to Two bytes (used to convert from EBCDIC to UTF-16)<br />

► TRTT - Translate Two bytes to Two bytes (used to convert between UTF-16 and double<br />

byte EBCDIC)<br />

z/<strong>OS</strong> understands the term Unicode to be UTF-16, while <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> uses Unicode UTF-8<br />

<strong>for</strong> the catalog and all CHAR columns within Unicode tables. So, all z/<strong>OS</strong> Conversion<br />

Services translations between SBCS EBCDIC and UTF-8 require two steps. Step 1 uses the<br />

TROT instruction to convert from EBCDIC to UTF-16, and step 2 uses the CUUTF instruction<br />

to convert from UTF-16 to UTF-8. Conversion in the opposite direction first uses CUTFU and<br />

then TRTO. In other words, UTF-16 is always used to transit between EBCDIC and UTF-8.<br />

Combining these two steps into one step was the key to HC3's improved per<strong>for</strong>mance, which<br />

was discussed earlier, but UTF-16 is still used as a transit point.<br />

Conversions involving DBCS make use of the TRTT instruction, and mixed strings involve<br />

some combination of all of these instructions. If the caller need only convert between UTF-8<br />

and UTF-16, only the CUUTF or CUTFU instruction is used, so the per<strong>for</strong>mance is faster than<br />

conversions between UTF-8 and EBCDIC or ASCII.<br />

Like many other instructions, the CPU time of these instructions increases in proportion to the<br />

string length. In a workload involving Unicode conversion, the CPU time effects of these<br />

instructions can be high, especially with large strings. The z990 and z890 processors have<br />

provided significant enhancements to the TROO, TROT, TRTO and TRTT instructions,<br />

making them as much as five times faster than the z900 and z800 processors. The larger the<br />

string is, the larger the per<strong>for</strong>mance benefit of the z990 and z890 processors.<br />

Studies have shown that the z990 reduces the conversion CPU time using V7 <strong>for</strong> 10 byte<br />

strings by 1.5 times. This is a typical z990 improvement that we have measured <strong>for</strong> most<br />

applications. This increases to a two times improvement <strong>for</strong> 200 byte strings, which is even<br />

better. Per<strong>for</strong>mance of other string lengths may be inter- or extrapolated from 10-byte and<br />

200-byte strings. We see similar improvements in <strong>DB2</strong> V8.<br />

186 <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!