Java Application Performance



Similar documents
PERFORMANCE EVALUATION OF JAVA OBJECT-RELATIONAL MAPPING TOOLS HASEEB YOUSAF. (Under the Direction of John A. Miller)

Performance Evaluation of Java Object Relational Mapping Tools

DB2 Connect for NT and the Microsoft Windows NT Load Balancing Service

ITG Software Engineering

Performance rule violations usually result in increased CPU or I/O, time to fix the mistake, and ultimately, a cost to the business unit.

DB2 Application Development and Migration Tools

CA IDMS Server r17. Product Overview. Business Value. Delivery Approach

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

1. Introduction What is Slice? Background Why Slice? Purpose of this Document Intended Audience...

Version Overview. Business value

What is Data Virtualization? Rick F. van der Lans, R20/Consultancy

Java DB2 Developers Performance Best Practices

What is Data Virtualization?

How To Use An Informix System With A Computer System (For A Dba)

Performance Optimization For Operational Risk Management Application On Azure Platform

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

FAQ: HPA-SQL FOR DB2 MAY

Introduction: Database management system

Enterprise Application Development In Java with AJAX and ORM

The Data Access Handbook

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

PeopleTools Tables: The Application Repository in the Database

Chapter 13. Introduction to SQL Programming Techniques. Database Programming: Techniques and Issues. SQL Programming. Database applications

WebSphere Server Administration Course

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

IBM WebSphere Distributed Caching Products

Lag Sucks! R.J. Lorimer Director of Platform Engineering Electrotank, Inc. Robert Greene Vice President of Technology Versant Corporation

Performance Comparison of Persistence Frameworks

Blackboard Learn TM, Release 9 Technology Architecture. John Fontaine

CSE 530A Database Management Systems. Introduction. Washington University Fall 2013

How To Write A Store On A Microsoft Database On A Flash (Orchestra) On A Linux Computer (Ortho) On An Ipro (Orroster) On Your Computer Or Your Computer (For Ahem) On The

There and Back Again As Quick As a Flash

Introduction. AppDynamics for Databases Version Page 1

Cognos8 Deployment Best Practices for Performance/Scalability. Barnaby Cole Practice Lead, Technical Services

Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist

No.1 IT Online training institute from Hyderabad URL: sriramtechnologies.com

IBM WebSphere Server Administration

CACHÉ: FLEXIBLE, HIGH-PERFORMANCE PERSISTENCE FOR JAVA APPLICATIONS

Integrate Master Data with Big Data using Oracle Table Access for Hadoop

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

Consolidate by Migrating Your Databases to Oracle Database 11g. Fred Louis Enterprise Architect

Oracle Net Services for Oracle10g. An Oracle White Paper May 2005

Performance Implications of Various Cursor Types in Microsoft SQL Server. By: Edward Whalen Performance Tuning Corporation

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

WSO2 Business Process Server Clustering Guide for 3.2.0

CA Insight Database Performance Monitor for DB2 for z/os

Chapter 2 Database System Concepts and Architecture

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

Research Article. ISSN (Print) *Corresponding author Lili Wang

Using Apache Derby in the real world

Dell and JBoss just work Inventory Management Clustering System on JBoss Enterprise Middleware

StratioDeep. An integration layer between Cassandra and Spark. Álvaro Agea Herradón Antonio Alcocer Falcón

Guiding Principles for Modeling and Designing Reusable Services

HP NonStop JDBC Type 4 Driver Performance Tuning Guide for Version 1.0

Holistic Performance Analysis of J2EE Applications

White Paper. Optimizing the Performance Of MySQL Cluster

Grails 1.1. Web Application. Development. Reclaiming Productivity for Faster. Java Web Development. Jon Dickinson PUBLISHING J MUMBAI BIRMINGHAM

Service Oriented Architectures

Transaction Performance Maximizer InterMax

Composite Data Virtualization Composite Data Virtualization And NOSQL Data Stores

Top 10 Performance Tips for OBI-EE

Welcome to: Overview of DB2 Universal Database

IBM InfoSphere Guardium for DB2 on z/os Technical Deep Dive

XTM Web 2.0 Enterprise Architecture Hardware Implementation Guidelines. A.Zydroń 18 April Page 1 of 12

Oracle WebLogic Server 11g Administration

JReport Server Deployment Scenarios

Planning the Migration of Enterprise Applications to the Cloud

HP OO 10.X - SiteScope Monitoring Templates

CS346: Database Programming.

IBM WebSphere Application Server Network Deployment for Distributed Platforms, Version 8.5. Establishing highly available services for applications

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

Framework Adoption for Java Enterprise Application Development

Why is CICS Still Alive? Dr Geoff Sharman Visiting Professor in Computer Science Birkbeck College

Basic TCP/IP networking knowledge of client/server concepts Basic Linux commands and desktop navigation (if don't know we will cover it )

Optimize workloads to achieve success with cloud and big data

Learning GlassFish for Tomcat Users

Enterprise Application Monitoring with

PERFORMANCE ANALYSIS OF KERNEL-BASED VIRTUAL MACHINE

Performance Testing Process

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

CREATING HIGH PERFORMANCE BIG DATA APPLICATIONS WITH THE JAVA PERSISTENCE API

ADAM 5.5. System Requirements

Oracle Real Time Decisions

Oracle Weblogic. Setup, Configuration, Tuning, and Considerations. Presented by: Michael Hogan Sr. Technical Consultant at Enkitec

System Monitor Guide and Reference

LISTE DES DOCUMENTS ORACLE

Tuning Your GlassFish Performance Tips. Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc.

An Oracle White Paper May Oracle Tuxedo: An Enterprise Platform for Dynamic Languages

SAP Sybase Replication Server What s New in SP100. Bill Zhang, Product Management, SAP HANA Lisa Spagnolie, Director of Product Marketing

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

Transcription:

Java Application Performance On DB2 for z/os <Ludovic Janssens, Consultant>

Presentation Overview What is this presentation about? Why this presentation? DB2 Connectivity Type 4 connectivity architecture Connection Pools Relevant Configurations Getting a grip on your Java SQL Object Relational Mapping Strategies Java Standards ORM software features Online Java vs Batch Java Not all Java workload is Java coding Groovy and Gorm Scala End-to-End Monitoring and Tuning Importance Identification throughout the enterprise Explain facilities 2

Why this presentation? Why bother listening? Many Java developers think about the mainframe as the big black box from the stone age Many mainframe specialists think of Java as something that is that much automated, that it cannot work properly on the mainframe and DB2 for z/os dba s see (generated) dynamic SQL as a heresy 3

Maybe it s time to make peace...... And to boldly go where no man has gone before 4

DB2 Connectivity Any fact becomes important when it's connected to another (Umberto Eco, Foucault s Pendulum) 5

Type 4 connectivity architecture The Joy of DRDA JDBC is able to do direct database calls thanks to DRDA. The driver is pure java code With the DB2 Connect Universal Edition, the license is on the mainframe and Java can connect directly to DB2 for z/os With a gateway, you use two type 4 connections: 1 to the gateway and 1 to the database DB2 11 provides an improvement: with DRDACBF the requester opens a secondary connection to the DB2 server for each read-only cursor Application JDBC Driver DRDA DB2 6

Connection Pools Connection Pooling Architecture Application Application Application Connection Pool: DBCP, C3P0, BoneCP, WAS Active + Idle Connections (Logical Connections) DB2 JDBC Driver TCP/IP JDBC Global Transport Pool: Active + Idle TCP/IP Threads (Physical Connections) DB2 Inbound TCP/IP Connection Pool: CONDBAT/CMSTAT/MAXTYPE1 (Active/Inactive) (Logical Database Threads) DB2 Inbound Database Connection Pool: MAXDBAT (Active/Inactive) (Physical Database Threads) T1 T2 T3 7

Connection Pools Connection Pooling Architecture Application Application Set enableconnectionconcentrator to true! (false by default) Application Connection Pool: More logical connections possible per TCP/IP thread (Caveat: DBCP is single threaded!!) DB2 JDBC Driver TCP/IP JDBC Driver Connection Pool: The TCP/IP threads are heterogeneous DB2 Inbound TCP/IP Connection Pool: Logical Database Threads are heterogeneous and can connect to more physical threads DB2 Inbound Database Connection Pool: Physical Database Threads are heterogeneous and can accept more logical connections T1 T2 T3 8

Relevant Configurations zparms and driver properties to be aligned Pool Sizes: zparms: CONDBAT, MAXDBAT, MAXTYPE1, MAXCONQN Driver Configuration: Application: depends on the connection pool in use Global Transport Pool: db2.jcc.maxtransportobjects, db2.jcc.mintransportobjects TimeOut configuration: TCP/IP Keep Alive, Idle Thread Time Out, Pool Thread Time Out, Resource Time Out... zparms: TCPKALV, IDTHTOIN, POOLINAC, IRLMWT, MAXCONQW Driver Configuration: Application: depends on the connection pool in use Global Transport Pool: db2.jcc.maxtransportobjectidletime, db2.jcc.maxtransportobjectwaittime 9

Getting a grip on distributed SQL To understand your fear is the beginning of really seeing (Bruce lee) 10

Object-Relational Mapping Strategies Java is standardized, but what are the Java standards? SQL Connectivity JDBC (Java Database Connectivity) Standard for connecting dynamic SQL to the database On its own a rather complex and verbose standard API SQLJ (SQL for Java) Standard for connecting static SQL to the database Resembles classic (COBOL, PL/I,...) embedded SQL implementations Its database centric approach does not easily fit in the object-oriented paradigm In order to facilitate JDBC usage, we can map hierarchical Java Object Model with the Relational Data Model in DB2 (and resolve the objectrelational impedance mismatch ) This requires Object Relational Mapping Software (ORM): Hibernate, ibatis (mybatis), OpenJPA... Current standards involve JDO (Java Data Objects): standard for any data store access JPA (Java Persistence API): standard for ORM implementations, subset of JDO 11

Object-Relational Mapping Strategies The ORM Software Types Type 1: Domain based persistence layers (eg. Hibernate, OpenJPA, EclipseLink, ): The object model is the basis for the SQL generation, using a variety of mapping techniques (see next slide) A structured domain (query) language us used (eg. HQL, JPQL, JDOQL) An underlying meta-model reflects the database Type 2: SQL based persistence layer (eg. ibatis/mybatis): Java methods are linked to SQL clauses and statements The SQL is built following the application logic Both strategies are valid, but in the scope of the SOA principles (loose coupling and service autonomy), the domain approach, that does not assume a relational model underneath, is the preferred one. 12

Object-Relational Mapping Strategies Domain based mapping strategies Lazy loading From the hierarchical object model parent nodes are fetched without their children until the data of the children is requested by the application Less SQL when you only need parent data, more SQL when you need the child detail Eager loading From the hierarchical object model parent nodes are fetch with their children in order to load all details up to a certain degree Less SQL when needing alls detail throughout your application Employee ID Name Age 33 First Name Last Name Ludovic Janssens Lazy: [Need EmployeeID] Select EmployeeID From Emptab Where Name = Ludovic Janssens ; [Need First and Last Name] Select FirstName, LastName From NameTab Where FirstName = Ludovic ; [Need Age] Select Age From PersInfoTab Where Name = Ludovic Janssens ; Eager: [Need EmployeeID] Select EmployeeID From Emptab Where Name = Ludovic Janssens ; Select FirstName, LastName From NameTab Where FirstName = Ludovic ; Select Age From PersInfoTab Where Name = Ludovic Janssens ; [Need First and Last Name] get from cache [Need Age] get from cache 13

Object-Relational Mapping Strategies Domain based mapping strategies Join Fetching Join the tables that are fetched Reduces the amount of SQL statements issued, but can generate too big joins Batch Fetching If several queries are fetching data that is related to each other, batch fetch will first fetch the base object and then issue simple join queries to fetch the details (eg. Fetch employees, fetch those who work part time, fetch their telephone number) Will generate more SQL, but more efficient SQL Employee ID Name Age 33 First Name Last Name Ludovic Janssens Batch: Select EmployeeID From Emptab Where Name = Ludovic Janssens ; Select FirstName, LastName From NameTab Where FirstName = Ludovic ; Select Age From PersInfoTab Where Name = Ludovic Janssens ; Join: Select EmployeeID, FirstName, LastName, Age From EmpTab A inner join NameTab B on A.Name = B.FirstName inner join PersInfoTab C on A.Name = C.Name Where B.FirstName = Ludovic and B.LastName = Janssens ; 14

Java Online vs. Java Batch Save network time Online Java Connects on the getconnection call and closes the connection when returning the query result SQL SQL SQL SQL SQL DB2 Bath Java Connects on the first getconnection call and closes when all queries have been completed Restriction: only similar DML can be issued in one batch SQL DB2 SQL SQL SQL SQL 15

Not all Java Load is Java coding On Groovy and Scala Groovy According to the makers: an agile and dynamic language for the Java Virtual Machine Makes use of the Java Virtual Machine (JVM), but includes features from scripting languages GORM is part of the GRAILS framework and covers Hibernate 3 Typical feature is SQL flushing: build queries and release them when they are really required (is actually a hibernate feature, but very often used in this context) Interesting for Java batch and for KeepDynamic Scala Scala is a scalable language, it is concise and makes an optimized usage of the JVM Scala is Object-Oriented and Functional, its relational mapping is based on functions rather than objects SQL can be the basis for Scala Queries (no DSL required) Native Scala can match with SQL structures and make any database API obsolete Ideal for Web Applications with massive amounts of queries (KeepDynamic) 16

End-to-End Monitoring and Tuning Bond: In my business, you prepare for the unexpected. Franz Sanchez: And what business is that? Bond: I help people with problems. Franz Sanchez: Problems solver. Bond: More of a problem eliminator. (From James Bond - License to Kill) 17

The Importance of End-to-End Monitoring Where do we have to look? Without End-to-End Monitoring Local Database Monitoring Gives you a view from the moment the TCP/IP thread arrives on the mainframe until it leaves. DB2 time, z/os times Local Application Monitoring Gives you a view of the application thread until it leaves the server and a new view when it comes back With End-to-End Monitoring Thread view from the issueing of the getconnection until the retrieval of the data Clear view on where time is spent and whether the network causes latency Base for decisions on Java batch implementation or choosing for Stored Procedures,... JDBC profiling gives a view on the SQL that is executed 18

Identification throughout the enterprise Fill out the properties! clientuser, clientapplicationinformation, clientaccountinginformation, clientworkstationname, clientprogramname, clientprogramid, clientcorrelationtoken (DB2 11) JDBC properties or WLM_SET_CLIENT_INFO DB2 registers Values can be used Monitoring (profiles, trace records,...) Security (trusted contexts secondary authid...) WLM (profiles) RLF (profiles)... 19

Explain Facilities currentexplainmode currentexplainmode = NO Default No explains are done Application is ran normally currentexplainmode = YES Explains are run next to the application Explains are done in the explain tables set set by the currentschema and currentsqlid currentexplainmode = ONLY Explains are run, but the application does not execute its statements on the database Ideal for production tuning 20

Java and DB2 for z/os Questions? 21

Thank You! 22

Java application performance on DB2 for z/os Short Word on Infocura Who are we? INFOCURA Is specialized in the distribution, consulting, installation, migration, tuning, auditing and education of IBM Information Management Products both on Distributed and Mainframe platforms INFO CURA means: I care for your information Please visit http://www.infocura.com/ 23