Java J2EE Performance Tuning
Java J2EE Performance Tuning
Day 1 : What is Performance? Computational Performance RAM Footprint Startup Time Scalability Perceived Performance
Measuring performance Benchmarking Why Build Benchmarks? Micro-Benchmarks Macro-Benchmarks Analyzing Benchmarks
I/O Performance Basic I/O Buffered Streams Custom Buffering Further Improvements Serialization Serialization Example Improved Serialization Example Analyzing Persistent State NIO
RAM Footprint Computing RAM Footprint Assessing Memory Usage Measuring a Program's True Footprint What Contributes to Footprint? Objects Classes Threads
# 177, 8th Block, Jayanagar, Bangalore 560082 Ph: 41661184/5/6 page 2 of 7
Native Data Structures Native Libraries Class Loading Measuring Class Loads
Controlling Class Loading Eager Class Loading Controlling Eager Loading Reducing the Number of Classes Simple Inner Classes Collapsing the Listeners Using Reflection Using a Proxy Running Multiple Programs Running in the Same Virtual Machine
Day 2: Object Mutability: String and Other Things Lots of Little Objects Handling String Objects Mutable Objects in AWT and Swing Eliminating Temporary Objects Other Mutable Object Tactics Simulating const Mutable Object Case Study Small Objects and the Modern JVM Object Pooling Array Mutability
Achieving Elegance Considering the Problem Space Using Recursive Algorithms Beyond Simple Algorithms Selecting Data Structures Java 2 Collections The Collection Interfaces Collection Interface List Objects Set Objects Map Objects Synchronized Collections Collections Framework Algorithms Plain Arrays Immutable Collections Collections Example Collection Benchmark Results
Using Native Code Native Graphics Example Native Code Comparison Examining JNI Costs Java Language Copy JNI Patterns Pattern 1: Call Pattern 2: Call-Pull Pattern 3: Call-Pull-Push Pattern 3 (Variant): Call-Pull-Push with Critical Pattern 4: Call-Invoke
page 4 of 7
Reflection and performance Profiling Profiling Execution Times Profiling Memory Usage Profiling to Locate Memory Leaks Basic Tools Using OptimizeIT/JProbe Timers & Logging Common Problems Load Testing Tools Load Testing Techniques JVM Profilers Heap Activity Monitors Dealing with Flat Profiles A Flat Profile Example
The Truth About Garbage Collection Why Should You Care About Garbage Collection? The Guarantees of GC The Object Lifecycle Created In Use Invisible Unreachable Collected Finalized Deallocated
Reference Objects Types of Reference Objects Example GC with WeakReference References on Garbage Collection The Java HotSpot Virtual Machine
# 177, 8th Block, Jayanagar, Bangalore 560082 Ph: 41661184/5/6 page 5 of 7
HotSpot Architecture Two Versions of HotSpot Runtime Features Memory Allocation and Garbage Collection Thread Synchronization HotSpot Server Compiler Aggressive Inlining Other Optimizations Array Bounds Checks -X Flags -Xnoclassgc -Xincgc -Xbatch -Xms -Xmx -Xprof -XX Flags Kinds of -XX Flags PrintBytecodeHistogram CompileThreshold NewSize
Day 3: Performance in the context of J2EE Performance Coding Best Practices for J2EE EJB best practices Servlet/JSP best practices Transactions , Distributed transactions JDBC and performance. JMS and performance- persistant & non persistant
# 177, 8th Block, Jayanagar, Bangalore 560082 Ph: 41661184/5/6 page 6 of 7
J2EE application performance tuning tuning Web tier tuning ejbs connection leak profiling tuning in response to statistics from app server
page 7 of 7