J2se 1 5 memory heap and garbage collector
Download
1 / 19

J2SE 1.5 : Memory Heap and Garbage Collector - PowerPoint PPT Presentation


  • 122 Views
  • Uploaded on

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 Collector do You will be able to understand the impact of GC on J2EE application performance. JVM Object Garbage Collection.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' J2SE 1.5 : Memory Heap and Garbage Collector' - jenis


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Objectives
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


Jvm object garbage collection
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




Generations2
Generations

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.



Throughput collector
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



Performance consideration
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


Measurement command line
Measurement: Command Line

  • -verbose:gc

  • -XX:PrintGCDetails

  • -XX:PrintGCTimeStamp

  • -XX:+PrintTenuringDistribution

  • -XX:PrintHeapAtGC

  • -Xloggc:<filename>








Sizing the generations
Sizing the Generations

  • -Xms<size>

  • -Xmx<size>

  • -XX:NewSize=<size>

  • -XX:MaxNewSize=<size>

  • -XX:MaxPermSize=<size>

  • -XX:+UseTLAB

  • -XX:MaxTenuredThreshhold=32


Sizing the generations1
Sizing the Generations

JAVA_OPTS=$JAVA_OPTS

-Xms1200m –Xmx1200m

–XX:NewSize=400M

–XX:MaxNewSize=400M

–XX:SurvivorRatio=32

–XX:+UseTLAB –XX:TLABSize=64K


ad