SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
Java™ Garbage Collection
Statistical Analysis 101.
Juarez Junior
System Architect – Unisys Global Outsourcing
Agenda.
  Java Heap Management
  Simple Garbage Collection Statistics
   • Generating the Data
   • Isolating the Data
   • Graphing the Data
   • Interpreting the Data
   • Improving Performance
  Advanced Garbage Collection Statistics
   • Generate, Isolate, Graph, Interpret, Improve
  Java Command Line Arguments Recap
Java Heap.
  Young Generation
   • Eden
       - Where new objects are created
   • Survivor spaces
       - Where garbage collector places objects that are still in use

  Old Generation
   • Where tenured objects are placed
  References
   • http://java.sun.com/docs/hotspot/gc/ (1.3.1)
   • http://java.sun.com/docs/hotspot/gc1.4.2/
Minor Garbage Collection.
  Occurs when no room in eden for new object
  Marks all reachable objects in eden and “from” survivor space
  Copies those objects to “to” survivor space
      • Updates references accordingly
      • If “to” survivor space fills, overflows to old generation
  Resets allocation pointer to start of eden


  H                                                A    B     C     D     E
  I                                                E    F     G H         G   I

            Old Generation                                Eden          From From
                                                                          To To
                                                                          Spaces
Major Garbage Collection.
  Occurs when insufficient room in old generation to hold to-be-
  tenured objects during a minor collection
    • Pessimistic – need sufficient space to hold all object in young generation
    • Pre-calculated – Minor collection reachable object algorithm run to
      determine exactly now many objects will be tenured
  Mark and Compact
   • Reachable objects are marked
   • Marked objects are moved to one end of the old generation

  J    K M M N O
         L O                      V W          A    B     C    D
  P    Q    R
            X     S    T    U     X            E    F     G    H              I
           Old Generation                            Eden           To From
                                                                    Spaces
Agenda.
  Java Heap Management
  Simple Garbage Collection Statistics
   • Generating the Data
   • Isolating the Data
   • Graphing the Data
   • Interpreting the Data
   • Improving Performance
  Advanced Garbage Collection Statistics
   • Generate, Isolate, Graph, Interpret, Improve
  Java Command Line Arguments Recap
Generating Simple GC Data.
      -verbose:gc command line option
        java ... –verbose:gc ... my.java.app ...
      Results:
              ...
              [GC        1860K->1388K(1984K),   0.0005059     secs]
  Minor
              [GC        1900K->1446K(1984K),   0.0006679     secs]
collections   [GC        1958K->1468K(2112K),   0.0006251     secs]
              [Full GC   1468K-> 195K(2112K),   0.0131045     secs]
 Major and    ...
                                                        Time it took
   minor
 collection                                 Total heap size
                                     Heap in use after collection
                             Heap in use before collection
Isolating the Simple GC Data.
...                                                              ...
[GC        1860K->1388K(1984K),   0.0005059   secs]
[GC        1900K->1446K(1984K),   0.0006679   secs]              1860,1388,0.0005059
[GC
[Full GC
           1958K->1468K(2112K),
           1468K-> 195K(2112K),
                                  0.0006251
                                  0.0131045
                                              secs]
                                              secs]   Analyzer   1900,1446,0.0006679
...
                                                                 1958,1468,0.0006251
                                                                 1468,195,0.0131045
                                                                 ...




 import java.util.regex.Matcher;                       Comma-separated
 import java.util.regex.Pattern;                        value (CSV) file
 ...
 Pattern p = Pattern.compile
     ("[(?:Full |)GC (d*)K->(d*)K(d*K), ([d.]*) secs]");
 Matcher m = p.matcher(simple_gc_data_output);
 while (m.find())
     fout.println(m.group(1) + "," + m.group(2) + "," + m.group(3));
Interpreting the Regular Expression.
  The ’’ char is an escape character, both in Java and in
  regular expressions.
  [(?:Full |)GC (d*)K->(d*)K(d*K), ([d.]*) secs]
   [(?:Full |)GC     - match literal ‘[Full GC ’ or ‘[GC ’
   (d*)K->   - capture all digits before the literal text ‘K->’
   (d*)K   - capture all digits before the literal text ‘K’
   (d*K)   - discard the digits and literal text ‘K’ within parenthesis
                  - capture all digits and decimal point after the
   , ([d.]*) secs]
    comma and space, and before the literal text ‘secs]’



[Full GC 1468K-> 195K(2112K), 0.0131045 secs]
Graphing the Simple GC Data.
  Load the CSV file into a spreadsheet
  Sum the third column - total time spent
  on GC
  Create fourth column
   • Third column * 10000 (or 100000)
   • Gets times within range of columns 1 and 2
  Create a graph containing columns
  1, 2 and 4.
Graphing in Excel.
 Select first column only
 Create an “XY (Scatter)” graph
 Wizard step 2, click Series tab
 and add columns 2 and 4 to
 the series.
  • Click Add
  • Name: Type or select row 1 cell
  • X Values: leave empty
  • Y Values: Select cells in column
 Suggest creating new sheet
 for the chart
Graphing in StarOffice.
 Swap the 3rd and 4th columns (seconds*10000 is now the
 3rd column)
 Select the first 3 columns
 and create chart
  • Put chart in new sheet
  • Select ‘lines’ chart type
  • Select ‘normal’ variant
 After chart is created
  • Turn off labels on the X axis
  • Change width of data series
    lines to 0.02” or higher.
Interpreting Graphed GC Data.
  Typical GC data graph
  For many GCs, the heap slowly
  fills as objects get moved to the
  old generation
   • Blue (or magenta) lines with
     positive slope

  Then a full GC happens
   • Drop in blue (or magenta) lines
   • Yellow dot in higher position
Interpreting Graphed GC Data.
Three Phases                       Phase 1   Phase 2   Phase 3

Phase 1
 • Working set equilibrium
 • Ideal graph
 • No full GC
Phase 2
 • Full GC with heap not full
      - High GC times (yellow
        dots above blue zig-zag)
 • App called System.GC()
Phase 3
 • Incremental working set
   equilibrium
 • Implies various sub-phases
   each of which adds to
   working set
Improving Performance, Before.
  Goal: 1000 business transactions in 12 minutes
  Heap set to: -Xms1024m –Xmx1024m
  18 minute run, 472 seconds (7.8 minutes) in garbage collection

                                                     Each GC is
                                                    freeing very
                                                   little memory
Improving Performance, After.
-Xms1024m –Xmx1024m -XX:NewSize=300m –XX:MaxNewSize=300m
12 minute run, 25 seconds in garbage collection
 • 70 collections instead of 8000 (no major/full collections)
 • Average collection freed 240MB instead of just 1MB
Agenda.
  Java Heap Management
  Simple Garbage Collection Statistics
   • Generating the Data
   • Isolating the Data
   • Graphing the Data
   • Interpreting the Data
   • Improving Performance
  Advanced Garbage Collection Statistics
   • Generate, Isolate, Graph, Interpret, Improve
  Java Command Line Arguments Recap
More GC Data.
    PrintGCDetails command line option
      java ... –XX:+PrintGCDetails ... my.java.app ...
    Results:
  Minor        [GC [DefNew: 17131K->1606K(18432K), 0.0082055 secs]
collection                 44904K->29379K(63488K), 0.0083625 secs]

               [GC [DefNew: 17990K->17990K(18432K), 0.0000839 secs]
                   [Tenured: 27772K->3759K(45056K), 0.0454394 secs]
Major and                    45763K->3759K(63488K), 0.0459597 secs]
  minor
collection                                              Time it took
                                                      Heap size
     Sizes are for young                      Heap in use after collection
       generation, old
  generation, and total heap            Heap in use before collection
And Even More GC Data.
   PrintHeapAtGC command line option
    • java ... –XX:+PrintHeapAtGC ... my.java.app ...
   Results:
 {Heap before GC invocations=422:
 Heap
   def new generation   total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000)
    eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000)
    from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000)
    to   space 2048K,   0% used [0x6fb40000, 0x6fb40000, 0x6fd40000)
   tenured generation   total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000)
     the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000)
   compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
     the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
   Heap after GC invocations=423:
 Heap
   def new generation   total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000)
    eden space 16384K,   0% used [0x6eb40000, 0x6eb40000, 0x6fb40000)
    from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000)
    to   space 2048K,   0% used [0x6fd40000, 0x6fd40000, 0x6ff40000)
   tenured generation   total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000)
     the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000)
   compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
     the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
 }
PrintHeapAtGC Data.
{Heap before GC invocations=422:
Heap
  def new generation   total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000)
   from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000)
   to   space 2048K,   0% used [0x6fb40000, 0x6fb40000, 0x6fd40000)
  tenured generation   total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000)
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
  Heap after GC invocations=423:
Heap
  def new generation   total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K,   0% used [0x6eb40000, 0x6eb40000, 0x6fb40000)
   from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000)
   to   space 2048K,           Data from before GC
                       0% used [0x6fd40000, 0x6fd40000, 0x6ff40000)
  tenured generation   total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000)
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
}
PrintHeapAtGC Data.
{Heap before GC invocations=422:
Heap
  def new generation   total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000)
   from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000)
   to   space 2048K,          Data from after GC
                       0% used [0x6fb40000, 0x6fb40000, 0x6fd40000)
  tenured generation   total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000)
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
  Heap after GC invocations=423:
Heap
  def new generation   total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K,   0% used [0x6eb40000, 0x6eb40000, 0x6fb40000)
   from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000)
   to   space 2048K,   0% used [0x6fd40000, 0x6fd40000, 0x6ff40000)
  tenured generation   total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000)
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
}
PrintHeapAtGC Data.
{Heap before GC invocations=422:
Heap
  def new generation   total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000)
   from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000)
   to   space 2048K,   0% used [0x6fb40000, 0x6fb40000, 0x6fd40000)
  Memory
  tenured generation   total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000)
  addresses:
    the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000)
     Memory
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
   -addresses
     start
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
  Heap after GC invocations=423:
   - next
Heap
   - end
  def new generation
   eden space 16384K,
                       total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000)
                        0% used [0x6eb40000, 0x6eb40000, 0x6fb40000)
   from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000)
   to   space 2048K,   0% used [0x6fd40000, 0x6fd40000, 0x6ff40000)
  tenured generation   total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000)
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
}
PrintHeapAtGC Data.
{Heap before GC invocations=422:
Heap
  def new generation   total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000)
   from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000)
   to   space 2048K,   0% used [0x6fb40000, 0x6fb40000, 0x6fd40000)
       Before GC, eden ‘next’
  tenured generation   total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000)
          pointer is at end
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
  Heap after GC invocations=423:
Heap
  def new generation   total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K,   0% used [0x6eb40000, 0x6eb40000, 0x6fb40000)
   from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000)
   to   space 2048K,   0% used [0x6fd40000, 0x6fd40000, 0x6ff40000)
  tenured generation   total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000)
                                                 After GC, eden ‘next’
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)

}
                                                  pointer is at start
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
PrintHeapAtGC Data.
{Heap before GC invocations=422:
Heap
  def new generation                                 For each generation
                       total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000)
   from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000)
   to   space 2048K,   0% used [0x6fb40000, 0x6fb40000, 0x6fd40000)
  tenured generation   total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000)
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
  Heap after GC invocations=423:                     Memory in use
Heap
  def new generation   total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K,   0% used [0x6eb40000, 0x6eb40000, 0x6fb40000)
   from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000)
   to   space 2048K,   0% used [0x6fd40000, 0x6fd40000, 0x6ff40000)
  tenured generation   total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000)
                                                     Memory allocated
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
}
PrintHeapAtGC Data.
{Heap before GC invocations=422:
Heap                                    For each generational sub-space
  def new generation   total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000)
   from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000)
   to   space 2048K,   0% used [0x6fb40000, 0x6fb40000, 0x6fd40000)
  tenured generation   total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000)
                                                Percentage of that
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
  Heap after GC invocations=423:              memory that is in use
Heap
  def new generation   total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000)
   eden space 16384K,   0% used [0x6eb40000, 0x6eb40000, 0x6fb40000)
   from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000)
   to   space 2048K,   0% used [0x6fd40000, 0x6fd40000, 0x6ff40000)
  tenured generation                       Amount of memory allocated
                       total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000)
    the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000)
  compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000)
    the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
}
Isolating the Data.
   Extract data
    • Need a very complex regular expression
    • CSV file, spreadsheet, with many columns
   Interesting data
    • Memory in use by each generation
        - Before and after each collection
    • Percent in use of “from space”                      New data
        - NOTE: “After” data same as next “Before” data    worth
                                                          graphing
Graphing and Analyzing the Data.
 “From Space” usage is between 10%
 and 60%
 Adjust from space size using
 SurvivorRatio option
  • -XX:SurvivorRatio=ratio
  • Eden-size = survivor-size * ratio
  • Eden-size + 2 * survivor-ratio = young-gen-
    size
 Example:
  • -XX:NewSize=200M –XX:SurvivorRatio=8
  • Eden: 160MB, each Survivor Space: 20MB
 Aim for 90-95% usage after collection
  • Typically, with large young generations, use
    larger ratio (e.g. 32)
Agenda.
  Java Heap Management
  Simple Garbage Collection Statistics
   • Generating the Data
   • Isolating the Data
   • Graphing the Data
   • Interpreting the Data
   • Improving Performance
  Advanced Garbage Collection Statistics
   • Generate, Isolate, Graph, Interpret, Improve
  Java Command Line Arguments Recap
Garbage Collection Info Options.
  -verbose:gc
   • Heap usage before and after GC
   • Time spent during GC
  -XX:+ PrintGCDetails
   • Generation and heap size before and after GC
   • Time spent during GC
  -XX:+ PrintHeapAtGC
   • Generation sizes before and after GC
   • Space sizes and percent in use before and after GC
   • Memory locations of the heap, its generations, and their spaces
Java Tuning Options.
  -Xmssizem, -Xmxsizem
   • Minimum and maximum heap size
   • Set both sizes to the same value
  -XX:NewSize=sizem, -XX:MaxNewSize=sizem
   • Minimum and maximum young generation size
   • Set both sizes to the same value
   • Set to about 1/3 or 1/4 the size of the heap.
  -XX:SurvivorRatio=ratio
   • Number of times the eden space is larger than the “from” space
   • Try for maximum of 90-95% usage
Conclusions.
  The HotSpot™ JVM provides a variety of options
  for gathering garbage collection statistics.
  Those statistics are easily extracted using
   • A simple Java application using
   • A regular expression
  The extracted data is easily graphed using a
  spreadsheet application.
  Examining the resulting graph
   • Tells a lot about what the application is doing
   • Enables selection of proper heap sizing to improve
     performance of the application.
Questions?

Más contenido relacionado

La actualidad más candente

ICCSA 2010 Conference Presentation
ICCSA 2010 Conference PresentationICCSA 2010 Conference Presentation
ICCSA 2010 Conference PresentationGonçalo Amador
 
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Hansol Kang
 
ICISA 2010 Conference Presentation
ICISA 2010 Conference PresentationICISA 2010 Conference Presentation
ICISA 2010 Conference PresentationGonçalo Amador
 
Scaling out logistic regression with Spark
Scaling out logistic regression with SparkScaling out logistic regression with Spark
Scaling out logistic regression with SparkBarak Gitsis
 
Timing requirements
Timing requirementsTiming requirements
Timing requirementsmossaied
 
Practical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentPractical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentRaphael Reitzig
 
The Ring programming language version 1.4.1 book - Part 30 of 31
The Ring programming language version 1.4.1 book - Part 30 of 31The Ring programming language version 1.4.1 book - Part 30 of 31
The Ring programming language version 1.4.1 book - Part 30 of 31Mahmoud Samir Fayed
 
Grill at bigdata-cloud conf
Grill at bigdata-cloud confGrill at bigdata-cloud conf
Grill at bigdata-cloud confamarsri
 
Data Profiling in Apache Calcite
Data Profiling in Apache CalciteData Profiling in Apache Calcite
Data Profiling in Apache CalciteJulian Hyde
 
The Ring programming language version 1.8 book - Part 84 of 202
The Ring programming language version 1.8 book - Part 84 of 202The Ring programming language version 1.8 book - Part 84 of 202
The Ring programming language version 1.8 book - Part 84 of 202Mahmoud Samir Fayed
 
Representing and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebRepresenting and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebKostis Kyzirakos
 
Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28Ted Dunning
 
Performance features12102 doag_2014
Performance features12102 doag_2014Performance features12102 doag_2014
Performance features12102 doag_2014Trivadis
 
The Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High PerformanceThe Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High PerformanceMongoDB
 
Lab 3 nust control
Lab 3 nust controlLab 3 nust control
Lab 3 nust controltalhawaqar
 

La actualidad más candente (16)

ICCSA 2010 Conference Presentation
ICCSA 2010 Conference PresentationICCSA 2010 Conference Presentation
ICCSA 2010 Conference Presentation
 
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
Photo-realistic Single Image Super-resolution using a Generative Adversarial ...
 
ICISA 2010 Conference Presentation
ICISA 2010 Conference PresentationICISA 2010 Conference Presentation
ICISA 2010 Conference Presentation
 
Scaling out logistic regression with Spark
Scaling out logistic regression with SparkScaling out logistic regression with Spark
Scaling out logistic regression with Spark
 
Timing requirements
Timing requirementsTiming requirements
Timing requirements
 
Gclogs j1
Gclogs j1Gclogs j1
Gclogs j1
 
Practical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient ApportionmentPractical and Worst-Case Efficient Apportionment
Practical and Worst-Case Efficient Apportionment
 
The Ring programming language version 1.4.1 book - Part 30 of 31
The Ring programming language version 1.4.1 book - Part 30 of 31The Ring programming language version 1.4.1 book - Part 30 of 31
The Ring programming language version 1.4.1 book - Part 30 of 31
 
Grill at bigdata-cloud conf
Grill at bigdata-cloud confGrill at bigdata-cloud conf
Grill at bigdata-cloud conf
 
Data Profiling in Apache Calcite
Data Profiling in Apache CalciteData Profiling in Apache Calcite
Data Profiling in Apache Calcite
 
The Ring programming language version 1.8 book - Part 84 of 202
The Ring programming language version 1.8 book - Part 84 of 202The Ring programming language version 1.8 book - Part 84 of 202
The Ring programming language version 1.8 book - Part 84 of 202
 
Representing and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic WebRepresenting and Querying Geospatial Information in the Semantic Web
Representing and Querying Geospatial Information in the Semantic Web
 
Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28Paris data-geeks-2013-03-28
Paris data-geeks-2013-03-28
 
Performance features12102 doag_2014
Performance features12102 doag_2014Performance features12102 doag_2014
Performance features12102 doag_2014
 
The Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High PerformanceThe Weather of the Century Part 2: High Performance
The Weather of the Century Part 2: High Performance
 
Lab 3 nust control
Lab 3 nust controlLab 3 nust control
Lab 3 nust control
 

Destacado

Garbage collector complete information
Garbage collector complete informationGarbage collector complete information
Garbage collector complete informationMubarak Hussain
 
From Java Code to Java Heap: Understanding the Memory Usage of Your App - Ch...
From Java Code to Java Heap: Understanding the Memory Usage of Your App  - Ch...From Java Code to Java Heap: Understanding the Memory Usage of Your App  - Ch...
From Java Code to Java Heap: Understanding the Memory Usage of Your App - Ch...jaxLondonConference
 
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorJava Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorGurpreet Sachdeva
 
Performance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen BorgersPerformance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen BorgersNLJUG
 
Java memory presentation
Java memory presentationJava memory presentation
Java memory presentationYury Bubnov
 
From Java code to Java heap: Understanding and optimizing your application's ...
From Java code to Java heap: Understanding and optimizing your application's ...From Java code to Java heap: Understanding and optimizing your application's ...
From Java code to Java heap: Understanding and optimizing your application's ...Chris Bailey
 
Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)Ashish Jha
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage CollectionAzul Systems Inc.
 
Getting ready to java 8
Getting ready to java 8Getting ready to java 8
Getting ready to java 8DataArt
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8AppDynamics
 
Garbage collection algorithms
Garbage collection algorithmsGarbage collection algorithms
Garbage collection algorithmsachinth
 
50 new things you can do with java 8
50 new things you can do with java 850 new things you can do with java 8
50 new things you can do with java 8José Paumard
 
3장. Garbage Collection
3장. Garbage Collection3장. Garbage Collection
3장. Garbage Collection김 한도
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8Simon Ritter
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8javafxpert
 
Java 8 Support at the JVM Level
Java 8 Support at the JVM LevelJava 8 Support at the JVM Level
Java 8 Support at the JVM LevelNikita Lipsky
 

Destacado (17)

Garbage collector complete information
Garbage collector complete informationGarbage collector complete information
Garbage collector complete information
 
From Java Code to Java Heap: Understanding the Memory Usage of Your App - Ch...
From Java Code to Java Heap: Understanding the Memory Usage of Your App  - Ch...From Java Code to Java Heap: Understanding the Memory Usage of Your App  - Ch...
From Java Code to Java Heap: Understanding the Memory Usage of Your App - Ch...
 
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorJava Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
 
Performance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen BorgersPerformance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen Borgers
 
Java memory presentation
Java memory presentationJava memory presentation
Java memory presentation
 
From Java code to Java heap: Understanding and optimizing your application's ...
From Java code to Java heap: Understanding and optimizing your application's ...From Java code to Java heap: Understanding and optimizing your application's ...
From Java code to Java heap: Understanding and optimizing your application's ...
 
Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage Collection
 
Getting ready to java 8
Getting ready to java 8Getting ready to java 8
Getting ready to java 8
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8
 
Garbage collection algorithms
Garbage collection algorithmsGarbage collection algorithms
Garbage collection algorithms
 
50 new things you can do with java 8
50 new things you can do with java 850 new things you can do with java 8
50 new things you can do with java 8
 
3장. Garbage Collection
3장. Garbage Collection3장. Garbage Collection
3장. Garbage Collection
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
Java 8 Support at the JVM Level
Java 8 Support at the JVM LevelJava 8 Support at the JVM Level
Java 8 Support at the JVM Level
 

Similar a Jvm heap

Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Jayesh Thakrar
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection TuningKai Koenig
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & DiagnosticsDhaval Shah
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gcexsuns
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GCKelum Senanayake
 
Taming Java Garbage Collector
Taming Java Garbage CollectorTaming Java Garbage Collector
Taming Java Garbage CollectorDaya Atapattu
 
Pick diamonds from garbage
Pick diamonds from garbagePick diamonds from garbage
Pick diamonds from garbageTier1 App
 
JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011Kris Mok
 
Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...
Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...
Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...Monica Beckwith
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Tier1 App
 
High Performance Systems Without Tears - Scala Days Berlin 2018
High Performance Systems Without Tears - Scala Days Berlin 2018High Performance Systems Without Tears - Scala Days Berlin 2018
High Performance Systems Without Tears - Scala Days Berlin 2018Zahari Dichev
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?C2B2 Consulting
 
"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod PolyakovYulia Shcherbachova
 
Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016Vsevolod Polyakov
 
GC in Ruby. RubyC, Kiev, 2014.
GC in Ruby. RubyC, Kiev, 2014.GC in Ruby. RubyC, Kiev, 2014.
GC in Ruby. RubyC, Kiev, 2014.Timothy Tsvetkov
 
Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Monica Beckwith
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and CassandraChris Lohfink
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvmPrem Kuppumani
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and youKai Koenig
 

Similar a Jvm heap (20)

A G1GC Saga-KCJUG.pptx
A G1GC Saga-KCJUG.pptxA G1GC Saga-KCJUG.pptx
A G1GC Saga-KCJUG.pptx
 
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection Tuning
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & Diagnostics
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gc
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GC
 
Taming Java Garbage Collector
Taming Java Garbage CollectorTaming Java Garbage Collector
Taming Java Garbage Collector
 
Pick diamonds from garbage
Pick diamonds from garbagePick diamonds from garbage
Pick diamonds from garbage
 
JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011
 
Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...
Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...
Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and ...
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
 
High Performance Systems Without Tears - Scala Days Berlin 2018
High Performance Systems Without Tears - Scala Days Berlin 2018High Performance Systems Without Tears - Scala Days Berlin 2018
High Performance Systems Without Tears - Scala Days Berlin 2018
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?
 
"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov
 
Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016
 
GC in Ruby. RubyC, Kiev, 2014.
GC in Ruby. RubyC, Kiev, 2014.GC in Ruby. RubyC, Kiev, 2014.
GC in Ruby. RubyC, Kiev, 2014.
 
Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and Cassandra
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and you
 

Más de Juarez Junior

Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADBOracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADBJuarez Junior
 
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...Juarez Junior
 
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...Juarez Junior
 
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...Juarez Junior
 
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...Juarez Junior
 
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...Juarez Junior
 
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...Juarez Junior
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...Juarez Junior
 
SKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for DatabasesSKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for DatabasesJuarez Junior
 
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...Juarez Junior
 
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...Juarez Junior
 
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...Juarez Junior
 
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...Juarez Junior
 
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...Juarez Junior
 
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ThreadsDWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ThreadsJuarez Junior
 
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...Juarez Junior
 
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...Juarez Junior
 
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for DatabasesDeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for DatabasesJuarez Junior
 
DevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for DatabasesDevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for DatabasesJuarez Junior
 
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...Juarez Junior
 

Más de Juarez Junior (20)

Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADBOracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
 
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
 
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
Oracle CloudWorld 2023 - A High-Speed Data Ingestion Service in Java Using MQ...
 
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
 
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
 
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
 
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
 
SKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for DatabasesSKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for Databases
 
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
 
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
TDC Connections 2023 - A High-Speed Data Ingestion Service in Java Using MQTT...
 
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
 
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
 
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Us...
 
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ThreadsDWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
 
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
DWX23 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STO...
 
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
DeveloperWeek Latin America 2023 - A High-Speed Data Ingestion Service in Jav...
 
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for DatabasesDeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
 
DevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for DatabasesDevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for Databases
 
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
 

Último

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Jvm heap

  • 1. Java™ Garbage Collection Statistical Analysis 101. Juarez Junior System Architect – Unisys Global Outsourcing
  • 2. Agenda. Java Heap Management Simple Garbage Collection Statistics • Generating the Data • Isolating the Data • Graphing the Data • Interpreting the Data • Improving Performance Advanced Garbage Collection Statistics • Generate, Isolate, Graph, Interpret, Improve Java Command Line Arguments Recap
  • 3. Java Heap. Young Generation • Eden - Where new objects are created • Survivor spaces - Where garbage collector places objects that are still in use Old Generation • Where tenured objects are placed References • http://java.sun.com/docs/hotspot/gc/ (1.3.1) • http://java.sun.com/docs/hotspot/gc1.4.2/
  • 4. Minor Garbage Collection. Occurs when no room in eden for new object Marks all reachable objects in eden and “from” survivor space Copies those objects to “to” survivor space • Updates references accordingly • If “to” survivor space fills, overflows to old generation Resets allocation pointer to start of eden H A B C D E I E F G H G I Old Generation Eden From From To To Spaces
  • 5. Major Garbage Collection. Occurs when insufficient room in old generation to hold to-be- tenured objects during a minor collection • Pessimistic – need sufficient space to hold all object in young generation • Pre-calculated – Minor collection reachable object algorithm run to determine exactly now many objects will be tenured Mark and Compact • Reachable objects are marked • Marked objects are moved to one end of the old generation J K M M N O L O V W A B C D P Q R X S T U X E F G H I Old Generation Eden To From Spaces
  • 6. Agenda. Java Heap Management Simple Garbage Collection Statistics • Generating the Data • Isolating the Data • Graphing the Data • Interpreting the Data • Improving Performance Advanced Garbage Collection Statistics • Generate, Isolate, Graph, Interpret, Improve Java Command Line Arguments Recap
  • 7. Generating Simple GC Data. -verbose:gc command line option java ... –verbose:gc ... my.java.app ... Results: ... [GC 1860K->1388K(1984K), 0.0005059 secs] Minor [GC 1900K->1446K(1984K), 0.0006679 secs] collections [GC 1958K->1468K(2112K), 0.0006251 secs] [Full GC 1468K-> 195K(2112K), 0.0131045 secs] Major and ... Time it took minor collection Total heap size Heap in use after collection Heap in use before collection
  • 8. Isolating the Simple GC Data. ... ... [GC 1860K->1388K(1984K), 0.0005059 secs] [GC 1900K->1446K(1984K), 0.0006679 secs] 1860,1388,0.0005059 [GC [Full GC 1958K->1468K(2112K), 1468K-> 195K(2112K), 0.0006251 0.0131045 secs] secs] Analyzer 1900,1446,0.0006679 ... 1958,1468,0.0006251 1468,195,0.0131045 ... import java.util.regex.Matcher; Comma-separated import java.util.regex.Pattern; value (CSV) file ... Pattern p = Pattern.compile ("[(?:Full |)GC (d*)K->(d*)K(d*K), ([d.]*) secs]"); Matcher m = p.matcher(simple_gc_data_output); while (m.find()) fout.println(m.group(1) + "," + m.group(2) + "," + m.group(3));
  • 9. Interpreting the Regular Expression. The ’’ char is an escape character, both in Java and in regular expressions. [(?:Full |)GC (d*)K->(d*)K(d*K), ([d.]*) secs] [(?:Full |)GC - match literal ‘[Full GC ’ or ‘[GC ’ (d*)K-> - capture all digits before the literal text ‘K->’ (d*)K - capture all digits before the literal text ‘K’ (d*K) - discard the digits and literal text ‘K’ within parenthesis - capture all digits and decimal point after the , ([d.]*) secs] comma and space, and before the literal text ‘secs]’ [Full GC 1468K-> 195K(2112K), 0.0131045 secs]
  • 10. Graphing the Simple GC Data. Load the CSV file into a spreadsheet Sum the third column - total time spent on GC Create fourth column • Third column * 10000 (or 100000) • Gets times within range of columns 1 and 2 Create a graph containing columns 1, 2 and 4.
  • 11. Graphing in Excel. Select first column only Create an “XY (Scatter)” graph Wizard step 2, click Series tab and add columns 2 and 4 to the series. • Click Add • Name: Type or select row 1 cell • X Values: leave empty • Y Values: Select cells in column Suggest creating new sheet for the chart
  • 12. Graphing in StarOffice. Swap the 3rd and 4th columns (seconds*10000 is now the 3rd column) Select the first 3 columns and create chart • Put chart in new sheet • Select ‘lines’ chart type • Select ‘normal’ variant After chart is created • Turn off labels on the X axis • Change width of data series lines to 0.02” or higher.
  • 13. Interpreting Graphed GC Data. Typical GC data graph For many GCs, the heap slowly fills as objects get moved to the old generation • Blue (or magenta) lines with positive slope Then a full GC happens • Drop in blue (or magenta) lines • Yellow dot in higher position
  • 14. Interpreting Graphed GC Data. Three Phases Phase 1 Phase 2 Phase 3 Phase 1 • Working set equilibrium • Ideal graph • No full GC Phase 2 • Full GC with heap not full - High GC times (yellow dots above blue zig-zag) • App called System.GC() Phase 3 • Incremental working set equilibrium • Implies various sub-phases each of which adds to working set
  • 15. Improving Performance, Before. Goal: 1000 business transactions in 12 minutes Heap set to: -Xms1024m –Xmx1024m 18 minute run, 472 seconds (7.8 minutes) in garbage collection Each GC is freeing very little memory
  • 16. Improving Performance, After. -Xms1024m –Xmx1024m -XX:NewSize=300m –XX:MaxNewSize=300m 12 minute run, 25 seconds in garbage collection • 70 collections instead of 8000 (no major/full collections) • Average collection freed 240MB instead of just 1MB
  • 17. Agenda. Java Heap Management Simple Garbage Collection Statistics • Generating the Data • Isolating the Data • Graphing the Data • Interpreting the Data • Improving Performance Advanced Garbage Collection Statistics • Generate, Isolate, Graph, Interpret, Improve Java Command Line Arguments Recap
  • 18. More GC Data. PrintGCDetails command line option java ... –XX:+PrintGCDetails ... my.java.app ... Results: Minor [GC [DefNew: 17131K->1606K(18432K), 0.0082055 secs] collection 44904K->29379K(63488K), 0.0083625 secs] [GC [DefNew: 17990K->17990K(18432K), 0.0000839 secs] [Tenured: 27772K->3759K(45056K), 0.0454394 secs] Major and 45763K->3759K(63488K), 0.0459597 secs] minor collection Time it took Heap size Sizes are for young Heap in use after collection generation, old generation, and total heap Heap in use before collection
  • 19. And Even More GC Data. PrintHeapAtGC command line option • java ... –XX:+PrintHeapAtGC ... my.java.app ... Results: {Heap before GC invocations=422: Heap def new generation total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000) from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000) to space 2048K, 0% used [0x6fb40000, 0x6fb40000, 0x6fd40000) tenured generation total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) Heap after GC invocations=423: Heap def new generation total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 0% used [0x6eb40000, 0x6eb40000, 0x6fb40000) from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000) to space 2048K, 0% used [0x6fd40000, 0x6fd40000, 0x6ff40000) tenured generation total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) }
  • 20. PrintHeapAtGC Data. {Heap before GC invocations=422: Heap def new generation total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000) from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000) to space 2048K, 0% used [0x6fb40000, 0x6fb40000, 0x6fd40000) tenured generation total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) Heap after GC invocations=423: Heap def new generation total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 0% used [0x6eb40000, 0x6eb40000, 0x6fb40000) from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000) to space 2048K, Data from before GC 0% used [0x6fd40000, 0x6fd40000, 0x6ff40000) tenured generation total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) }
  • 21. PrintHeapAtGC Data. {Heap before GC invocations=422: Heap def new generation total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000) from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000) to space 2048K, Data from after GC 0% used [0x6fb40000, 0x6fb40000, 0x6fd40000) tenured generation total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) Heap after GC invocations=423: Heap def new generation total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 0% used [0x6eb40000, 0x6eb40000, 0x6fb40000) from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000) to space 2048K, 0% used [0x6fd40000, 0x6fd40000, 0x6ff40000) tenured generation total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) }
  • 22. PrintHeapAtGC Data. {Heap before GC invocations=422: Heap def new generation total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000) from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000) to space 2048K, 0% used [0x6fb40000, 0x6fb40000, 0x6fd40000) Memory tenured generation total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000) addresses: the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000) Memory compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) -addresses start the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) Heap after GC invocations=423: - next Heap - end def new generation eden space 16384K, total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000) 0% used [0x6eb40000, 0x6eb40000, 0x6fb40000) from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000) to space 2048K, 0% used [0x6fd40000, 0x6fd40000, 0x6ff40000) tenured generation total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) }
  • 23. PrintHeapAtGC Data. {Heap before GC invocations=422: Heap def new generation total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000) from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000) to space 2048K, 0% used [0x6fb40000, 0x6fb40000, 0x6fd40000) Before GC, eden ‘next’ tenured generation total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000) pointer is at end compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) Heap after GC invocations=423: Heap def new generation total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 0% used [0x6eb40000, 0x6eb40000, 0x6fb40000) from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000) to space 2048K, 0% used [0x6fd40000, 0x6fd40000, 0x6ff40000) tenured generation total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000) After GC, eden ‘next’ compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) } pointer is at start the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000)
  • 24. PrintHeapAtGC Data. {Heap before GC invocations=422: Heap def new generation For each generation total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000) from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000) to space 2048K, 0% used [0x6fb40000, 0x6fb40000, 0x6fd40000) tenured generation total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) Heap after GC invocations=423: Memory in use Heap def new generation total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 0% used [0x6eb40000, 0x6eb40000, 0x6fb40000) from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000) to space 2048K, 0% used [0x6fd40000, 0x6fd40000, 0x6ff40000) tenured generation total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000) Memory allocated compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) }
  • 25. PrintHeapAtGC Data. {Heap before GC invocations=422: Heap For each generational sub-space def new generation total 18432K, used 17639K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 100% used [0x6eb40000, 0x6fb40000, 0x6fb40000) from space 2048K, 61% used [0x6fd40000, 0x6fe79df8, 0x6ff40000) to space 2048K, 0% used [0x6fb40000, 0x6fb40000, 0x6fd40000) tenured generation total 45056K, used 6403K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70580f78, 0x70581000, 0x72b40000) Percentage of that compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) Heap after GC invocations=423: memory that is in use Heap def new generation total 18432K, used 1197K [0x6eb40000, 0x6ff40000, 0x6ff40000) eden space 16384K, 0% used [0x6eb40000, 0x6eb40000, 0x6fb40000) from space 2048K, 58% used [0x6fb40000, 0x6fc6b4e8, 0x6fd40000) to space 2048K, 0% used [0x6fd40000, 0x6fd40000, 0x6ff40000) tenured generation Amount of memory allocated total 45056K, used 6416K [0x6ff40000, 0x72b40000, 0x72b40000) the space 45056K, 14% used [0x6ff40000, 0x70584190, 0x70584200, 0x72b40000) compacting perm gen total 8192K, used 1597K [0x72b40000, 0x73340000, 0x76b40000) the space 8192K, 19% used [0x72b40000, 0x72ccf598, 0x72ccf600, 0x73340000) }
  • 26. Isolating the Data. Extract data • Need a very complex regular expression • CSV file, spreadsheet, with many columns Interesting data • Memory in use by each generation - Before and after each collection • Percent in use of “from space” New data - NOTE: “After” data same as next “Before” data worth graphing
  • 27. Graphing and Analyzing the Data. “From Space” usage is between 10% and 60% Adjust from space size using SurvivorRatio option • -XX:SurvivorRatio=ratio • Eden-size = survivor-size * ratio • Eden-size + 2 * survivor-ratio = young-gen- size Example: • -XX:NewSize=200M –XX:SurvivorRatio=8 • Eden: 160MB, each Survivor Space: 20MB Aim for 90-95% usage after collection • Typically, with large young generations, use larger ratio (e.g. 32)
  • 28. Agenda. Java Heap Management Simple Garbage Collection Statistics • Generating the Data • Isolating the Data • Graphing the Data • Interpreting the Data • Improving Performance Advanced Garbage Collection Statistics • Generate, Isolate, Graph, Interpret, Improve Java Command Line Arguments Recap
  • 29. Garbage Collection Info Options. -verbose:gc • Heap usage before and after GC • Time spent during GC -XX:+ PrintGCDetails • Generation and heap size before and after GC • Time spent during GC -XX:+ PrintHeapAtGC • Generation sizes before and after GC • Space sizes and percent in use before and after GC • Memory locations of the heap, its generations, and their spaces
  • 30. Java Tuning Options. -Xmssizem, -Xmxsizem • Minimum and maximum heap size • Set both sizes to the same value -XX:NewSize=sizem, -XX:MaxNewSize=sizem • Minimum and maximum young generation size • Set both sizes to the same value • Set to about 1/3 or 1/4 the size of the heap. -XX:SurvivorRatio=ratio • Number of times the eden space is larger than the “from” space • Try for maximum of 90-95% usage
  • 31. Conclusions. The HotSpot™ JVM provides a variety of options for gathering garbage collection statistics. Those statistics are easily extracted using • A simple Java application using • A regular expression The extracted data is easily graphed using a spreadsheet application. Examining the resulting graph • Tells a lot about what the application is doing • Enables selection of proper heap sizing to improve performance of the application.