Practical Performance: Understand and improve the performance of your application

52
1 © 2012 IBM Corporation Practical Performance Understand and improve the performance of your application Chris Bailey – IBM Java Service Architect 4 th October 2012

description

This session discusses how you can maximize the performance of your application deployment with tools that are native to your server platform as well as cross-platform Java analysis and monitoring tools. The session begins with systematic steps you can take to locate a performance problem in a complex system and moves on to analysis you can do to understand the root cause of the problem. The picture is completed by consideration of the tools and techniques available to monitor application performance in normal operation so that you can catch performance issues before they build up into serious problems. Presented at JavaOne 2012

Transcript of Practical Performance: Understand and improve the performance of your application

Page 1: Practical Performance: Understand and improve the performance of your application

1

© 2012 IBM Corporation

Practical PerformanceUnderstand and improve the performance of your application

Chris Bailey – IBM Java Service Architect

4th October 2012

Page 2: Practical Performance: Understand and improve the performance of your application

2 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Important Disclaimers

THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.

WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.

ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES.

ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.

IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.

IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.

NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:

- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS

Page 3: Practical Performance: Understand and improve the performance of your application

3 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Introduction to the speaker

■ 12 years experience developing and deploying Java SDKs

■ Recent work focus:– Java applications in the cloud– Java usability and quality– Debugging tools and capabilities– Requirements gathering– Highly resilient and scalable deployments

■ My contact information:– [email protected]– http://www.linkedin.com/in/chrisbaileyibm– http://www.slideshare.net/cnbailey/

Page 4: Practical Performance: Understand and improve the performance of your application

4 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Goals of the Talk

■ Introduce a simple general methodology for performance analysis

■ Discuss the common performance bottlenecks

■ Show how to analyse a simple application

Page 5: Practical Performance: Understand and improve the performance of your application

5 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Agenda

■ Approaches to performance

■ Layers of the application

■ Identifying and resolving performance issues

Page 6: Practical Performance: Understand and improve the performance of your application

6 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Approaches to performance

■ Outside in approach– Start from where performance can be measured– Work along the activity path– Ideal for identified performance problems

■ Layered approach– “Bottom up” or “Top down”– Analyze and eliminate layers of the application– Simplify the problem as you go– Ideal for application health check

■ A hybrid of both approaches can often be useful

Page 7: Practical Performance: Understand and improve the performance of your application

7 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Performance baseline

■ Important to have a repeatable and representative performance test

■ Measure baseline performance– Internal measurements affect the performance of what your measuring– External measurements have less impact on system performance

■ Where possible, measure multiple times– Variation will occur between test runs

■ Where possible, ensure consistency– Not just the load test that's run– State of machine and network can have interesting effects

Page 8: Practical Performance: Understand and improve the performance of your application

8 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: baseline

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

Baseline

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 9: Practical Performance: Understand and improve the performance of your application

9 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

A Layered Approach

■ Three layers of a deployment:– Infrastructure: Machine hardware and Operating System– Java Runtime: Garbage collection– Java Application: Java application code

■ Each can suffer from resource constraints, typically:– Memory– CPU– Synchronization– I/O

Page 10: Practical Performance: Understand and improve the performance of your application

10 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Infrastructure

■ Typical resource constraints:– Memory: insufficient physical memory results in paging/swapping– CPU: insufficient CPU time limits throughput of the application– I/O: insufficient I/O limits throughput of the application– Synchronization driven by Java runtime/Java application

■ Easy to diagnose■ Easy to resolve (relatively)

■ Note that each can also be caused by deficiencies higher up the stack!

Page 11: Practical Performance: Understand and improve the performance of your application

11 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Infrastructure: Memory usage

■ Infrastructure uses memory for:– Backing the process data: OS runtime, Java runtime, Java application– Caching of IO: filesystem and network buffers

■ Lack of physical memory causes:– Reduction and removal of IO caching– Paging/swapping of process memory to disk

■ Paging/swapping is costly for a Java process– Particularly affects Garbage Collection performance

• Paging usually occurs on Least Recently Used basis• All of Java heap is traversed during mark and sweep phases• Least Recently Used does not work well for the Java heap

Page 12: Practical Performance: Understand and improve the performance of your application

12 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Infrastructure: CPU usage

■ Insufficient CPU time availability will reduce performance

■ Can occur periodically:– Cron Jobs running batch applications– Database backups

■ Or during periods of high load:– System becomes CPU bound, limiting performance

Page 13: Practical Performance: Understand and improve the performance of your application

13 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Detecting infrastructure issues

■ Detect using Operating System level tools

■ Memory on Windows:– Paging: using “perfmon” with “Process” counter for “Page Faults/sec”– File Cache: using “perfmon” with “Memory” counter for “System Cache Resident Bytes”

■ CPU on Windows:– Per process: using “perfmon” with “Process” counter for “% Processor Time”– Per machine: using “perfmon” with “Processor” counter for “% Processor Time”

■ IO on Windows:– Network: using “perfmon” with “Network Interface” counter for “Output Queue Length”– Disk: using “perfmon” with “Physical Disk” counter for “Current Disk Queue Length”

Page 14: Practical Performance: Understand and improve the performance of your application

14 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Paging in perfmon

Page 15: Practical Performance: Understand and improve the performance of your application

15 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Resolving infrastructure issues

■ Add more physical resources to the process– Assign more to the: Machine, Guest OS, LPAR, Zone, etc

■ Reduce the physical resource requirements– Reduce the application footprint– Reduce the application CPU usage– Reduce the IO

Page 16: Practical Performance: Understand and improve the performance of your application

16 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Baseline

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

Baseline

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 17: Practical Performance: Understand and improve the performance of your application

17 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Paging removed

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

Baseline

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

BaselineNo Paging

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 18: Practical Performance: Understand and improve the performance of your application

18 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Effect on page performance

– PlantsByWebSphere 1.7%– servlet_ShoppingServlet{2} 22.8%– servlet_ShoppingServlet 0.3%– Shopping{1} 0.4%– Shopping{4} 21.4%– Shopping_1_1 17.9%– Shopping_2_2 2.8%– Shopping_2_3 16.7%– Shopping_2_4 24.1%– Shopping_2_5 13.8%

■ Improvement in page performance of 0.3% to 24.1%– Without outliers: 0.4% to 22.8%

■ Biggest gains are on most performant pages. Total gain is only ~4%– Relatively small effect on overall page performance

Page 19: Practical Performance: Understand and improve the performance of your application

19 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Garbage Collection Pause Times

Page 20: Practical Performance: Understand and improve the performance of your application

20 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Garbage Collection Pause Times

Page 21: Practical Performance: Understand and improve the performance of your application

21 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Effect on Garbage Collection Pause Times

■ Reduction in:– Maximum pause time: 38%– Average pause time: 13%– Time spent in GC 11%

■ Large effect on GC performance, particularly pause times

Page 22: Practical Performance: Understand and improve the performance of your application

22 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Java runtime

■ Typical resource constraints:– Memory: insufficient Java heap results in OutOfMemory or high GC overhead– CPU garbage collection overhead, or driven by Java application– Synchronization driven by Java application– IO driven by Java application

■ Easy to diagnose■ Easy to resolve (relatively)

Page 23: Practical Performance: Understand and improve the performance of your application

23 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Java runtime memory

■ Java runtime uses memory for:– Java Heap(s), Java Virtual Machine (JVM), “Native” heap, OS and C-language runtime

■ Java heap(s) are managed using Garbage Collection

0 GB 4 GB

0x0 0xFFFFFFFF

2 GB

0x800000000x40000000 0xC0000000

OS and C-Runtime JVM Java Heap(s)

-Xmx

Java Heap Native Heap

■ Other memory usage can be indirectly driven by application usage and garbage collection– eg. Java Threads

Page 24: Practical Performance: Understand and improve the performance of your application

24 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Java runtime problems

■ Insufficient Java heap memory leads to:– OutOfMemoryError due to Java heap exhaustion– Garbage Collection running excessively, increasing CPU and affecting performance

■ Insufficient non-Java (“native”) heap leads to:– OutOfMemoryError due to process address space exhaustion– Driver for Java heap garbage collection (DirectByteBuffer cleaners)

Page 25: Practical Performance: Understand and improve the performance of your application

25 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Detecting Java runtime problems

■ Log and trace analysis:– “Native” heap: OS level logs (ps, svmon, perfmon)– Java heap: verbose:gc output

– Post processed using:IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer (GCMV)

■ Live monitoring:– “Native” heap IBM Monitoring and Diagnostic Tools for Java - Health Center– Java heap: IBM Monitoring and Diagnostic Tools for Java - Health Center

Visual VM, Mission Control

Page 26: Practical Performance: Understand and improve the performance of your application

26 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Too Frequent Garbage Collection

Page 27: Practical Performance: Understand and improve the performance of your application

© 2011 IBM Corporation27 JavaOne Session 23401 – The Hidden World of Your Java Application and What its Really Doing

Too Frequent Garbage Collection

Long Garbage Collection Cycles

Garbage collection performanceM

emor

y

Time

Heap Size

Heap Occupancy

Page 28: Practical Performance: Understand and improve the performance of your application

28 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Resolving Java runtime problems

■ Add more resources to the Java runtime– Java heap: Increase Java heap size– Native heap: Move to 64bit or reduce Java heap size

■ Reduce the memory requirements– Reduce the Java application footprint

Page 29: Practical Performance: Understand and improve the performance of your application

29 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Increased Java heap size

Page 30: Practical Performance: Understand and improve the performance of your application

30 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Effect on Garbage Collection Pause Times

■ Reduction in:– Time spent in GC 59%

■ However this is only 4.84% of total time

Page 31: Practical Performance: Understand and improve the performance of your application

31 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Baseline

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

Baseline

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 32: Practical Performance: Understand and improve the performance of your application

32 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Paging removed

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

Baseline

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

BaselineNo Paging

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 33: Practical Performance: Understand and improve the performance of your application

33 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Java Heap size increased

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

BaselineNo PagingBigger Heap

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 34: Practical Performance: Understand and improve the performance of your application

34 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page performance improvements

– PlantsByWebSphere 0.4%– servlet_ShoppingServlet 0.0%– servlet_ShoppingServlet{2} 33.2%– Shopping{1} +0.6%– Shopping{4} 4.5%– Shopping_1_1 2.9%– Shopping_2_2 0.1%– Shopping_2_3 2.1%– Shopping_2_4 14.2%– Shopping_2_5 8.2%

■ Improvement in page performance of -0.6% to 33.2%– Without outliers: 0.0% to 14.2%

■ Total gain is only ~4%– Relatively small effect on overall page performance

Page 35: Practical Performance: Understand and improve the performance of your application

35 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Java application

■ Typical resource constraints:– Memory: insufficient caching affects application throughput and responsiveness– CPU: insufficient threading causes limits on scalability– Synchronsation: synchronized resources limits scalability and throughput of the application– I/O: blocking on I/O limits throughput and responsiveness

■ Hard to diagnose■ Can be expensive (or impossible!) to resolve

Page 36: Practical Performance: Understand and improve the performance of your application

36 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Java application CPU usage

■ High CPU usage by Java methods highlight areas of potential optimization– Code is being invoked more than it needs to be

• Easily done with event driven models– An algorithm is not the most efficient

• Easily done if performance is not the focus at development time

■ Fixing CPU bound applications requires knowledge of what code is being run– Identify methods which are suitable for optimisation

• Optimising methods which the application doesn’t spend time in is a waste of your time– Identify methods where more time is being spent that you expect

• “Why is so much of time being spent in this trivial method?”

Page 37: Practical Performance: Understand and improve the performance of your application

37 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Java application synchronization

■ Throughput does not increase linearly with load

■ At limit of throughput the CPU is still low– Inability to scale– Not all CPU can be utilized– Limit on throughput and responsiveness

■ Bottleneck where threads need to synchronize with each other for application correctness– Caused by large numbers of threads requiring synchronized resource at the same time– Caused by long hold time by thread that owns resource– Or a mixture of both

Page 38: Practical Performance: Understand and improve the performance of your application

38 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Health Center: application method CPU usage

Page 39: Practical Performance: Understand and improve the performance of your application

39 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Health Center: application synchronization

Page 40: Practical Performance: Understand and improve the performance of your application

40 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

ShoppingServlet.deliberateSlowMethod()

private void deliberateSlowMethod() {// ----------------------------------------------------------------// User clicked on the Tulips, let's tip toe through a// slow method// ----------------------------------------------------------------System.out.println("==> STARTING SLOW METHOD");long timestamp = System.currentTimeMillis();long target = timestamp + SLOWTIME;System.out.println("timestamp="+timestamp);System.out.println("resume at="+target);while(timestamp < target) {

timestamp = System.currentTimeMillis();}System.out.println("==> ENDING SLOW METHOD");

}

Page 41: Practical Performance: Understand and improve the performance of your application

41 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Baseline

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

Baseline

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 42: Practical Performance: Understand and improve the performance of your application

42 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Paging removed

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

Baseline

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

BaselineNo Paging

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 43: Practical Performance: Understand and improve the performance of your application

43 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Java Heap size increased

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

BaselineNo PagingBigger Heap

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 44: Practical Performance: Understand and improve the performance of your application

44 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: deliberateSlowMethod() changed

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

BaselineNo PagingBigger HeapApp Fix

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 45: Practical Performance: Understand and improve the performance of your application

45 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page performance improvements

■ servlet_ShoppingServlet 80.8% 5x improvement

■ Shopping{1} 94.3% 20x improvement

■ Improvement in page performance of 80 and 95%– 5x and 20x improvement for affected pages

■ Total gain of 48%!

Page 46: Practical Performance: Understand and improve the performance of your application

46 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Health Center: application method CPU usage

Page 47: Practical Performance: Understand and improve the performance of your application

47 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Health Center: application synchronization

Page 48: Practical Performance: Understand and improve the performance of your application

48 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Summary

■ Importance of:– Repeatable benchmark– Incremental measurements as changes are made– Repeated testing and verification

■ Tools are available to help you see what's going on:– Garbage Collection and Memory Visualizer (all vendors)– HealthCenter (IBM only)– Other profilers (eg. YourKit) (all vendors)– Memory Analyzer (all vendors)

Page 49: Practical Performance: Understand and improve the performance of your application

49 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Page response performance benchmark: Summary

PlantsByWebSphereservlet_ShoppingServlet

servlet_ShoppingServlet{2}Shopping{1}

Shopping{4}Shopping_1_1

Shopping_2_2Shopping_2_3

Shopping_2_4Shopping_2_5

0

5000

10000

15000

20000

Page PerformancePlantsbyWebSphere

BaselineNo PagingBigger HeapApp Fix

Page URL

Avg

Late

ncy

(mic

rose

cond

s)

Page 50: Practical Performance: Understand and improve the performance of your application

50 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Summary

■ Infrastructure resources affect performance– Paging and Garbage Collection much less than you might expect– However, beware of CPU “starvation” from other processes!

■ Vast majority of performance gains are in the application!

Page 51: Practical Performance: Understand and improve the performance of your application

51 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

References

■ Get Products and Technologies:– IBM Monitoring and Diagnostic Tools for Java:

• https://www.ibm.com/developerworks/java/jdk/tools/

■ Learn:– Health Center InfoCenter:

• http://publib.boulder.ibm.com/infocenter/hctool/v1r0/index.jsp

■ Discuss:– IBM on Troubleshooting Java Applications Blog:

• https://www.ibm.com/developerworks/mydeveloperworks/blogs/troubleshootingjava/– Health Center Forum:

• http://www.ibm.com/developerworks/forums/forum.jspa?forumID=1461– IBM Java Runtimes and SDKs Forum:

• http://www.ibm.com/developerworks/forums/forum.jspa?forumID=367&start=0

Page 52: Practical Performance: Understand and improve the performance of your application

52 © 2012 IBM CorporationPractical Performance: Understand and Improve the Performance of Your Application

Copyright and Trademarks

© IBM Corporation 2012. All Rights Reserved.

IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., and registered in many jurisdictions worldwide.

Other product and service names might be trademarks of IBM or other companies.

A current list of IBM trademarks is available on the Web – see the IBM “Copyright and trademark information” page at URL: www.ibm.com/legal/copytrade.shtml