Java Performance: Three Java Performance Testing Considerations for Architects

There exists a wide variety of performance tuning techniques for optimizing any type of application.  Java performance with all of its intricacies presents more challenges.  Lies, damn lies, and Java performance statistics truly need to be gathered many different ways to validate your performance.  The following three key areas in Java performance can really help tune your Java application performance before you deploy your application into production.

First profile your Java application workload.  The object model of Java programming is wonderful for reusing classes, methods and data objects.  Unfortunately, this can lead to routines being called unnecessarily, in a circular fashion or multiple times, causing delays or Java performance processing bloat.  Eliminate the Java performance overhead bloat and profile your Java application as soon as a prototype is working.  Use the Java profile information to understand the processing class and method use, the order they are called and the number of times they are called during a transaction.  Eliminating extra calls to the persistent cache and database as well as reducing network trips can eliminate Java performance problems and streamline your application as soon as possible.

Next benchmark your Java performance and memory usage with the real number of concurrent users or double the estimate of expected concurrent users.  Since Java processing uses the Java Virtual Machine (JVM), Just in Time (JIT) compilation processing and thread scheduling the number of concurrent users can dramatically impact the Java performance.  All of these JVM, JIT and thread scheduling during your Java application processing will then be impacted by the Java Garbage Collector (GC) as your application processes its transactions and discards in-memory objects for GC processing.   Benchmarking with concurrent users also needs to be done over a sustained steady state time period of perhaps 30 minutes or more.  The initial memory allocation and on-going working memory allocated to the Java application JVM, JIT, GC and thread scheduling can fluctuate and dramatically impact Java performance.  Make sure to gather statistics with large numbers of concurrent users over an extended period of processing workloads to uncover your Java performance and memory usage performance issues.

Validate your Java performance against the production configuration.  With JVM, JIT, thread scheduling and GC all factoring into Java performance, the production virtual machine (VM), JVM, a single JVM or even multiple JVMs in the production environment may not provide enough CPU and memory resources for your workload.  With virtualization of machines the production environments are having their JVMs, CPUs, memory and disk performance shared and divided up.  Persistent caches with your VM and JVM may be swapped out, impacting your Java performance.  Perform a sustained Java performance test with your other workloads and be prepared to split your application or workload into multiple VMs or JVMs to get the Java performance your business application needs.

Java applications are the dominate application development language and incorporating these three procedures into your standards can eliminate bad processing before it gets to your production environment and guarantee optimized Java performance.
___________________________________________________
I look forward to supporting the DB2 community through the local DB2 User Groups.

I am coming to Dallas and Austin, Texas October 10th and 11th and look forward to presenting my “Agile Big Data Analytics: Implementing a 22 Billion Row Data Warehouse” and “Java DB2 Developer Performance Best Practices” speeches.  Check the website www.db2forum.org for Dallas for more information.  The Austin one should be updated soon.

I will be talking more about Big Data, UNION ALL Views and Materialized Query Tables during my presentation at the Information on Demand (IOD) conference in Las Vegas October 21st through 25th.  Through my speech “Agile Big Data Analytics: Implementing a 22 Billion Row Data Warehouse” Monday, October 22, 10:15 – 11:15 am in the Mandalay Bay North Convention Center – Islander C.  This presentation details the designing, prototyping and implementing a 22+ billion row data warehouse in only six months using an agile development methodology.  This complex analytics big data warehouse architecture took processes for this federal government agency from 37 hours to seconds.

Also I look forward to supporting the International DB2 Users Group (IDUG) conference in Berlin, Germany November 5th-9th with two topics “Data Warehouse Designs for Performance” and “Java DB2 Developer Performance Best Practices” on Tuesday November 6th.

On December 4th 5th and 6th I will be presenting at the Minneapolis, Milwaukee and Chicago DB2 User groups.

Please come by any of these presentations and say, “Hi.”
_____________________________________________________
Dave Beulke is an internationally recognized DB2 consultant, DB2 trainer and education instructor.  Dave helps his clients improve their strategic direction, dramatically improve DB2 performance and reduce their CPU demand saving millions in their systems, databases and application areas within their mainframe, UNIX and Windows environments.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>