Presentation is loading. Please wait.

Presentation is loading. Please wait.

J2SE 1.5 : Memory Heap and Garbage Collector. Objectives You will be able to understand the JVM Memory Heap You will be able to know what the Garbage.

Similar presentations


Presentation on theme: "J2SE 1.5 : Memory Heap and Garbage Collector. Objectives You will be able to understand the JVM Memory Heap You will be able to know what the Garbage."— Presentation transcript:

1 J2SE 1.5 : Memory Heap and Garbage Collector

2 Objectives You will be able to understand the JVM Memory Heap You will be able to know what the Garbage Collector do You will be able to understand the impact of GC on J2EE application performance

3 JVM Object Garbage Collection GC shields the developer from the complexity of memory allocation and garbage collection GC is one of the principal bottleneck of J2EE applications OutOfMemoryExceptions Memory Leak

4 Generations

5

6 If the garbage collector has become a bottleneck, you may wish to customize the generation sizes. Check the verbose garbage collector output, and then explore the sensitivity of your individual performance metric to the garbage collector parameters.

7 Garbage Collection Schemes

8 Throughput Collector The Throughput Collector is selected by the default if the JVM is runinng in server mode Can be enabled using the command line flag -XX:+UseParallelGC

9 Throughput Collector

10 Performance Consideration Throughput: percentage of total time not spent in garbage collection Pauses: the times when an application appears unresponsive because garbage collection is occurring

11 Measurement: Command Line -verbose:gc -XX:PrintGCDetails -XX:PrintGCTimeStamp -XX:+PrintTenuringDistribution -XX:PrintHeapAtGC -Xloggc:

12 Measurement : -verbose:gc

13 Measurement: -XX:PrintGCDetails

14 Measurement: PrintHeapAtGC

15 Measurement: visualgc

16 Measurement: JConsole

17 Sizing Generations

18 Sizing the Generations -Xms -Xmx -XX:NewSize= -XX:MaxNewSize= -XX:MaxPermSize= -XX:+UseTLAB -XX:MaxTenuredThreshhold=32

19 Sizing the Generations JAVA_OPTS=$JAVA_OPTS -Xms1200m –Xmx1200m –XX:NewSize=400M –XX:MaxNewSize=400M –XX:SurvivorRatio=32 –XX:+UseTLAB –XX:TLABSize=64K


Download ppt "J2SE 1.5 : Memory Heap and Garbage Collector. Objectives You will be able to understand the JVM Memory Heap You will be able to know what the Garbage."

Similar presentations


Ads by Google