Maximizing offload to ziip processors with DB2 9 for z/os native SQL stored procedures

Similar documents
Enterprise Workload Manager Overview and Implementation

CA IDMS 18.0 & 18.5 for z/os and ziip

IBM Technical Brief. IBM System z9 ziip Measurements: SAP OLTP, BI Batch, SAP BW Query, and DB2 Utility Workloads. Authors:

DB2 Stored Procedures Monitoring, Analysis, and Tuning on System z

Expert Stored Procedure Monitoring, Analysis and Tuning on System z

IBM Corporation

ziip and zaap Software Update

WebSphere Application Server Base Performance

DB2 for z/os Distributed Data Facility Questions and Answers

Stored Procedure Monitoring and Analysis

- Benchmark White Paper - Java CICS TS V2.2 Application

Understanding The Interaction Of z/os Workload Manager And DB2

DB2 for z/os Stored Procedures Update

DB2 for z/os Distributed Data Facility Questions and Answers

Websphere and Enclaves

IBM Systems. Oracle and the ziip processor. G. Tom Russell IBM Canada Ltd. MVS Oracle SIG April 30, 2008 Redwood Shores, CA

WSC Experiences with IPSec on the ziip Processor

Leveraging ziip with DB2 for z/os V8

Practical Capacity Planning in 2010 zaap and ziip

DB2 for z/os: Programmer Essentials for Designing, Building and Tuning

The World of z/os Dispatching on the zec12 Processor

IBM Client Center z/vm 6.2 Single System Image (SSI) & Life Guest Relocation (LGR) DEMO

Advanced z/os Performance: WLM, Sysplex, UNIX Services and Web

The Major CPU Exceptions in EPV Part 2

z Processor Consumption Analysis Part 1, or What Is Consuming All The CPU?

Measuring zseries System Performance. Dr. Chu J. Jong School of Information Technology Illinois State University 06/11/2012

Using WebSphere Application Server Optimized Local Adapters (WOLA) to migrate your COBOL to zaap-able Java

Using WebSphere Application Server Optimized Local Adapters (WOLA) to Integrate COBOL and zaap-able Java

Uni Hamburg Mainframe Summit 2010 z/os The Mainframe Operating. Part 4 z/os Overview

DB2 REST API and z/os Connect SQL/Stored Procedures Play a Role in Mobile and API Economics

Understanding The Importance Of Workload Manager And DB2

Advanced Technical Skills (ATS) North America. John Burg Brad Snyder Materials created by John Fitch and Jim Shaw IBM Washington Systems Center

Planning Considerations for HiperDispatch Mode Version 2 IBM. Steve Grabarits Gary King Bernie Pierce. Version Date: May 11, 2011

Framework for Doing Capacity Sizing for System z Processors

Evolution of CPU and ziip usage inside the DB2 system address spaces

z/vm Data Collection for zpcr and zcp3000 Collecting the Right Input Data for a zcp3000 Capacity Planning Model

IBM QMF for Windows for IBM iseries, V7.2 Business Intelligence Starts Here!

Continuous Availability with the IBM DB2 purescale Feature IBM Redbooks Solution Guide

Framework for Doing Capacity Sizing on System z Processors

Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 1)

The Hidden Gold in the SMF 99s

zwas-irl (WebSphere Application Server on z/os - In Real Life)

z/os Performance: Capacity Planning Considerations for zaap Processors

IBM Tivoli Directory Server for z/os. Saheem Granados, CISSP IBM Monday, August 6,

The New Enterprise Data Center Summit. Session: zmr - consolidation with an affordable mainframe Speaker: Sreenath Chary Date: 19 th Nov 2008

IBM z/vse V4.3 in modern solutions with Linux on System z

IBM Technical Brief. IBM zenterprise System : DB2 11 for z/os with SAP Performance Report. Version 1.0. December 16, 2013.

z990 Performance and Capacity Planning Issues

z/vm 6.3 A Quick Introduction

Relational vs. purexml: Battle of the Titans

High Availability and Scalability with System z and z/os

Analytics with IMS and QMF

Managing LDAP Workloads via Tivoli Directory Services and z/os WLM IBM. Kathy Walsh IBM. Version Date: July 18, 2012

zpcr Capacity Sizing Lab

z Processor Consumption Analysis, or What Is Consuming All The CPU? 14744

zpcr Capacity Sizing Lab

DB2 REST API and z/os Connect SQL/Stored Procedures Play a Role in Mobile and API Economics

Oracle PeopleSoft Applications for IBM z Systems

WebSphere Application Server, Version 5. What s New?

Continuous Availability and Scalability with DB2 for z/os and WebSphere

CPU and ziip usage of the DB2 system address spaces Part 2

IBM. MVS Planning: Workload Management. z/os. Version 2 Release 3 SC

SHADOW DATADIRECT PROGRESS A SINGLE, UNIFIED MAINFRAME INTEGRATION ARCHITECTURE

Dynamic Routing: Exploiting HiperSockets and Real Network Devices

zpcr Capacity Sizing Lab

SHARE in Pittsburgh Session 15801

A. Specify NUMTCB=10 and allow 1 WLM managed stored procedure address space per sysplex for AE1.

Key Metrics for DB2 for z/os Subsystem and Application Performance Monitoring (Part 1)

Text search on DB2 for z/os data

Setting up DB2 data sharing the easy way

IBM Education Assistance for z/os V2R1

z/vm 6.3 Installation or Migration or Upgrade Hands-on Lab Sessions

How to Setup Application Server to Access DB2 z/os with High Availability

Airline Control System V2.3 delivers a new base for exploiting 64-bit addressing

Leveraging ziip, zaap Specialty Engines with DB2 for z/os

Db2 for z/os Gets Agile

IBM. Licensed Program Specifications. IBM DATABASE 2 Universal Database Server for OS/390 and z/os Version 7 Program Number 5675-DB2.

A05 DB2 for z/os vs. Oracle RAC A Reality Check

Roll Up for the Magical Mystery Tour of Software Costs 16962

IBM z/os Management Facility V2R1 Solution Guide IBM Redbooks Solution Guide

zpcr Capacity Sizing Lab

Websphere zos Mettle Test 2003 Can Your Enterprise Server Do This?

Lawson M3 7.1 Large User Scaling on System i

DB2 10 for z/os Performance and Scalability

High Availability for Linux on IBM System z Servers

JMS Clustering and Failover

Introduction to. z/vm and Linux on System z. Malcolm Beattie Linux Technical Consultant, IBM UK. From a presentation by Ralf Schiefelbein, IBM Germany

What are the major changes to the z/os V1R13 LSPR?

Performance of environments using DB2 Connect Enterprise Edition

Reliability and Performance with IBM DB2 Analytics Accelerator Version 4.1 IBM Redbooks Solution Guide

z990 and z9-109 Performance and Capacity Planning Issues

IBM Application Performance Analyzer for z/os Version IBM Corporation

Data Analytics using MapReduce framework for DB2's Large Scale XML Data Processing

IBM GDPS V3.3: Improving disaster recovery capabilities to help ensure a highly available, resilient business environment

VM & VSE Tech Conference May Orlando Session M70

IBM Tivoli OMEGAMON XE on z/os

Reducing MIPS Using InfoSphere Optim Query Workload Tuner TDZ-2755A. Lloyd Matthews, U.S. Senate

Tcorem. Nate Murphy Sr VP Tcorem IBM Champion. Tridex June 5 th, 2017

WebSphere Application Server 6.1 Base Performance September WebSphere Application Server 6.1 Base Performance

Mobile access to the existing z/vse application

Transcription:

Maximizing offload to ziip processors with DB2 9 for z/os native SQL stored procedures Richard Corrihons IBM Customer Center - PSSC Montpellier, France Introduction This document is based on what has been observed and measured during the benchmark of an OLTP banking application that makes extensive use of the new native SQL language stored procedures support in DB2 9 for z/os. We conducted several tests from transaction unit test to multiple LPAR (horizontal) scalability tests to find out how native SQL stored procedures behave in a stress test environment. We compared JDBC type 2 versus type 4 connections, in order to give recommendations for a production environment. As native SQL stored procedures are ziip eligible under certain conditions, we also measured the exact ziip offload. Native SQL stored procedures DB2 9 for z/os introduces a number of new features including native SQL language stored procedures. Prior to DB2 9 for z/os, SQL stored procedures had to run under the control of the z/os WorkLoad Manager (WLM) component in managed address spaces. Running SQL procedures in a WLM address space (DB2 UDB for z/os Version 8) incurs the overhead of communication between the WLM address space and the DBM address space for each SQL call. For systems running heavy stored procedure workloads, composed of many short running stored procedures, at or near CPU utilization, this added overhead could potentially inhibit the amount of work being processed. In DB2 9 for z/os, SQL language procedures can run natively in the DBM address space. Running SQL procedures in the DBM address space, avoids the overhead of starting new address spaces for stored procedure invocations, and the cost of the round-trip communication between the WLM and the DBM address space for each SQL call. Internal Throughput Ratio (ITR) improvements of between to 8 have been observed as compared to running an external SQL procedure. In DB2 9 for z/os, an SQL procedure workload is ziip eligible if driven by DDF requests arriving via DRDA, provided it runs in the DBM address space under a DDF enclave SRB. Work that runs on the ziip does not incur software charges based on the service units consumed; therefore it is a very attractive lower-cost alternative to running workloads on a general purpose processor. Copyright IBM Corporation, 28 5/4/28 v. Page of 7

For information on native SQL procedure control statements refer to the DB2 for z/os SQL Reference, SC8-9854. For a general description of SQL procedure new functionality, see DB2 9 for z/os Technical Overview, SG24-733. Test environment We conducted our tests on two System z z9 machines configured with 4 LPARs and 2 Internal Coupling Facilities. In each LPAR we had one Websphere Application Server (WAS) and one DB2 member of a 4 way data sharing group. We configured general purpose CPs, ziips and zaaps in each LPAR, the purpose being to measure any offload to specialized engines. We tested JDBC type 2 and type 4 connections between WAS and DB2. The test was conducted on a 4 million customer account database. Transaction flow The WAS application is triggered by a Message-Driven Bean (MDB); the WAS application parses an XML message, and then issues one or two JDBC calls, depending on the transaction. Inside DB2, the business application logic processing is executed by nested native SQL stored procedures. Transactions tested The benchmark focused on 4 business transactions which are the most executed in a retail banking environment. They are balance inquiry (BI), cheque deposit (CQ), cash deposit (CD) and cash withdrawal (CW). In this section, we detail the SQL pattern for each transaction, the number of JDBC calls, the number of stored procedure calls and the average number of SQL per stored procedure call. The SQL pattern of each transaction was: SQL pattern 4 3 3 Nbr of SQL statement 5 5 6 2 BI CQ CD CW Update Insert 4 3 3 Select 5 6 2 Transaction name Update Insert Select Figure SQL pattern per transaction There was one JDBC call for each BI or CQ transaction, and two JDBC calls for each CD or CW transaction. Because the tested application uses stored procedures, there is no need to have one JDBC call per SQL statement; this is one of the advantages of stored procedures. Copyright IBM Corporation, 28 5/4/28 v. Page 2 of 7

With so few JDBC calls per transaction, we decided to compare JDBC type 2 versus type 4. The results of this test are shown in the JDBC type 4 versus type 2 transaction unit test section. The number of stored procedure calls for each transaction was 3 for BI, for CQ, 4 for CD and 7 for CW. This application uses nested stored procedures, so we have many more stored procedure calls than JDBC calls. The average number of SQL statements per stored procedure call for each transaction was.66 for BI,.5 for CQ,.43 for CD and.4 for CW. These low values, suggest short running stored procedures; this is a situation where the duration of the stored procedure call itself might represent a non negligible overhead. Because native SQL stored procedures run in the same address space as the SQL engine this reduces the call duration, hence less overhead compared to external stored procedures. So this is an application where native stored procedures should be advantageous. JDBC type 4 versus type 2 transaction unit test The usual recommendation for performance is to use JDBC type 2 for local connections. Our transactions only have one or two JDBC calls, so use of JDBC type 4 should not dramatically impact the response time and CPU usage. In order to verify this assumption, we conducted tests transaction by transaction, using both connection types. Note: the application logic and SQL calls are almost the same for CD and CW transactions, so we only conducted transaction unit test for BI, CQ and CD. We measured transaction response time at WebSphere level and CPU usage for each transaction. The injection rate was around 35 transactions per second. JDBC Type 2versus JDBC Type 4 Relative CPU USage 5 4 3 2 5 4 3 2 Response Time CPU RT BI T2 BI T4 CQ T2 CQ T4 CD T2 CD T4 Run Type Figure 2 Transaction unit test JDBC type 2 versus JDBC type 4, response time and CPU The figure for CPU usage is relative. We took as our base value the CPU consumption of the BI Type 2 transaction (hence the value of ), and the values for the other run types are relative to this value. So for example, the Cash Deposit transaction using Type 4 used almost four times more CPU than the Balance Inquiry using Type 2. Copyright IBM Corporation, 28 5/4/28 v. Page 3 of 7

If we compare the results of Type 2 and Type 4 for the different operations: BI CPU usage was 5% higher for BI type 4 CQ CPU usage was 5% lower for type 4 CD CPU usage was 2% higher for type 4. As expected, the transaction response time (WAS plus DB2) was quite similar with one millisecond more when using JDBC type 4 for CQ and CD when compared to type 2. Transaction response time was very low for BI, so it is not easy to draw conclusions. Overall, type 2 and type 4 give similar results for response time and CPU usage, with a slight overhead for some transactions, so at this point there is no obvious reason to pick one particular connection type. We can look at the processor usage breakdown, to see if it helps us to make a choice. JDBC Type 2 versus JDBC Type 4 8 6 4 2 44.4 4.9 52.2 47 67. 73.5 3.7 28. 28.7 47.8 4.9 32.9 3 26.5 24.3 BI T2 BI T4 CQ T2 CQ T4 CD T2 CD T4 Run type CP CPU% ziip CPU% zaap CPU% Figure 3 Transaction unit test JDBC type 2 versus JDBC type 4, processor usage breakdown Figure 3 shows processor usage breakdown per processor type normalized to. There is no ziip usage for type 2 connections, while for type 4 connections we can see ziip engagement. This is as expected, because type 4 connections are one way to engage ziip, and native SQL stored procedures remain on the ziip processor. The use of JDBC type 4 connections is recommended for this application, because it provides key benefits (allows for ziip exploitation and continuous availability), with very limited overhead. Normally, for a WAS/DB2 configuration in a parallel sysplex, IBM would recommend type 2 connection, because this eliminates the DRDA flow and TCP/IP overhead of type 4. However, with the use of nested stored procedures, the DRDA flows are minimal. Continuous availability is demonstrated in the scenario when a DB2 member goes down due to a planned or unplanned outage. The surviving WAS on the LPAR can connect through DRDA type 4 to another DB2 member on a different LPAR. Therefore the capacity available on the LPAR, with the down DB2 member, can still run workload. As JDBC type 4 was our recommendation, we conducted all the remaining tests using type 4 connectivity. Copyright IBM Corporation, 28 5/4/28 v. Page 4 of 7

JDBC type 4 transaction unit test For this test we focused on the ziip offload. We conducted tests transaction by transaction. Note: the application logic and SQL calls are almost the same for CD and CW transactions, so we only conducted transaction unit test for BI, CQ and CD. Type 4 transaction unit test: DB2 ziip usage % 8 6 4 2 54.69 5.28 57.29 45.3 49.72 42.7 BI CQ CD Transaction type CP CPU% ziip CPU% Figure 4 JDBC type 4 transaction unit test, DB2 ziip usage Figure 4 shows processor usage breakdown per processor type normalized to. We see ziip engagement for all 3 transactions with a minimum of 42.7% for CD transaction. Scalability tests for transaction mix After transaction unit testing we switched to a mixed workload with the following transaction distribution: 5 BI, CQ, 2 CD and 2 CW. The percentages were chosen in order to match what a bank would face in real life. With this distribution, 5 of the workload modified data, only the BI transaction was read only. We conducted scalability test with an injection rate of 8 mixed workload transactions per second per LPAR. We used up to 4 LPARs, that is we injected a maximum of 32 tps for the entire sysplex configuration. Transaction mix scalability test 35 3 25 2 5 5 393 2399 6 82 2 3 4 Total number of LPAR tps Figure 5 Transaction mix scalability test, transaction per second Copyright IBM Corporation, 28 5/4/28 v. Page 5 of 7

For this test we focused on DB2. We wanted to get response time and CPU usage at DB2 level. We also measured exact ziip offload. Transaction mix scalability test Relative CPU usage.2.5..5.95.9 4 2 8 6 4 2 Response time (ms) CPU RT 2 3 4 Number of LPARs Figure 6 Transaction mix scalability test, DB2 response time and CPU In figure 6, DB2 CPU includes CPU for DDF enclave, MSTR, DBM, DIST and IRLM address spaces. DB2 response time is DDF enclave duration. The tests with multiple LPARs show an increase in both CPU and response time compared to the test with one LPAR; this is due to the data sharing overhead. In data sharing, whatever the number of LPARs, the DB2 response time and CPU usage are stable, which demonstrates good horizontal scalability for this application. Let s now have a look at ziip offload: Transaction mix scalability test: DB2 ziip usage% 8 6 4 2 5. 53.3 52.7 52.3 48.9 46.7 47.3 47.7 2 3 4 82 6 2399 393 Total number of LPAR Total number of tps CP CPU% ziip CPU% Figure 7 Transaction mix scalability test, DB2 ziip usage Figure 7 shows processor usage breakdown per processor type normalized to. We see ziip offload of 47% for the data sharing runs. This definitely proves that using type 4 JDBC connections helps to reduce total cost of ownership (TCO). Copyright IBM Corporation, 28 5/4/28 v. Page 6 of 7

Conclusion We benchmarked an application that makes extensive use of native SQL stored procedure. Results from this benchmark show that this application performs and scales very well. We achieved 393 business transactions per second with a DB2 response time of 3 ms. We conducted tests to compare JDBC type 2 and type 4 connections. The use of type 4 connection is recommended for this application, because it provides key benefits with very limited overhead. Normally, for a WAS/DB2 configuration in Sysplex, IBM would recommend type 2 connection, because this eliminates the DRDA flow and TCP/IP overhead of type 4. However, with the use of nested stored procedures, the DRDA flows are minimal. Therefore using the type 4 connection is not a significant overhead and provides the following advantages: Allow for ziip exploitation. Reviewing the test results show greater than 4 usage of ziip processing Continuous availability Disclaimer and Trademarks Measurement data included in this document are obtained by the members of the System z benchmark center department at the IBM PSSC in Montpellier, France. The materials in this document are subject to enhancements at some future date, a new release of DB2, or a Programming Temporary Fix. The information contained in this document has not been submitted to any formal IBM review and is distributed on an "As Is" basis without any warranty either expressed or implied. The use of this information is a customer responsibility. The following terms are trademarks or registered trademarks of the International Business Machines Corporation in the United States, other countries or both: DATABASE 2, DB2, DRDA, OS/39, MVS/ESA, SYSTEM/39, IBM, WebSphere, z/os, zseries, System z. The following terms are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other countries, or both: JDBC. Other company, product or service names may be trademarks or service marks of others. Copyright IBM Corporation, 28 5/4/28 v. Page 7 of 7