SlideShare une entreprise Scribd logo
1  sur  36
Do Your GC Logs
  Speak To You
Using Measurements to Tune Java
      Memory Management




   Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                                  About Me
        •   Independent consultant (www.kodewerk.com)

            •   performance tuning, benchmarking,
                training course

        •   Co-author www.javaperformancetuning.com

        •   Speak frequently about performance

        •   Member of Java Champion program

        •   Other stuff... (google is you care to)

                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                                  About Me
        •   Independent consultant (www.kodewerk.com)

            •   performance tuning, benchmarking,
                training course

        •   Co-author www.javaperformancetuning.com

        •   Speak frequently about performance

        •   Member of Java Champion program

        •   Other stuff... (google is you care to)

                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                               Disclaimer

             The resemblance of any
             opinion, recommendation or
             comment made during this
             presentation to performance
             tuning advice is merely
             coincidental.

                            Copyright 2011 Kodewerk Ltd. All rights reserved
Why should I monitor GC?




   Copyright 2011 Kodewerk Ltd. All rights reserved
hy
                                                                     G
                                                                       C     d




                                                    at
      Kodewerk                                                    be           o
                                                                    fo tha we




                                                  g
          tm




                                               in

                                                is
                                                                       re t
       Java Performance Services


                                                                                oc ha




                                      no nn

                                             g
                                                                          th      cu ve




                                           in
                                                                            e
               tting a heap




                                         ru
      I am ge                                                                  en rs     th




                                        th
                                                                                      ju is




                                 an is
            or no apparent                                                        d
      OOM f                                                                         of st lo



                       ha 0% PU
                                    d




                                                              Hi!
                                                               can
       W hat .
      reasonc                                                                         d
                          zen. C



                                  g




                                                                 the
               o uld                                                                    ay



                                in




                                                                  stra
                            size

                       be t h he




                                                                   why
       GC’s
                              e




                             en
                             w




                                                                    f re
            d u r in           e rea
                         h th


                          feT




                                                                     gc




                                                                     som
                                      son f




                                                                      gc.l
                         it h




                    g s ta
                          pp
                          10




                                                                       nge
                            r tu p            or co




                                                                        que
                                                    ntinu
                    heap




                                                                         CM
                  t f ro




                                                                         exe
                   m w




                                                           ous f
                    r a
                  . Wi t




                                                                          og.
                                                                           eon
                                                                 ull




                                                                            , I
                         Wh



                                                                             ntly
                                                                             S G
                                                                              cut
                            y
               afte
             oble




                      fr       do




                                                                                It s
                                                                                e h
             mca
            t im e
            ance




                                                                                wan
                         ee        es




                                                                                  C e
                                                                                  es?
                     se     ze        ou

                                                                                   and




                                                                                   elp
                        co       up




                                                                                     eem
                                          r a
         and
         a pr




                                                                                      t to
      es to




                           nd


                                                                                       xec
                                     fo
      or m




                                              pp
     e of




                               s?       r 1     lic




                                                                                         to
                                                                                         why
                                            0s     at




                                                                                          s v
   Hello




                                                                                           ute
                                                      io
 rows




                                                                                           kno
                                               of
  I’ve
 perf



 inut




                                                         n




                                                                                             see
laps




                                                                                              er y
                                                                                               s so
                                   Copyright 2011 Kodewerk Ltd. All rights reserved            fu l


                                                                                                 w
Kodewerk
   tm
Java Performance Services




             ? ?          ?
         ??        ??
             ?          ?
                      ? ?
         ?? ? ?           ?
               ? ??
          ?  ?        ?
                 ? ?    ?
         ? ? ?
                 ?   ? ??
             ?              Copyright 2011 Kodewerk Ltd. All rights reserved
GC logs contain key
performance indicators




Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm


                        Java Memory Pools
Java Performance Services




        Eden       S0       S1                         Tenured                      Perm

        Young                                   Old Gen
         Gen
 Normal Flow
 - objects created in Eden
 - copied into the active survivor space
 - copied between survivor spaces
 - copied to Old Gen when ages reaches
        tenuring threshold

                                 Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
     tm
  Java Performance Services
                              Collector Choices

uint i = 0;
if (UseSerialGC)                       i++;
if (UseConcMarkSweepGC || UseParNewGC) i++;
if (UseParallelGC || UseParallelOldGC) i++;
if (UseG1GC)                           i++;
if (i > 1) {
  jio_fprintf(defaultStream::error_stream(),
              "Conflicting collector combinations in option list; "
              "please refer to the release notes for the combinations "
              "allowedn");
  status = false;
}




                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm


                        Java Memory Pools
Java Performance Services




        Eden       S0       S1                         Tenured                      Perm

        Young                                   Old Gen
         Gen
 Abnormal Situations
 - memory leaks (loitering objects)
 - long pause times (heap too big, poor
 parallelization)
 - too frequent full GC (zombies, poor throughput)
 - survivor space flooding (premature promotion)
 - fragmented tenured space (compaction)
 - high rates of object creation
 - etc.....
                                 Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm


          Garbage Collection Logs
Java Performance Services




                   -verbose:gc

                   -Xloggc:gc.log

                            7.0 has new flags for rollover

                   Some many useful flags for monitoring GC

                            -XX:+PrintGCDetails

                            -XX:+PrintTenuringDistribution

                            -XX:+PrintHeapAtGC

                            -XX:+PrintApplicationStoppedTime

                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
      tm
                          GC Log Fragment
   Java Performance Services

21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K-
>89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02,
real=0.32 secs]
163.028: [GC 163.028: [DefNew
Desired survivor size 115671040 bytes, new threshold 15 (max 15)
- age 1:        736 bytes,        736 total
- age 2:         112 bytes,      848 total
- age 4:          40 bytes,       888 total
- age 6:         232 bytes,      1120 total
- age 7:          32 bytes,     1152 total
- age 11:        96 bytes,      1248 total
: 226048K->1K(451968K), 0.0018054 secs] 669064K->443016K(1129856K), 0.0018580 secs] [Times:
user=0.00 sys=0.00, real=0.00 secs]
Heap
 def new generation total 451968K, used 193472K [0x10020000, 0x39620000, 0x39620000)
  eden space 226048K, 85% used [0x10020000, 0x1bd0fe48, 0x1dce0000)
  from space 225920K, 0% used [0x1dce0000, 0x1dce0560, 0x2b980000)
  to space 225920K, 0% used [0x2b980000, 0x2b980000, 0x39620000)
 tenured generation total 677888K, used 443015K [0x39620000, 0x62c20000, 0x62c20000)
   the space 677888K, 65% used [0x39620000, 0x546c1d78, 0x546c1e00, 0x62c20000)
 compacting perm gen total 36608K, used 36480K [0x62c20000, 0x64fe0000, 0x66c20000)
   the space 36608K, 99% used [0x62c20000, 0x64fc0290, 0x64fc0400, 0x64fe0000)
No shared spaces configured.
                               Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
      tm
   Java Performance Services               Full GC
21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K-
>89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02,
real=0.32 secs]



   tenured space statistics
   perm space statistics
- other stats are for the entire heap




                               Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
      tm
   Java Performance Services               Full GC
21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K-
>89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02,
real=0.32 secs]



- occupancy before->after collection (memory pool configured size)
- reporting on tenured, perm memory pools plus total for all Java
  heap spaces




                               Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
      tm
   Java Performance Services               Full GC
21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K-
>89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02,
real=0.32 secs]



- pause time statistics for tenured and all Java heap




                               Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
      tm
                          GC Log Fragment
   Java Performance Services



163.028: [GC 163.028: [DefNew
Desired survivor size 115671040 bytes, new threshold 15 (max 15)
- age 1:        736 bytes,        736 total
- age 2:        112 bytes,       848 total
- age 4:         40 bytes,        888 total
- age 6:        232 bytes,       1120 total
- age 7:         32 bytes,      1152 total
- age 11:        96 bytes,      1248 total
: 226048K->1K(451968K), 0.0018054 secs] 669064K->443016K(1129856K), 0.0018580 secs] [Times:
user=0.00 sys=0.00, real=0.00 secs]




    young gen statistics
    statistics for all Java heap




                               Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
      tm
                          GC Log Fragment
   Java Performance Services



163.028: [GC 163.028: [DefNew
Desired survivor size 115671040 bytes, new threshold 15 (max 15)
- age 1:        736 bytes,        736 total
- age 2:        112 bytes,       848 total
- age 4:         40 bytes,        888 total
- age 6:        232 bytes,       1120 total
- age 7:         32 bytes,      1152 total
- age 11:        96 bytes,      1248 total
: 226048K->1K(451968K), 0.0018054 secs] 669064K->443016K(1129856K), 0.0018580 secs] [Times:
user=0.00 sys=0.00, real=0.00 secs]




    surivor space sizing and tenuring thresholds
    breakdown of bytes @ age




                               Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
      tm
                          GC Log Fragment
   Java Performance Services




Heap
 def new generation total 451968K, used 193472K [0x10020000, 0x39620000, 0x39620000)
  eden space 226048K, 85% used [0x10020000, 0x1bd0fe48, 0x1dce0000)
  from space 225920K, 0% used [0x1dce0000, 0x1dce0560, 0x2b980000)
  to space 225920K, 0% used [0x2b980000, 0x2b980000, 0x39620000)
 tenured generation total 677888K, used 443015K [0x39620000, 0x62c20000, 0x62c20000)
   the space 677888K, 65% used [0x39620000, 0x546c1d78, 0x546c1e00, 0x62c20000)
 compacting perm gen total 36608K, used 36480K [0x62c20000, 0x64fe0000, 0x66c20000)
   the space 36608K, 99% used [0x62c20000, 0x64fc0290, 0x64fc0400, 0x64fe0000)
No shared spaces configured.



- breakdown of occupancy and configured size of each memory pool
- pointer values describing each space (for debugging)




                               Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk            tm
          Java Performance Services
                                             Puzzler #1
                                600
Heap Usage after GC (MB)




                                500

                                400

                                300

                                200

                                100



                                          1000          2000      3000               4000
                                                        Time (seconds)
                                      Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk            tm
          Java Performance Services
                                             Puzzler #1
                                600
Heap Usage after GC (MB)




                                500

                                400

                                300
                                                                       what happened here?

                                200

                                100



                                          1000          2000      3000               4000
                                                        Time (seconds)
                                      Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
     tm
  Java Performance Services
                                    Puzzler #2
147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K-
>62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs]

148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K-
>52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs]

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid18706.hprof ...                        ????
Heap dump file created [83874513 bytes in 3.330 secs]

160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K-
>76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00,
real=0.28 secs]




                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
     tm
  Java Performance Services
                                    Puzzler #2
147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K-
>62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs]

148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K-
>52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs]

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid18706.hprof ...
Heap dump file created [83874513 bytes in 3.330 secs]

160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K-
>76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00,
real=0.28 secs]




                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
     tm
  Java Performance Services
                                    Puzzler #2
147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K-
>62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs]

148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K-
>52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs]

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid18706.hprof ...
Heap dump file created [83874513 bytes in 3.330 secs]

160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K-
>76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00,
real=0.28 secs]




                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
     tm
  Java Performance Services
                                    Puzzler #2
147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K-
>62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs]

148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K-
>52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs]

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid18706.hprof ...
Heap dump file created [83874513 bytes in 3.330 secs]

160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K-
>76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00,
real=0.28 secs]



147.823 + 0.8074580 = 148.630 ~= 148.632


                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
     tm
  Java Performance Services
                                    Puzzler #2
147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K-
>62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs]

148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K-
>52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs]

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid18706.hprof ...
Heap dump file created [83874513 bytes in 3.330 secs]

160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K-
>76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00,
real=0.28 secs]




                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
     tm
  Java Performance Services
                                    Puzzler #2
147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K-
>62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs]

148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K-
>52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs]

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid18706.hprof ...                        ????
Heap dump file created [83874513 bytes in 3.330 secs]

160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K-
>76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00,
real=0.28 secs]




                              Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services




              Case Study
             one web app
        four different memory
            configurations


                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                               Case Study
                   One Web app

                   Four different memory
                   configurations

                            heap size

                            new ratio

                            survivor ratio

                             Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                     1G, NR=8, SR=8

                   Ave: 149

                   Medien: 84

                   90%: 345

                   Max: 1728

                   Error: 0%


                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                     2G, NR=8, SR=8

                   Ave: 129

                   Medien: 80

                   90%: 287

                   Max: 4920

                   Error: 0%


                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                        1G, NR=1, SR=1

                   Ave: 82

                   Medien: 60

                   90%: 171

                   Max: 650

                   Error: 0%


                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                     1G, NR=8, SR=8




                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                        1G, NR=1, SR=1




                            Copyright 2011 Kodewerk Ltd. All rights reserved
Kodewerk
   tm
Java Performance Services


                        2G, NR=1, SR=1

                   Ave: 326

                   Medien: 156

                   90%: 831

                   Max: 4976

                   Error: 0%


                            Copyright 2011 Kodewerk Ltd. All rights reserved
Questions



Copyright 2011 Kodewerk Ltd. All rights reserved

Contenu connexe

Tendances (17)

New ppt Solution Unlimited
New ppt Solution UnlimitedNew ppt Solution Unlimited
New ppt Solution Unlimited
 
Revised Boise Ppt
Revised Boise PptRevised Boise Ppt
Revised Boise Ppt
 
The Hairball of Content
The Hairball of ContentThe Hairball of Content
The Hairball of Content
 
Boise charrette PDF
Boise charrette PDFBoise charrette PDF
Boise charrette PDF
 
Tpn guideline
Tpn guidelineTpn guideline
Tpn guideline
 
Flat plan template 2
Flat plan template 2Flat plan template 2
Flat plan template 2
 
20110413 founder institute
20110413 founder institute20110413 founder institute
20110413 founder institute
 
1
11
1
 
Resume
ResumeResume
Resume
 
uni business plan
uni business planuni business plan
uni business plan
 
Ws5.1.3 finished
Ws5.1.3 finishedWs5.1.3 finished
Ws5.1.3 finished
 
Ws5 1-3
Ws5 1-3Ws5 1-3
Ws5 1-3
 
Self Portrait
Self PortraitSelf Portrait
Self Portrait
 
Novell Data Synchronizer: Overview, Installation and Configuration
Novell Data Synchronizer: Overview, Installation and ConfigurationNovell Data Synchronizer: Overview, Installation and Configuration
Novell Data Synchronizer: Overview, Installation and Configuration
 
2011 Maryland General Assembly Report Card
2011 Maryland General Assembly Report Card2011 Maryland General Assembly Report Card
2011 Maryland General Assembly Report Card
 
12554 uk module 1 presentation1(ha-revised)
12554 uk module 1   presentation1(ha-revised)12554 uk module 1   presentation1(ha-revised)
12554 uk module 1 presentation1(ha-revised)
 
Roleplaying in virtual worlds
Roleplaying in virtual worldsRoleplaying in virtual worlds
Roleplaying in virtual worlds
 

Similaire à How to tune Java memory using GC logs

Learn Tech Services Quick View
Learn Tech Services Quick ViewLearn Tech Services Quick View
Learn Tech Services Quick ViewAman Deep Dubey
 
Ormita recovering-lost-value
Ormita recovering-lost-valueOrmita recovering-lost-value
Ormita recovering-lost-valueOrmita Hong Kong
 
BioWare Social- Sacramento
BioWare Social- SacramentoBioWare Social- Sacramento
BioWare Social- Sacramentojovanam5
 
Business Model Workshop: the Kickoff
Business Model Workshop: the KickoffBusiness Model Workshop: the Kickoff
Business Model Workshop: the KickoffKeith McGreggor
 
A Curious Course on Coroutines and Concurrency
A Curious Course on Coroutines and ConcurrencyA Curious Course on Coroutines and Concurrency
A Curious Course on Coroutines and ConcurrencyHiroshi Ono
 
KEC Green Games Catalog 3
KEC Green Games Catalog 3KEC Green Games Catalog 3
KEC Green Games Catalog 3KEC
 
90 day example
90 day example90 day example
90 day examplehms022001
 
Being a business assistant with element14 in krakow
Being a business assistant with element14 in krakowBeing a business assistant with element14 in krakow
Being a business assistant with element14 in krakowPremier Farnell
 
Privacy Value Networks
Privacy Value NetworksPrivacy Value Networks
Privacy Value Networksblogzilla
 
Presentation Master Brands
Presentation Master BrandsPresentation Master Brands
Presentation Master BrandsChris1Hall1
 
Keeping the Process Alive: Data Analysis and Reinforcement for BBS
Keeping the Process Alive: Data Analysis and Reinforcement for BBSKeeping the Process Alive: Data Analysis and Reinforcement for BBS
Keeping the Process Alive: Data Analysis and Reinforcement for BBSQuality Safety Edge
 
Worth Article by Richard Black
Worth Article by Richard BlackWorth Article by Richard Black
Worth Article by Richard Blackcourtkiel429
 

Similaire à How to tune Java memory using GC logs (20)

Gclogs
GclogsGclogs
Gclogs
 
Data Driven Personas
Data Driven PersonasData Driven Personas
Data Driven Personas
 
Soffer CollectIve Master
Soffer CollectIve MasterSoffer CollectIve Master
Soffer CollectIve Master
 
Learn Tech Services Quick View
Learn Tech Services Quick ViewLearn Tech Services Quick View
Learn Tech Services Quick View
 
Ormita recovering-lost-value
Ormita recovering-lost-valueOrmita recovering-lost-value
Ormita recovering-lost-value
 
Google
GoogleGoogle
Google
 
BioWare Social- Sacramento
BioWare Social- SacramentoBioWare Social- Sacramento
BioWare Social- Sacramento
 
BioWare Social
BioWare SocialBioWare Social
BioWare Social
 
Business Model Workshop: the Kickoff
Business Model Workshop: the KickoffBusiness Model Workshop: the Kickoff
Business Model Workshop: the Kickoff
 
A Curious Course on Coroutines and Concurrency
A Curious Course on Coroutines and ConcurrencyA Curious Course on Coroutines and Concurrency
A Curious Course on Coroutines and Concurrency
 
KEC Green Games Catalog 3
KEC Green Games Catalog 3KEC Green Games Catalog 3
KEC Green Games Catalog 3
 
90 day example
90 day example90 day example
90 day example
 
Back To School
Back To SchoolBack To School
Back To School
 
Being a business assistant with element14 in krakow
Being a business assistant with element14 in krakowBeing a business assistant with element14 in krakow
Being a business assistant with element14 in krakow
 
URBAN: Orientation
URBAN: OrientationURBAN: Orientation
URBAN: Orientation
 
Privacy Value Networks
Privacy Value NetworksPrivacy Value Networks
Privacy Value Networks
 
Presentation Master Brands
Presentation Master BrandsPresentation Master Brands
Presentation Master Brands
 
MyPortfolio: New features
MyPortfolio: New featuresMyPortfolio: New features
MyPortfolio: New features
 
Keeping the Process Alive: Data Analysis and Reinforcement for BBS
Keeping the Process Alive: Data Analysis and Reinforcement for BBSKeeping the Process Alive: Data Analysis and Reinforcement for BBS
Keeping the Process Alive: Data Analysis and Reinforcement for BBS
 
Worth Article by Richard Black
Worth Article by Richard BlackWorth Article by Richard Black
Worth Article by Richard Black
 

Plus de Kirk Pepperdine

Plus de Kirk Pepperdine (6)

Tuning the g1gc
Tuning the g1gcTuning the g1gc
Tuning the g1gc
 
Integrating Vert.x
Integrating Vert.xIntegrating Vert.x
Integrating Vert.x
 
Trouble with memory
Trouble with memoryTrouble with memory
Trouble with memory
 
Introducing illuminate
Introducing illuminateIntroducing illuminate
Introducing illuminate
 
Moving to G1GC
Moving to G1GCMoving to G1GC
Moving to G1GC
 
Gclogs j1
Gclogs j1Gclogs j1
Gclogs j1
 

Dernier

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Dernier (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

How to tune Java memory using GC logs

  • 1. Do Your GC Logs Speak To You Using Measurements to Tune Java Memory Management Copyright 2011 Kodewerk Ltd. All rights reserved
  • 2. Kodewerk tm Java Performance Services About Me • Independent consultant (www.kodewerk.com) • performance tuning, benchmarking, training course • Co-author www.javaperformancetuning.com • Speak frequently about performance • Member of Java Champion program • Other stuff... (google is you care to) Copyright 2011 Kodewerk Ltd. All rights reserved
  • 3. Kodewerk tm Java Performance Services About Me • Independent consultant (www.kodewerk.com) • performance tuning, benchmarking, training course • Co-author www.javaperformancetuning.com • Speak frequently about performance • Member of Java Champion program • Other stuff... (google is you care to) Copyright 2011 Kodewerk Ltd. All rights reserved
  • 4. Kodewerk tm Java Performance Services Disclaimer The resemblance of any opinion, recommendation or comment made during this presentation to performance tuning advice is merely coincidental. Copyright 2011 Kodewerk Ltd. All rights reserved
  • 5. Why should I monitor GC? Copyright 2011 Kodewerk Ltd. All rights reserved
  • 6. hy G C d at Kodewerk be o fo tha we g tm in is re t Java Performance Services oc ha no nn g th cu ve in e tting a heap ru I am ge en rs th th ju is an is or no apparent d OOM f of st lo ha 0% PU d Hi! can W hat . reasonc d zen. C g the o uld ay in stra size be t h he why GC’s e en w f re d u r in e rea h th feT gc som son f gc.l it h g s ta pp 10 nge r tu p or co que ntinu heap CM t f ro exe m w ous f r a . Wi t og. eon ull , I Wh ntly S G cut y afte oble fr do It s e h mca t im e ance wan ee es C e es? se ze ou and elp co up eem r a and a pr t to es to nd xec fo or m pp e of s? r 1 lic to why 0s at s v Hello ute io rows kno of I’ve perf inut n see laps er y s so Copyright 2011 Kodewerk Ltd. All rights reserved fu l w
  • 7. Kodewerk tm Java Performance Services ? ? ? ?? ?? ? ? ? ? ?? ? ? ? ? ?? ? ? ? ? ? ? ? ? ? ? ? ?? ? Copyright 2011 Kodewerk Ltd. All rights reserved
  • 8. GC logs contain key performance indicators Copyright 2011 Kodewerk Ltd. All rights reserved
  • 9. Kodewerk tm Java Memory Pools Java Performance Services Eden S0 S1 Tenured Perm Young Old Gen Gen Normal Flow - objects created in Eden - copied into the active survivor space - copied between survivor spaces - copied to Old Gen when ages reaches tenuring threshold Copyright 2011 Kodewerk Ltd. All rights reserved
  • 10. Kodewerk tm Java Performance Services Collector Choices uint i = 0; if (UseSerialGC) i++; if (UseConcMarkSweepGC || UseParNewGC) i++; if (UseParallelGC || UseParallelOldGC) i++; if (UseG1GC) i++; if (i > 1) { jio_fprintf(defaultStream::error_stream(), "Conflicting collector combinations in option list; " "please refer to the release notes for the combinations " "allowedn"); status = false; } Copyright 2011 Kodewerk Ltd. All rights reserved
  • 11. Kodewerk tm Java Memory Pools Java Performance Services Eden S0 S1 Tenured Perm Young Old Gen Gen Abnormal Situations - memory leaks (loitering objects) - long pause times (heap too big, poor parallelization) - too frequent full GC (zombies, poor throughput) - survivor space flooding (premature promotion) - fragmented tenured space (compaction) - high rates of object creation - etc..... Copyright 2011 Kodewerk Ltd. All rights reserved
  • 12. Kodewerk tm Garbage Collection Logs Java Performance Services -verbose:gc -Xloggc:gc.log 7.0 has new flags for rollover Some many useful flags for monitoring GC -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+PrintApplicationStoppedTime Copyright 2011 Kodewerk Ltd. All rights reserved
  • 13. Kodewerk tm GC Log Fragment Java Performance Services 21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K- >89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02, real=0.32 secs] 163.028: [GC 163.028: [DefNew Desired survivor size 115671040 bytes, new threshold 15 (max 15) - age 1: 736 bytes, 736 total - age 2: 112 bytes, 848 total - age 4: 40 bytes, 888 total - age 6: 232 bytes, 1120 total - age 7: 32 bytes, 1152 total - age 11: 96 bytes, 1248 total : 226048K->1K(451968K), 0.0018054 secs] 669064K->443016K(1129856K), 0.0018580 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] Heap def new generation total 451968K, used 193472K [0x10020000, 0x39620000, 0x39620000) eden space 226048K, 85% used [0x10020000, 0x1bd0fe48, 0x1dce0000) from space 225920K, 0% used [0x1dce0000, 0x1dce0560, 0x2b980000) to space 225920K, 0% used [0x2b980000, 0x2b980000, 0x39620000) tenured generation total 677888K, used 443015K [0x39620000, 0x62c20000, 0x62c20000) the space 677888K, 65% used [0x39620000, 0x546c1d78, 0x546c1e00, 0x62c20000) compacting perm gen total 36608K, used 36480K [0x62c20000, 0x64fe0000, 0x66c20000) the space 36608K, 99% used [0x62c20000, 0x64fc0290, 0x64fc0400, 0x64fe0000) No shared spaces configured. Copyright 2011 Kodewerk Ltd. All rights reserved
  • 14. Kodewerk tm Java Performance Services Full GC 21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K- >89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02, real=0.32 secs] tenured space statistics perm space statistics - other stats are for the entire heap Copyright 2011 Kodewerk Ltd. All rights reserved
  • 15. Kodewerk tm Java Performance Services Full GC 21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K- >89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02, real=0.32 secs] - occupancy before->after collection (memory pool configured size) - reporting on tenured, perm memory pools plus total for all Java heap spaces Copyright 2011 Kodewerk Ltd. All rights reserved
  • 16. Kodewerk tm Java Performance Services Full GC 21.026: [Full GC 21.026: [Tenured: 87725K->89582K(146212K), 0.3151328 secs] 117886K- >89582K(243748K), [Perm : 30974K->30958K(30976K)], 0.3152271 secs] [Times: user=0.31 sys=0.02, real=0.32 secs] - pause time statistics for tenured and all Java heap Copyright 2011 Kodewerk Ltd. All rights reserved
  • 17. Kodewerk tm GC Log Fragment Java Performance Services 163.028: [GC 163.028: [DefNew Desired survivor size 115671040 bytes, new threshold 15 (max 15) - age 1: 736 bytes, 736 total - age 2: 112 bytes, 848 total - age 4: 40 bytes, 888 total - age 6: 232 bytes, 1120 total - age 7: 32 bytes, 1152 total - age 11: 96 bytes, 1248 total : 226048K->1K(451968K), 0.0018054 secs] 669064K->443016K(1129856K), 0.0018580 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] young gen statistics statistics for all Java heap Copyright 2011 Kodewerk Ltd. All rights reserved
  • 18. Kodewerk tm GC Log Fragment Java Performance Services 163.028: [GC 163.028: [DefNew Desired survivor size 115671040 bytes, new threshold 15 (max 15) - age 1: 736 bytes, 736 total - age 2: 112 bytes, 848 total - age 4: 40 bytes, 888 total - age 6: 232 bytes, 1120 total - age 7: 32 bytes, 1152 total - age 11: 96 bytes, 1248 total : 226048K->1K(451968K), 0.0018054 secs] 669064K->443016K(1129856K), 0.0018580 secs] [Times: user=0.00 sys=0.00, real=0.00 secs] surivor space sizing and tenuring thresholds breakdown of bytes @ age Copyright 2011 Kodewerk Ltd. All rights reserved
  • 19. Kodewerk tm GC Log Fragment Java Performance Services Heap def new generation total 451968K, used 193472K [0x10020000, 0x39620000, 0x39620000) eden space 226048K, 85% used [0x10020000, 0x1bd0fe48, 0x1dce0000) from space 225920K, 0% used [0x1dce0000, 0x1dce0560, 0x2b980000) to space 225920K, 0% used [0x2b980000, 0x2b980000, 0x39620000) tenured generation total 677888K, used 443015K [0x39620000, 0x62c20000, 0x62c20000) the space 677888K, 65% used [0x39620000, 0x546c1d78, 0x546c1e00, 0x62c20000) compacting perm gen total 36608K, used 36480K [0x62c20000, 0x64fe0000, 0x66c20000) the space 36608K, 99% used [0x62c20000, 0x64fc0290, 0x64fc0400, 0x64fe0000) No shared spaces configured. - breakdown of occupancy and configured size of each memory pool - pointer values describing each space (for debugging) Copyright 2011 Kodewerk Ltd. All rights reserved
  • 20. Kodewerk tm Java Performance Services Puzzler #1 600 Heap Usage after GC (MB) 500 400 300 200 100 1000 2000 3000 4000 Time (seconds) Copyright 2011 Kodewerk Ltd. All rights reserved
  • 21. Kodewerk tm Java Performance Services Puzzler #1 600 Heap Usage after GC (MB) 500 400 300 what happened here? 200 100 1000 2000 3000 4000 Time (seconds) Copyright 2011 Kodewerk Ltd. All rights reserved
  • 22. Kodewerk tm Java Performance Services Puzzler #2 147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K- >62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs] 148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K- >52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs] java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid18706.hprof ... ???? Heap dump file created [83874513 bytes in 3.330 secs] 160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K- >76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00, real=0.28 secs] Copyright 2011 Kodewerk Ltd. All rights reserved
  • 23. Kodewerk tm Java Performance Services Puzzler #2 147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K- >62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs] 148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K- >52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs] java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid18706.hprof ... Heap dump file created [83874513 bytes in 3.330 secs] 160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K- >76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00, real=0.28 secs] Copyright 2011 Kodewerk Ltd. All rights reserved
  • 24. Kodewerk tm Java Performance Services Puzzler #2 147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K- >62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs] 148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K- >52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs] java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid18706.hprof ... Heap dump file created [83874513 bytes in 3.330 secs] 160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K- >76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00, real=0.28 secs] Copyright 2011 Kodewerk Ltd. All rights reserved
  • 25. Kodewerk tm Java Performance Services Puzzler #2 147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K- >62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs] 148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K- >52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs] java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid18706.hprof ... Heap dump file created [83874513 bytes in 3.330 secs] 160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K- >76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00, real=0.28 secs] 147.823 + 0.8074580 = 148.630 ~= 148.632 Copyright 2011 Kodewerk Ltd. All rights reserved
  • 26. Kodewerk tm Java Performance Services Puzzler #2 147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K- >62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs] 148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K- >52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs] java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid18706.hprof ... Heap dump file created [83874513 bytes in 3.330 secs] 160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K- >76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00, real=0.28 secs] Copyright 2011 Kodewerk Ltd. All rights reserved
  • 27. Kodewerk tm Java Performance Services Puzzler #2 147.823: [Full GC [PSYoungGen: 7662K->0K(72896K)] [PSOldGen: 169093K->62518K(174784K)] 176755K- >62518K(247680K) [PSPermGen: 27342K->27342K(55232K)], 0.8074580 secs] 148.632: [Full GC [PSYoungGen: 0K->0K(57856K)] [PSOldGen: 62518K->52158K(174784K)] 62518K- >52158K(232640K) [PSPermGen: 27342K->26866K(61056K)], 0.3614330 secs] java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid18706.hprof ... ???? Heap dump file created [83874513 bytes in 3.330 secs] 160.552: [Full GC [PSYoungGen: 2624K->0K(44800K)] [PSOldGen: 86916K->76124K(174784K)] 89540K- >76124K(219584K) [PSPermGen: 26902K->26902K(58880K)], 0.2801510 secs] [Times: user=0.28 sys=0.00, real=0.28 secs] Copyright 2011 Kodewerk Ltd. All rights reserved
  • 28. Kodewerk tm Java Performance Services Case Study one web app four different memory configurations Copyright 2011 Kodewerk Ltd. All rights reserved
  • 29. Kodewerk tm Java Performance Services Case Study One Web app Four different memory configurations heap size new ratio survivor ratio Copyright 2011 Kodewerk Ltd. All rights reserved
  • 30. Kodewerk tm Java Performance Services 1G, NR=8, SR=8 Ave: 149 Medien: 84 90%: 345 Max: 1728 Error: 0% Copyright 2011 Kodewerk Ltd. All rights reserved
  • 31. Kodewerk tm Java Performance Services 2G, NR=8, SR=8 Ave: 129 Medien: 80 90%: 287 Max: 4920 Error: 0% Copyright 2011 Kodewerk Ltd. All rights reserved
  • 32. Kodewerk tm Java Performance Services 1G, NR=1, SR=1 Ave: 82 Medien: 60 90%: 171 Max: 650 Error: 0% Copyright 2011 Kodewerk Ltd. All rights reserved
  • 33. Kodewerk tm Java Performance Services 1G, NR=8, SR=8 Copyright 2011 Kodewerk Ltd. All rights reserved
  • 34. Kodewerk tm Java Performance Services 1G, NR=1, SR=1 Copyright 2011 Kodewerk Ltd. All rights reserved
  • 35. Kodewerk tm Java Performance Services 2G, NR=1, SR=1 Ave: 326 Medien: 156 90%: 831 Max: 4976 Error: 0% Copyright 2011 Kodewerk Ltd. All rights reserved
  • 36. Questions Copyright 2011 Kodewerk Ltd. All rights reserved

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. turn them on in production\n
  8. \n
  9. \n
  10. \n
  11. + many others\n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n