SlideShare ist ein Scribd-Unternehmen logo
1 von 155
Downloaden Sie, um offline zu lesen
Death by pauses    Everything you ever wanted to know about GC pauses*
                                           *but were afraid to ask




                                                                             1
Tuesday, July 10, 12
Agenda



                  1. Introduction

                  2. Crime Scene Investigation

                  3. JVM Memory management systems and tools

                  4. Putting it together




                                                               2
Tuesday, July 10, 12
The Crime Scene
                                                                             PG 13*




                       * Parents strongly cautioned: typed language, dead objects and verbose logs may not be suitable to scripting language fans




                                                                                                                                                    3
Tuesday, July 10, 12
B2C
                       e-commerce platform
              Apache
              Tomcat
              Oracle




                                             4
Tuesday, July 10, 12
B2C
                       e-commerce platform
              Apache




                               •12+ Servers
              Tomcat




                               •10 different Webapps
                               •50+ JVMs (Oracle JDK6)
              Oracle




                                                         4
Tuesday, July 10, 12
B2C
                       e-commerce platform
              Apache




                               •12+ Servers
              Tomcat




                               •10 different Webapps
                               •50+ JVMs (Oracle JDK6)


                                                   •> 30000 sessions
                                                   •250-400 Req/s
              Oracle




                                                   •Variance is high


                                                                       4
Tuesday, July 10, 12
... an unusual victim...

                                    Product catalog modeled as a Graph
                                       100% custom implementation
                               100% on-heap (no SQL except for initial load)
                                 in-place update by AtomicReference.set()




                                                                               5
Tuesday, July 10, 12
... an unusual victim...

                                    Product catalog modeled as a Graph
                                       100% custom implementation
                               100% on-heap (no SQL except for initial load)
                                 in-place update by AtomicReference.set()




                                                      Caching aggressively is not possible
                                                    Large number of request-scoped objects
                                                   Many WS into backoffice systems = latency




                                                                                              5
Tuesday, July 10, 12
vs.




                       Throughput         Latency




                                                    6
Tuesday, July 10, 12
7
Tuesday, July 10, 12
Interactive e-commerce app:
                          Low latency is the top
                                  priority!




                                                     7
Tuesday, July 10, 12
The Crime Scene
                       JDBC Connections




                            Time




                                                            8
Tuesday, July 10, 12
The Crime Scene
                       JDBC Connections                     Requests/s




                            Time                             Time




                                                                         8
Tuesday, July 10, 12
The Crime Scene
                       JDBC Connections                     Requests/s




                            Time                             Time

                        Active threads




                            Time



                                                                         8
Tuesday, July 10, 12
The Crime Scene
                       JDBC Connections                        Requests/s




                            Time                                Time

                        Active threads                  HTTP Executor Queue Size




                            Time                                Time



                                                                                   8
Tuesday, July 10, 12
The evidence
                                   Heap
Size in MB




                          1 hour




                                                         9
   Tuesday, July 10, 12
The evidence
                                   Heap




                             Can’t see anything: let’s zoom out!
Size in MB




                          1 hour




                                                                   9
   Tuesday, July 10, 12
The evidence
                                     Heap
Size in MB




                          24 hours




                                                           10
   Tuesday, July 10, 12
The evidence
                                     Heap
Size in MB




                          24 hours




                                                           10
   Tuesday, July 10, 12
The evidence
                                     Heap
Size in MB




                          24 hours




                                                           10
   Tuesday, July 10, 12
The evidence
                                   Heap                  Time spent in GC (%)

                                               100



                                                75
Size in MB




                                                50



                                                25



                                                 0
                          1 hour                                     1 hour




                                                                                11
   Tuesday, July 10, 12
The usual suspects...




                                               12
Tuesday, July 10, 12
The usual suspects...



                  •    OutOfMemory Heap




                                                              12
Tuesday, July 10, 12
The usual suspects...



                  •    OutOfMemory Heap

                  •    OutOfMemory PermGen




                                                              12
Tuesday, July 10, 12
The usual suspects...



                  •    OutOfMemory Heap

                  •    OutOfMemory PermGen

                  •    Long GC pauses




                                                                12
Tuesday, July 10, 12
The usual suspects...



                  •     OutOfMemory Heap

                  •     OutOfMemory PermGen

                  •     Long GC pauses

                       ➡ under high load = immediate death

                                                                  12
Tuesday, July 10, 12
The usual suspects...



                  •     OutOfMemory Heap

                  •     OutOfMemory PermGen

                  •     Long GC pauses

                       ➡ under high load = immediate death

                                                                  12
Tuesday, July 10, 12
The usual suspects...



                  •     OutOfMemory Heap

                  •     OutOfMemory PermGen

                  •     Long GC pauses

                       ➡ under high load = immediate death

                                                                  12
Tuesday, July 10, 12
a
                                e st h b yThe usual suspects...



                  •
                  •            D e
                        OutOfMemory Heap




                                     s
                        OutOfMemory PermGen

                  •

                                p au
                        Long GC pauses

                       ➡ under high load = immediate death

                                                                  12
Tuesday, July 10, 12
Why do we need this GC thing again ?


              “Many concurrent algorithms are very easy to
              write with a GC and totally hard (to down right
              impossible) using explicit free.”
                        Cliff Click




                                                                  13
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...




                                                                       14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...




                                                                       14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?




               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags




               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags
                                                               100 <= X< 200




               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags
                                                               100 <= X< 200
                                                               200 <= X< 300




               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags
                                                               100 <= X< 200
                                                               200 <= X< 300
                                                               300 <= X< 400




               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags
                                                               100 <= X< 200
                                                               200 <= X< 300
                                                               300 <= X< 400
                                                               400 <= X< 500




               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags
                                                               100 <= X< 200
                                                               200 <= X< 300
                                                               300 <= X< 400
                                                               400 <= X< 500
                                                               500 <= X< 600


               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags
                                                               100 <= X< 200
                                                               200 <= X< 300
                                                               300 <= X< 400
                                                               400 <= X< 500
                                                               500 <= X< 600
                                                               600 <= X< 700

               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                              14
Tuesday, July 10, 12
Fine, we just need to tune the JVM, right?...
                                                                     POP QUIZZ!
                                                              Number of command-line flags*?

                                                               less than 100 flags
                                                               100 <= X< 200
                                                               200 <= X< 300
                                                               300 <= X< 400
                                                               400 <= X< 500
                                                               500 <= X< 600
                                                               600 <= X< 700        664 Flags!

               * Oracle JVM 1.6.0_31 x86_64 server
                                                                                                 14
Tuesday, July 10, 12
15
Tuesday, July 10, 12
15
Tuesday, July 10, 12
Memory in the JVM


                              JVM




                                           16
Tuesday, July 10, 12
Class metadata
                       Permanent (PermGen)   interned Strings, etc.




                              JVM




                                                                      17
Tuesday, July 10, 12
Class metadata
                       Permanent (PermGen)    interned Strings, etc.




                              Heap           Application Objects




                                                                       18
Tuesday, July 10, 12
Permanent (PermGen)


                          Old / Tenured



                           Young / New


                                             19
Tuesday, July 10, 12
Permanent (PermGen)


                          Old / Tenured



                           Eden      S0 S1


                                             20
Tuesday, July 10, 12
The Garbage Collector is generational

                                                              r0               r1
                                                         v ivo            v ivo
                                     en             ur               ur
                                   Ed             S                S




                                          Old


                                                                                    21
Tuesday, July 10, 12
r0               r1
                                                        v ivo            v ivo
                                      en           ur               ur
                                    Ed           S                S


                       Allocation




                                           Old


                                                                                   22
Tuesday, July 10, 12
r0               r1
                                           v ivo            v ivo
                         en           ur               ur
                       Ed           S                S




                              Old


                                                                      23
Tuesday, July 10, 12
r0               r1
                                                 v ivo            v ivo
                              en            ur               ur
                            Ed            S                S


                       100% = GC!




                                    Old


                                                                            24
Tuesday, July 10, 12
r0               r1
                                                            v ivo            v ivo
                                        en             ur               ur
                                      Ed             S                S




                       Unreferenced          Live



                                               Old


                                                                                       25
Tuesday, July 10, 12
r0               r1
                                             v ivo            v ivo
                         en             ur               ur
                       Ed             S                S




                         Copy



                                Old


                                                                        26
Tuesday, July 10, 12
r0               r1
                                               v ivo            v ivo
                             en           ur               ur
                           Ed           S                S


                       Reset...




                                  Old


                                                                          27
Tuesday, July 10, 12
r0               r1
                                                        v ivo            v ivo
                                      en           ur               ur
                                    Ed           S                S


                       Allocation




                                           Old


                                                                                   28
Tuesday, July 10, 12
r0               r1
                                                  v ivo            v ivo
                              en             ur               ur
                            Ed             S                S


                       100% = GC !




                                     Old


                                                                             29
Tuesday, July 10, 12
r0               r1
                                           v ivo            v ivo
                         en           ur               ur
                       Ed           S                S




                              Old


                                                                      30
Tuesday, July 10, 12
r0               r1
                                             v ivo            v ivo
                         en             ur               ur
                       Ed             S                S




                         Copy



                                Old


                                                                        31
Tuesday, July 10, 12
r0               r1
                                           v ivo            v ivo
                         en           ur               ur
                       Ed           S                S




                                               Copy



                              Old


                                                                      32
Tuesday, July 10, 12
r0               r1
                                                   v ivo            v ivo
                         en                   ur               ur
                       Ed                   S                S


                                    Reset ...

                                           Génération 1

                                                     Génération 2



                              Old


                                                                              33
Tuesday, July 10, 12
r0               r1
                                                        v ivo            v ivo
                                      en           ur               ur
                                    Ed           S                S


                       Allocation




                                           Old


                                                                                   34
Tuesday, July 10, 12
r0               r1
                                                  v ivo            v ivo
                              en             ur               ur
                            Ed             S                S


                       100% = GC !




                                     Old


                                                                             35
Tuesday, July 10, 12
r0               r1
                                             v ivo            v ivo
                         en             ur               ur
                       Ed             S                S




                         Copy



                                Old


                                                                        36
Tuesday, July 10, 12
r0               r1
                                                v ivo            v ivo
                         en                ur               ur
                       Ed                S                S




                       Promotion



                                   Old


                                                                           37
Tuesday, July 10, 12
Old




                             38
Tuesday, July 10, 12
“Almost full” =Old !
                                      GC




                                              39
Tuesday, July 10, 12
40
Tuesday, July 10, 12
41
Tuesday, July 10, 12
Old

                       Compaction
                        (optional)




                                           42
Tuesday, July 10, 12
43
Tuesday, July 10, 12
Garbage Collectors
                  • Générational
                  • Stop the world!
                  • Throughput or Concurrent


                                                 44
Tuesday, July 10, 12
GC characteristics
                                                   Young
                                          Serial           Parallel

                               Serial

                       Old    Parallel

                             Concurrent




                                                                      45
Tuesday, July 10, 12
GC characteristics
                                                   Young
                                          Serial           Parallel

                               Serial                      Default

                       Old    Parallel    N/A

                             Concurrent




                                                                      46
Tuesday, July 10, 12
GC characteristics
                                                   Young
                                          Serial           Parallel

                               Serial

                       Old    Parallel

                             Concurrent




                                                                      47
Tuesday, July 10, 12
GC characteristics
                                                   Young
                                          Serial           Parallel

                               Serial     Serial

                       Old    Parallel

                             Concurrent




                                                                      47
Tuesday, July 10, 12
GC characteristics
                                                   Young
                                          Serial           Parallel

                               Serial     Serial           Parallel

                       Old    Parallel

                             Concurrent




                                                                      47
Tuesday, July 10, 12
GC characteristics
                                                   Young
                                          Serial           Parallel

                               Serial     Serial           Parallel

                       Old    Parallel                 ParallelOld

                             Concurrent




                                                                      47
Tuesday, July 10, 12
GC characteristics
                                                   Young
                                          Serial           Parallel

                               Serial     Serial           Parallel

                       Old    Parallel                 ParallelOld

                             Concurrent                     CMS




                                                                      47
Tuesday, July 10, 12
GC characteristics
                                                     Young
                                            Serial           Parallel

                               Serial       Serial           Parallel

                       Old    Parallel                   ParallelOld

                             Concurrent   CMS Serial          CMS




                                                                        47
Tuesday, July 10, 12
GC characteristics
                                                             Young
                                                    Serial           Parallel

                                   Serial           Serial           Parallel

                       Old        Parallel                        ParallelOld

                                Concurrent       CMS Serial           CMS

                       Parallel implementation actually differ for each variant


                                                                                  48
Tuesday, July 10, 12
GC characteristics




                                            49
Tuesday, July 10, 12
GC characteristics




                                            49
Tuesday, July 10, 12
CMS is the right choice
                            Serial                                                        917

                          Parallel                                                 852

                       ParallelOld                                                 846

                             CMS                                                    871

                       CMS Serial                                                          937

                                     0     250                  500          750                 1000
                                                 Average test duration (s)




                                                                                                        50
Tuesday, July 10, 12
Tools: CLI

                                          jps, jhat, jmap, jstack, jstat

                  $ jstat -gcutil PID
                    S0     S1     E      O       P      YGC      YGCT      FGC   FGCT      GCT
                    0.00 40.88 58.41    18.34   66.65   2729   316.538      46   6.820   323.358




                                                                                                   51
Tuesday, July 10, 12
Tools: GUIs




                                     52
Tuesday, July 10, 12
Tools: GUIs (2)
                  • Any profiler
                   • During development
                   • For autopsies!


                                                 53
Tuesday, July 10, 12
Tools: GUIs (2)
                  • Any profiler
                   • During development
                   • For autopsies!
                                          HeapDumpOnOutOfMemoryError
                                                 HeapDumpPath




                                                                       53
Tuesday, July 10, 12
verbose:gc




                                    54
Tuesday, July 10, 12
verbose:gc




                                    54
Tuesday, July 10, 12
verbose:gc




                                    54
Tuesday, July 10, 12
verbose:gc




                                    54
Tuesday, July 10, 12
verbose:gc




                                    54
Tuesday, July 10, 12
verbose:gc




                                    54
Tuesday, July 10, 12
verbose:gc




                                    54
Tuesday, July 10, 12
verbose:gc


                          Stop the world!




                                            54
Tuesday, July 10, 12
verbose:gc


                          Stop the world!




                                            54
Tuesday, July 10, 12
MBeans




                                55
Tuesday, July 10, 12
OK, so we can measure... temperature!!




                                                                56
Tuesday, July 10, 12
OK, so we can measure... temperature !




                                              =



                                                                57
Tuesday, July 10, 12
But...a single temperature measure is not enough to diagnose anything!




                                                            We must archive all measurements
                                                                to know the baseline!




Credit: http://www.lhup.edu/mkhalequ/fieldtrip/geos253.htm
                                                                                               58
Tuesday, July 10, 12
Therefore we must persist all measurements!



                  •    JMX + jmxtrans

                  •    RRD

                  •    Graphite

                  •    etc.



                                                                        59
Tuesday, July 10, 12
Operating the (many) switches only makes sense...




Credit: http://www.our-energy.com
                                                                                   60
Tuesday, July 10, 12
...if we can measure/compare the effects!


                                              Before
                       cputime




                                                              After




                                                                             61
Tuesday, July 10, 12
Putting it together



                                             62
Tuesday, July 10, 12
We want to minimize the GC
                                 pauses

                                Young (ParNew)
                       Old (CMS-initial-mark + CMS-remark)




                                                             63
Tuesday, July 10, 12
vs.




                             64
Tuesday, July 10, 12
JVM
                                   Tomcat


                       vs.
                                        Application
                                          (code)




                                                      64
Tuesday, July 10, 12
1.                                                   Code

                  •     Tuning the JVM cannot compensate for bad code

                  •     Rules of thumb

                       •    Immutability = object reuse = less allocations *

                       •    Move code invariants out of tight loops

                       •    Know the characteristics of your data structures & frameworks (java.util,
                            Guava, Hibernate, etc.)

                           •    Mind the gap: data structure overhead can kill you!
                       * But...pooling can be counter-productive!
                                                                                                        65
Tuesday, July 10, 12
Example : HashMap

                       HashMap 48

                               Entry[16] 80                key

                                              Entry   32


                                                           value



                                                                   66
Tuesday, July 10, 12
Example : HashMap

                                 HashMap 48

                                           Entry[16] 80                key

                       Overhead = 160 Bytes!              Entry   32


                                                                       value



                                                                               66
Tuesday, July 10, 12
Example : HashMap

                                       HashMap 48

                                                        Entry[16] 80                key

                       Overhead = 160 Bytes!                           Entry   32


                                                                                    value
                        •SingletonMap (40 Bytes)
                        •initialCapacity + loadFactor

                                                                                            66
Tuesday, July 10, 12
GC Young / s   Less allocations...




                                                 67
Tuesday, July 10, 12
Charge CPU   ... saves CPU




                                         68
Tuesday, July 10, 12
2.                                            Tomcat

                  •        Pooling

                       •    JSP tags: enablePooling in web/webdefault.xml

                       •    -Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false

                  •        Careful with buffers and their reuse

                       •    -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true

                  • JSP usage is a factor in PermGen requirements
                  • Test & Measure, always!
                                                                                            69
Tuesday, July 10, 12
2.                                            Tomcat

                  •        Pooling
                                                                                            Pooling may lead

                       •    JSP tags: enablePooling in web/webdefault.xml
                                                                                        !
                                                                                                 to Old
                                                                                             fragmentation!

                       •    -Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false

                  •        Careful with buffers and their reuse

                       •    -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true

                  • JSP usage is a factor in PermGen requirements
                  • Test & Measure, always!
                                                                                                               69
Tuesday, July 10, 12
3. Heap Size   The JVM




                                 Time
                  Heap Size




                                 Time


                                        70
Tuesday, July 10, 12
3.             The JVM

                                        pause > 1s !
                  Heap Size




                                 Time
                  Heap Size




                                 Time


                                                       70
Tuesday, July 10, 12
3.              The JVM

                                          pause > 1s !
                  Heap Size




                                   Time
                  Heap Size




                              Frequent GC


                                   Time


                                                         70
Tuesday, July 10, 12
The heap



                         Heap




                                  71
Tuesday, July 10, 12
The heap



                         Heap
                                  -Xms : start size
                                  -Xmx : max size




                                                      71
Tuesday, July 10, 12
Young vs Old



                           Old




                          Young


                                      72
Tuesday, July 10, 12
Young vs Old



                           Old


                                      -XX:NewSize -XX:MaxNewSize
                                            -XX:NewRatio
                          Young


                                                                   72
Tuesday, July 10, 12
Young vs Old



                                      •“Working Set”
                           Old        •Caches, object pools
                                      •HttpSession, average lifespan
                                      objects




                          Young       Objects < RequestScope




                                                                       72
Tuesday, July 10, 12
First mistake: setting the Young too small



                                          Old




                                         Young


                                                                    73
Tuesday, July 10, 12
First mistake: setting the Young too small



                                          Old

                                                       Young fills up quickly = many GC Young

                                                       Objects promoted to Tenured too fast =
                                         Young                     many GC Old




                                                                                                73
Tuesday, July 10, 12
Second mistake: setting Young too large



                                        Old




                                        Young


                                                                 74
Tuesday, July 10, 12
Second mistake: setting Young too large



                                        Old

                                                      GC Young pauses increase



                                        Young


                                                                                 74
Tuesday, July 10, 12
Tuning Young




                           Old


                                      Default NewRatio=8 with -server on
                                                      Intel
                                                        =
                          Young        Too small for a webapp with non-
                                                  trivial load!



                                                                           75
Tuesday, July 10, 12
Tuning Young




                           Old

                                      Increase Young slowly and measure
                                                  the effects!


                          Young


                                                                          75
Tuesday, July 10, 12
Old: Mind the Gaps (fragmentation)!




                                       Old




                                      Young


                                                             76
Tuesday, July 10, 12
Old: Mind the Gaps (fragmentation)!



                                      K6 < u22:     on failed)
                            JD Old             omoti
                                     15595) (pr
                          ure size =
                      fail
           (promotion
    ParNew
                                      Young


                                                             76
Tuesday, July 10, 12
Old generation : ideal shape




                                                      77
Tuesday, July 10, 12
Old generation : real life




                                                    78
Tuesday, July 10, 12
Old generation : ideal vs. real




                                                         79
Tuesday, July 10, 12
Old generation : ideal vs. real




                                 Rate increases


                                                         79
Tuesday, July 10, 12
Things to watch for


                  •    Traffic/Load variance

                  •    Traffic increases => Memory pressure increase

                  •    CMS requires some headroom to operate properly

                       •   Several phases are concurrent, i.e. at the same time as new objects are
                           allocated



                                                                                                     80
Tuesday, July 10, 12
Things to watch for


                  •    Traffic/Load variance

                  •    Traffic increases => Memory pressure increase

                  •    CMS requires some headroom to operate properly

                       •   Several phases are concurrent, i.e. at the same time as new objects are
                           allocated
                           (concurrent mode failure): 2165740K->1284261K(2228224K), 8.9411250 secs



                                                                                                     80
Tuesday, July 10, 12
Giving CMS some room to operate



                                     Old




                                    Young


                                                         81
Tuesday, July 10, 12
Giving CMS some room to operate
                                               CMSInitiatingOccupancyFraction = 92%

                                               This is the default....


                                     Old




                                    Young


                                                                                      81
Tuesday, July 10, 12
Giving CMS some room to operate

                                                   We really need 75-80%

                                               UseCMSInitiatingOccupancyOnly to force
                                               the JVM to only consider this criteria
                                     Old




                                    Young


                                                                                        81
Tuesday, July 10, 12
CMS initial-mark




                                          82
Tuesday, July 10, 12
CMS initial-mark (cumulative)




                                                       83
Tuesday, July 10, 12
CMS initial-mark (cumulative)



                          Median: -83%




                                                       83
Tuesday, July 10, 12
CMS initial-mark (cumulative)
                            Top 99%: -79%



                          Median: -83%




                                                       83
Tuesday, July 10, 12
CMS remark




                                    84
Tuesday, July 10, 12
CMS remark (cumulative)




                                                 85
Tuesday, July 10, 12
CMS remark (cumulative)

                                       Top 90%: -56%




                                                       85
Tuesday, July 10, 12
But...I still see pauses !


                  •    RMI triggers explicit GC regularly

                       •   Invokes System.gc()

                  •    Explicit GC = Full GC (Serial) = 4-8s stop-the-world pause !

                       •   DisableExplicitGC + CMSClassUnloadingEnabled

                       •   ExplicitGCInvokesConcurrentAndUnloadsClasses


                                                                                      86
Tuesday, July 10, 12
Complete GC comparison




                                                87
Tuesday, July 10, 12
88
Tuesday, July 10, 12
88
Tuesday, July 10, 12
What’s next?

                  •        Survivors tuning (S0 & S1)

                       •    Size, ratio vs. Eden, max generation

                  •        G1

                       •    Principles and operations are radically different!

                  • Other JVMs : JRockit, Azul, IBM
                  • Check tuning validity after every code change!
                  • Measure, measure, measure!
                                                                                 89
Tuesday, July 10, 12
Questions ?



                                     90
Tuesday, July 10, 12
91
Tuesday, July 10, 12

Weitere ähnliche Inhalte

Andere mochten auch

Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
 
Java Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyJava Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyDhanu Gupta
 
Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"Ciklum Minsk
 
Java Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and contextJava Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and contextTomek Borek
 
Java gc and JVM optimization
Java gc  and JVM optimizationJava gc  and JVM optimization
Java gc and JVM optimizationRajan Jethva
 
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
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesSergey Podolsky
 
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationGC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationLudovic Poitou
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展Leon Chen
 

Andere mochten auch (20)

Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Java Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyJava Garbage Collection(GC)- Study
Java Garbage Collection(GC)- Study
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"
 
Java Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and contextJava Memory Consistency Model - concepts and context
Java Memory Consistency Model - concepts and context
 
Java gc and JVM optimization
Java gc  and JVM optimizationJava gc  and JVM optimization
Java gc and JVM optimization
 
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
 
Java memory model
Java memory modelJava memory model
Java memory model
 
The Java Memory Model
The Java Memory ModelThe Java Memory Model
The Java Memory Model
 
Java GC, Off-heap workshop
Java GC, Off-heap workshopJava GC, Off-heap workshop
Java GC, Off-heap workshop
 
How long can you afford to Stop The World?
How long can you afford to Stop The World?How long can you afford to Stop The World?
How long can you afford to Stop The World?
 
JVM及其调优
JVM及其调优JVM及其调优
JVM及其调优
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issues
 
The Java memory model made easy
The Java memory model made easyThe Java memory model made easy
The Java memory model made easy
 
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationGC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
 
Java GC
Java GCJava GC
Java GC
 

Ähnlich wie Java GC - Pause tuning

Inside the Atlassian OnDemand Private Cloud
Inside the Atlassian OnDemand Private CloudInside the Atlassian OnDemand Private Cloud
Inside the Atlassian OnDemand Private CloudAtlassian
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupMarakana Inc.
 
From a monolithic Ruby on Rails app to the JVM
From a monolithic  Ruby on Rails app  to the JVMFrom a monolithic  Ruby on Rails app  to the JVM
From a monolithic Ruby on Rails app to the JVMPhil Calçado
 
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphereCodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphereCodecamp Romania
 
Ops for Developers
Ops for DevelopersOps for Developers
Ops for DevelopersMojo Lingo
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deploymentzeeg
 
FLASH MEMORY: THE BIG DATA from Structure:Data 2012
FLASH MEMORY: THE BIG DATA from Structure:Data 2012FLASH MEMORY: THE BIG DATA from Structure:Data 2012
FLASH MEMORY: THE BIG DATA from Structure:Data 2012Gigaom
 
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comRuby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comIlya Grigorik
 
Open End To End Js Stack
Open End To End Js StackOpen End To End Js Stack
Open End To End Js StackSkills Matter
 
We're going on a bug hunt! Experts Talk Manchester 2018
We're going on a bug hunt! Experts Talk Manchester 2018We're going on a bug hunt! Experts Talk Manchester 2018
We're going on a bug hunt! Experts Talk Manchester 2018GeraldBenischke
 
ExpertTalks Manchester September 2018
ExpertTalks Manchester September 2018ExpertTalks Manchester September 2018
ExpertTalks Manchester September 2018Tessa Ledwith
 
Big Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian ColeBig Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian ColeJAX London
 
Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011Arun Gupta
 
DTrace talk at Oracle Open World
DTrace talk at Oracle Open WorldDTrace talk at Oracle Open World
DTrace talk at Oracle Open WorldAngelo Rajadurai
 
Social Gaming & Gambling Summit - London Chris Anderson
Social Gaming & Gambling Summit - London Chris AndersonSocial Gaming & Gambling Summit - London Chris Anderson
Social Gaming & Gambling Summit - London Chris AndersonMediabistro
 
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGuillaume Laforge
 
Joshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of DevicesJoshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of DevicesFrancois Daoust
 
Eclipse con 2012 - Frictionless operations with Puppet - Luke Kanies
Eclipse con 2012 - Frictionless operations with Puppet - Luke KaniesEclipse con 2012 - Frictionless operations with Puppet - Luke Kanies
Eclipse con 2012 - Frictionless operations with Puppet - Luke KaniesPuppet
 

Ähnlich wie Java GC - Pause tuning (20)

Inside the Atlassian OnDemand Private Cloud
Inside the Atlassian OnDemand Private CloudInside the Atlassian OnDemand Private Cloud
Inside the Atlassian OnDemand Private Cloud
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User Group
 
From a monolithic Ruby on Rails app to the JVM
From a monolithic  Ruby on Rails app  to the JVMFrom a monolithic  Ruby on Rails app  to the JVM
From a monolithic Ruby on Rails app to the JVM
 
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphereCodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
CodeCamp Iasi 10 march 2012 - websockets-with-atmosphere
 
Ops for Developers
Ops for DevelopersOps for Developers
Ops for Developers
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deployment
 
FLASH MEMORY: THE BIG DATA from Structure:Data 2012
FLASH MEMORY: THE BIG DATA from Structure:Data 2012FLASH MEMORY: THE BIG DATA from Structure:Data 2012
FLASH MEMORY: THE BIG DATA from Structure:Data 2012
 
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.comRuby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
 
Open End To End Js Stack
Open End To End Js StackOpen End To End Js Stack
Open End To End Js Stack
 
We're going on a bug hunt! Experts Talk Manchester 2018
We're going on a bug hunt! Experts Talk Manchester 2018We're going on a bug hunt! Experts Talk Manchester 2018
We're going on a bug hunt! Experts Talk Manchester 2018
 
ExpertTalks Manchester September 2018
ExpertTalks Manchester September 2018ExpertTalks Manchester September 2018
ExpertTalks Manchester September 2018
 
Big Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian ColeBig Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian Cole
 
Treasure Data and Heroku
Treasure Data and HerokuTreasure Data and Heroku
Treasure Data and Heroku
 
Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011Java EE Technical Keynote - JavaOne India 2011
Java EE Technical Keynote - JavaOne India 2011
 
AWS Case Study
AWS Case StudyAWS Case Study
AWS Case Study
 
DTrace talk at Oracle Open World
DTrace talk at Oracle Open WorldDTrace talk at Oracle Open World
DTrace talk at Oracle Open World
 
Social Gaming & Gambling Summit - London Chris Anderson
Social Gaming & Gambling Summit - London Chris AndersonSocial Gaming & Gambling Summit - London Chris Anderson
Social Gaming & Gambling Summit - London Chris Anderson
 
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
 
Joshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of DevicesJoshfire Factory: Building Apps for Billion of Devices
Joshfire Factory: Building Apps for Billion of Devices
 
Eclipse con 2012 - Frictionless operations with Puppet - Luke Kanies
Eclipse con 2012 - Frictionless operations with Puppet - Luke KaniesEclipse con 2012 - Frictionless operations with Puppet - Luke Kanies
Eclipse con 2012 - Frictionless operations with Puppet - Luke Kanies
 

Mehr von ekino

Microbox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien RoyMicrobox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien Royekino
 
Spring data : Une api, quinze possibilités - Julien Roy
Spring data : Une api, quinze possibilités - Julien RoySpring data : Une api, quinze possibilités - Julien Roy
Spring data : Une api, quinze possibilités - Julien Royekino
 
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien RoySe lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Royekino
 
Panorama des solutions mobile hybrides
Panorama des solutions mobile hybridesPanorama des solutions mobile hybrides
Panorama des solutions mobile hybridesekino
 
Le « RUN » (ou la Tierce Maintenance Applicative)
Le « RUN » (ou la Tierce Maintenance Applicative)Le « RUN » (ou la Tierce Maintenance Applicative)
Le « RUN » (ou la Tierce Maintenance Applicative)ekino
 
Kinect pour les développeurs Web
Kinect pour les développeurs WebKinect pour les développeurs Web
Kinect pour les développeurs Webekino
 
Industrialisation PHP - Canal+
Industrialisation PHP - Canal+Industrialisation PHP - Canal+
Industrialisation PHP - Canal+ekino
 
Symfony et Sonata Project chez Canal+
Symfony et Sonata Project chez Canal+ Symfony et Sonata Project chez Canal+
Symfony et Sonata Project chez Canal+ ekino
 
Expériencer les objets connectés
Expériencer les objets connectésExpériencer les objets connectés
Expériencer les objets connectésekino
 
Industrialise PHP ~ ZendCon Europe 2013
Industrialise PHP ~ ZendCon Europe 2013Industrialise PHP ~ ZendCon Europe 2013
Industrialise PHP ~ ZendCon Europe 2013ekino
 
Drupagora 2013 : Drupal8 et Symfony2, quel impact ?
Drupagora 2013 : Drupal8 et Symfony2, quel impact ?Drupagora 2013 : Drupal8 et Symfony2, quel impact ?
Drupagora 2013 : Drupal8 et Symfony2, quel impact ?ekino
 
Responsive Web Design - Enjeux, Solutions, Méthodologie
Responsive Web Design - Enjeux, Solutions, MéthodologieResponsive Web Design - Enjeux, Solutions, Méthodologie
Responsive Web Design - Enjeux, Solutions, Méthodologieekino
 
SnapyX
SnapyXSnapyX
SnapyXekino
 
HTML5 vu par Ekino
HTML5 vu par EkinoHTML5 vu par Ekino
HTML5 vu par Ekinoekino
 
OOM m'a tuer - Devoxx France 2012
OOM m'a tuer - Devoxx France 2012OOM m'a tuer - Devoxx France 2012
OOM m'a tuer - Devoxx France 2012ekino
 

Mehr von ekino (15)

Microbox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien RoyMicrobox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien Roy
 
Spring data : Une api, quinze possibilités - Julien Roy
Spring data : Une api, quinze possibilités - Julien RoySpring data : Une api, quinze possibilités - Julien Roy
Spring data : Une api, quinze possibilités - Julien Roy
 
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien RoySe lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
Se lancer dans l'aventure microservices avec Spring Cloud - Julien Roy
 
Panorama des solutions mobile hybrides
Panorama des solutions mobile hybridesPanorama des solutions mobile hybrides
Panorama des solutions mobile hybrides
 
Le « RUN » (ou la Tierce Maintenance Applicative)
Le « RUN » (ou la Tierce Maintenance Applicative)Le « RUN » (ou la Tierce Maintenance Applicative)
Le « RUN » (ou la Tierce Maintenance Applicative)
 
Kinect pour les développeurs Web
Kinect pour les développeurs WebKinect pour les développeurs Web
Kinect pour les développeurs Web
 
Industrialisation PHP - Canal+
Industrialisation PHP - Canal+Industrialisation PHP - Canal+
Industrialisation PHP - Canal+
 
Symfony et Sonata Project chez Canal+
Symfony et Sonata Project chez Canal+ Symfony et Sonata Project chez Canal+
Symfony et Sonata Project chez Canal+
 
Expériencer les objets connectés
Expériencer les objets connectésExpériencer les objets connectés
Expériencer les objets connectés
 
Industrialise PHP ~ ZendCon Europe 2013
Industrialise PHP ~ ZendCon Europe 2013Industrialise PHP ~ ZendCon Europe 2013
Industrialise PHP ~ ZendCon Europe 2013
 
Drupagora 2013 : Drupal8 et Symfony2, quel impact ?
Drupagora 2013 : Drupal8 et Symfony2, quel impact ?Drupagora 2013 : Drupal8 et Symfony2, quel impact ?
Drupagora 2013 : Drupal8 et Symfony2, quel impact ?
 
Responsive Web Design - Enjeux, Solutions, Méthodologie
Responsive Web Design - Enjeux, Solutions, MéthodologieResponsive Web Design - Enjeux, Solutions, Méthodologie
Responsive Web Design - Enjeux, Solutions, Méthodologie
 
SnapyX
SnapyXSnapyX
SnapyX
 
HTML5 vu par Ekino
HTML5 vu par EkinoHTML5 vu par Ekino
HTML5 vu par Ekino
 
OOM m'a tuer - Devoxx France 2012
OOM m'a tuer - Devoxx France 2012OOM m'a tuer - Devoxx France 2012
OOM m'a tuer - Devoxx France 2012
 

Kürzlich hochgeladen

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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Java GC - Pause tuning

  • 1. Death by pauses Everything you ever wanted to know about GC pauses* *but were afraid to ask 1 Tuesday, July 10, 12
  • 2. Agenda 1. Introduction 2. Crime Scene Investigation 3. JVM Memory management systems and tools 4. Putting it together 2 Tuesday, July 10, 12
  • 3. The Crime Scene PG 13* * Parents strongly cautioned: typed language, dead objects and verbose logs may not be suitable to scripting language fans 3 Tuesday, July 10, 12
  • 4. B2C e-commerce platform Apache Tomcat Oracle 4 Tuesday, July 10, 12
  • 5. B2C e-commerce platform Apache •12+ Servers Tomcat •10 different Webapps •50+ JVMs (Oracle JDK6) Oracle 4 Tuesday, July 10, 12
  • 6. B2C e-commerce platform Apache •12+ Servers Tomcat •10 different Webapps •50+ JVMs (Oracle JDK6) •> 30000 sessions •250-400 Req/s Oracle •Variance is high 4 Tuesday, July 10, 12
  • 7. ... an unusual victim... Product catalog modeled as a Graph 100% custom implementation 100% on-heap (no SQL except for initial load) in-place update by AtomicReference.set() 5 Tuesday, July 10, 12
  • 8. ... an unusual victim... Product catalog modeled as a Graph 100% custom implementation 100% on-heap (no SQL except for initial load) in-place update by AtomicReference.set() Caching aggressively is not possible Large number of request-scoped objects Many WS into backoffice systems = latency 5 Tuesday, July 10, 12
  • 9. vs. Throughput Latency 6 Tuesday, July 10, 12
  • 11. Interactive e-commerce app: Low latency is the top priority! 7 Tuesday, July 10, 12
  • 12. The Crime Scene JDBC Connections Time 8 Tuesday, July 10, 12
  • 13. The Crime Scene JDBC Connections Requests/s Time Time 8 Tuesday, July 10, 12
  • 14. The Crime Scene JDBC Connections Requests/s Time Time Active threads Time 8 Tuesday, July 10, 12
  • 15. The Crime Scene JDBC Connections Requests/s Time Time Active threads HTTP Executor Queue Size Time Time 8 Tuesday, July 10, 12
  • 16. The evidence Heap Size in MB 1 hour 9 Tuesday, July 10, 12
  • 17. The evidence Heap Can’t see anything: let’s zoom out! Size in MB 1 hour 9 Tuesday, July 10, 12
  • 18. The evidence Heap Size in MB 24 hours 10 Tuesday, July 10, 12
  • 19. The evidence Heap Size in MB 24 hours 10 Tuesday, July 10, 12
  • 20. The evidence Heap Size in MB 24 hours 10 Tuesday, July 10, 12
  • 21. The evidence Heap Time spent in GC (%) 100 75 Size in MB 50 25 0 1 hour 1 hour 11 Tuesday, July 10, 12
  • 22. The usual suspects... 12 Tuesday, July 10, 12
  • 23. The usual suspects... • OutOfMemory Heap 12 Tuesday, July 10, 12
  • 24. The usual suspects... • OutOfMemory Heap • OutOfMemory PermGen 12 Tuesday, July 10, 12
  • 25. The usual suspects... • OutOfMemory Heap • OutOfMemory PermGen • Long GC pauses 12 Tuesday, July 10, 12
  • 26. The usual suspects... • OutOfMemory Heap • OutOfMemory PermGen • Long GC pauses ➡ under high load = immediate death 12 Tuesday, July 10, 12
  • 27. The usual suspects... • OutOfMemory Heap • OutOfMemory PermGen • Long GC pauses ➡ under high load = immediate death 12 Tuesday, July 10, 12
  • 28. The usual suspects... • OutOfMemory Heap • OutOfMemory PermGen • Long GC pauses ➡ under high load = immediate death 12 Tuesday, July 10, 12
  • 29. a e st h b yThe usual suspects... • • D e OutOfMemory Heap s OutOfMemory PermGen • p au Long GC pauses ➡ under high load = immediate death 12 Tuesday, July 10, 12
  • 30. Why do we need this GC thing again ? “Many concurrent algorithms are very easy to write with a GC and totally hard (to down right impossible) using explicit free.” Cliff Click 13 Tuesday, July 10, 12
  • 31. Fine, we just need to tune the JVM, right?... 14 Tuesday, July 10, 12
  • 32. Fine, we just need to tune the JVM, right?... 14 Tuesday, July 10, 12
  • 33. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 34. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 35. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags 100 <= X< 200 * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 36. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags 100 <= X< 200 200 <= X< 300 * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 37. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags 100 <= X< 200 200 <= X< 300 300 <= X< 400 * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 38. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags 100 <= X< 200 200 <= X< 300 300 <= X< 400 400 <= X< 500 * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 39. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags 100 <= X< 200 200 <= X< 300 300 <= X< 400 400 <= X< 500 500 <= X< 600 * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 40. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags 100 <= X< 200 200 <= X< 300 300 <= X< 400 400 <= X< 500 500 <= X< 600 600 <= X< 700 * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 41. Fine, we just need to tune the JVM, right?... POP QUIZZ! Number of command-line flags*? less than 100 flags 100 <= X< 200 200 <= X< 300 300 <= X< 400 400 <= X< 500 500 <= X< 600 600 <= X< 700 664 Flags! * Oracle JVM 1.6.0_31 x86_64 server 14 Tuesday, July 10, 12
  • 44. Memory in the JVM JVM 16 Tuesday, July 10, 12
  • 45. Class metadata Permanent (PermGen) interned Strings, etc. JVM 17 Tuesday, July 10, 12
  • 46. Class metadata Permanent (PermGen) interned Strings, etc. Heap Application Objects 18 Tuesday, July 10, 12
  • 47. Permanent (PermGen) Old / Tenured Young / New 19 Tuesday, July 10, 12
  • 48. Permanent (PermGen) Old / Tenured Eden S0 S1 20 Tuesday, July 10, 12
  • 49. The Garbage Collector is generational r0 r1 v ivo v ivo en ur ur Ed S S Old 21 Tuesday, July 10, 12
  • 50. r0 r1 v ivo v ivo en ur ur Ed S S Allocation Old 22 Tuesday, July 10, 12
  • 51. r0 r1 v ivo v ivo en ur ur Ed S S Old 23 Tuesday, July 10, 12
  • 52. r0 r1 v ivo v ivo en ur ur Ed S S 100% = GC! Old 24 Tuesday, July 10, 12
  • 53. r0 r1 v ivo v ivo en ur ur Ed S S Unreferenced Live Old 25 Tuesday, July 10, 12
  • 54. r0 r1 v ivo v ivo en ur ur Ed S S Copy Old 26 Tuesday, July 10, 12
  • 55. r0 r1 v ivo v ivo en ur ur Ed S S Reset... Old 27 Tuesday, July 10, 12
  • 56. r0 r1 v ivo v ivo en ur ur Ed S S Allocation Old 28 Tuesday, July 10, 12
  • 57. r0 r1 v ivo v ivo en ur ur Ed S S 100% = GC ! Old 29 Tuesday, July 10, 12
  • 58. r0 r1 v ivo v ivo en ur ur Ed S S Old 30 Tuesday, July 10, 12
  • 59. r0 r1 v ivo v ivo en ur ur Ed S S Copy Old 31 Tuesday, July 10, 12
  • 60. r0 r1 v ivo v ivo en ur ur Ed S S Copy Old 32 Tuesday, July 10, 12
  • 61. r0 r1 v ivo v ivo en ur ur Ed S S Reset ... Génération 1 Génération 2 Old 33 Tuesday, July 10, 12
  • 62. r0 r1 v ivo v ivo en ur ur Ed S S Allocation Old 34 Tuesday, July 10, 12
  • 63. r0 r1 v ivo v ivo en ur ur Ed S S 100% = GC ! Old 35 Tuesday, July 10, 12
  • 64. r0 r1 v ivo v ivo en ur ur Ed S S Copy Old 36 Tuesday, July 10, 12
  • 65. r0 r1 v ivo v ivo en ur ur Ed S S Promotion Old 37 Tuesday, July 10, 12
  • 66. Old 38 Tuesday, July 10, 12
  • 67. “Almost full” =Old ! GC 39 Tuesday, July 10, 12
  • 70. Old Compaction (optional) 42 Tuesday, July 10, 12
  • 72. Garbage Collectors • Générational • Stop the world! • Throughput or Concurrent 44 Tuesday, July 10, 12
  • 73. GC characteristics Young Serial Parallel Serial Old Parallel Concurrent 45 Tuesday, July 10, 12
  • 74. GC characteristics Young Serial Parallel Serial Default Old Parallel N/A Concurrent 46 Tuesday, July 10, 12
  • 75. GC characteristics Young Serial Parallel Serial Old Parallel Concurrent 47 Tuesday, July 10, 12
  • 76. GC characteristics Young Serial Parallel Serial Serial Old Parallel Concurrent 47 Tuesday, July 10, 12
  • 77. GC characteristics Young Serial Parallel Serial Serial Parallel Old Parallel Concurrent 47 Tuesday, July 10, 12
  • 78. GC characteristics Young Serial Parallel Serial Serial Parallel Old Parallel ParallelOld Concurrent 47 Tuesday, July 10, 12
  • 79. GC characteristics Young Serial Parallel Serial Serial Parallel Old Parallel ParallelOld Concurrent CMS 47 Tuesday, July 10, 12
  • 80. GC characteristics Young Serial Parallel Serial Serial Parallel Old Parallel ParallelOld Concurrent CMS Serial CMS 47 Tuesday, July 10, 12
  • 81. GC characteristics Young Serial Parallel Serial Serial Parallel Old Parallel ParallelOld Concurrent CMS Serial CMS Parallel implementation actually differ for each variant 48 Tuesday, July 10, 12
  • 82. GC characteristics 49 Tuesday, July 10, 12
  • 83. GC characteristics 49 Tuesday, July 10, 12
  • 84. CMS is the right choice Serial 917 Parallel 852 ParallelOld 846 CMS 871 CMS Serial 937 0 250 500 750 1000 Average test duration (s) 50 Tuesday, July 10, 12
  • 85. Tools: CLI jps, jhat, jmap, jstack, jstat $ jstat -gcutil PID S0 S1 E O P YGC YGCT FGC FGCT GCT 0.00 40.88 58.41 18.34 66.65 2729 316.538 46 6.820 323.358 51 Tuesday, July 10, 12
  • 86. Tools: GUIs 52 Tuesday, July 10, 12
  • 87. Tools: GUIs (2) • Any profiler • During development • For autopsies! 53 Tuesday, July 10, 12
  • 88. Tools: GUIs (2) • Any profiler • During development • For autopsies! HeapDumpOnOutOfMemoryError HeapDumpPath 53 Tuesday, July 10, 12
  • 89. verbose:gc 54 Tuesday, July 10, 12
  • 90. verbose:gc 54 Tuesday, July 10, 12
  • 91. verbose:gc 54 Tuesday, July 10, 12
  • 92. verbose:gc 54 Tuesday, July 10, 12
  • 93. verbose:gc 54 Tuesday, July 10, 12
  • 94. verbose:gc 54 Tuesday, July 10, 12
  • 95. verbose:gc 54 Tuesday, July 10, 12
  • 96. verbose:gc Stop the world! 54 Tuesday, July 10, 12
  • 97. verbose:gc Stop the world! 54 Tuesday, July 10, 12
  • 98. MBeans 55 Tuesday, July 10, 12
  • 99. OK, so we can measure... temperature!! 56 Tuesday, July 10, 12
  • 100. OK, so we can measure... temperature ! = 57 Tuesday, July 10, 12
  • 101. But...a single temperature measure is not enough to diagnose anything! We must archive all measurements to know the baseline! Credit: http://www.lhup.edu/mkhalequ/fieldtrip/geos253.htm 58 Tuesday, July 10, 12
  • 102. Therefore we must persist all measurements! • JMX + jmxtrans • RRD • Graphite • etc. 59 Tuesday, July 10, 12
  • 103. Operating the (many) switches only makes sense... Credit: http://www.our-energy.com 60 Tuesday, July 10, 12
  • 104. ...if we can measure/compare the effects! Before cputime After 61 Tuesday, July 10, 12
  • 105. Putting it together 62 Tuesday, July 10, 12
  • 106. We want to minimize the GC pauses Young (ParNew) Old (CMS-initial-mark + CMS-remark) 63 Tuesday, July 10, 12
  • 107. vs. 64 Tuesday, July 10, 12
  • 108. JVM Tomcat vs. Application (code) 64 Tuesday, July 10, 12
  • 109. 1. Code • Tuning the JVM cannot compensate for bad code • Rules of thumb • Immutability = object reuse = less allocations * • Move code invariants out of tight loops • Know the characteristics of your data structures & frameworks (java.util, Guava, Hibernate, etc.) • Mind the gap: data structure overhead can kill you! * But...pooling can be counter-productive! 65 Tuesday, July 10, 12
  • 110. Example : HashMap HashMap 48 Entry[16] 80 key Entry 32 value 66 Tuesday, July 10, 12
  • 111. Example : HashMap HashMap 48 Entry[16] 80 key Overhead = 160 Bytes! Entry 32 value 66 Tuesday, July 10, 12
  • 112. Example : HashMap HashMap 48 Entry[16] 80 key Overhead = 160 Bytes! Entry 32 value •SingletonMap (40 Bytes) •initialCapacity + loadFactor 66 Tuesday, July 10, 12
  • 113. GC Young / s Less allocations... 67 Tuesday, July 10, 12
  • 114. Charge CPU ... saves CPU 68 Tuesday, July 10, 12
  • 115. 2. Tomcat • Pooling • JSP tags: enablePooling in web/webdefault.xml • -Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false • Careful with buffers and their reuse • -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true • JSP usage is a factor in PermGen requirements • Test & Measure, always! 69 Tuesday, July 10, 12
  • 116. 2. Tomcat • Pooling Pooling may lead • JSP tags: enablePooling in web/webdefault.xml ! to Old fragmentation! • -Dorg.apache.jasper.runtime.JspFactoryImpl.USE_POOL=false • Careful with buffers and their reuse • -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true • JSP usage is a factor in PermGen requirements • Test & Measure, always! 69 Tuesday, July 10, 12
  • 117. 3. Heap Size The JVM Time Heap Size Time 70 Tuesday, July 10, 12
  • 118. 3. The JVM pause > 1s ! Heap Size Time Heap Size Time 70 Tuesday, July 10, 12
  • 119. 3. The JVM pause > 1s ! Heap Size Time Heap Size Frequent GC Time 70 Tuesday, July 10, 12
  • 120. The heap Heap 71 Tuesday, July 10, 12
  • 121. The heap Heap -Xms : start size -Xmx : max size 71 Tuesday, July 10, 12
  • 122. Young vs Old Old Young 72 Tuesday, July 10, 12
  • 123. Young vs Old Old -XX:NewSize -XX:MaxNewSize -XX:NewRatio Young 72 Tuesday, July 10, 12
  • 124. Young vs Old •“Working Set” Old •Caches, object pools •HttpSession, average lifespan objects Young Objects < RequestScope 72 Tuesday, July 10, 12
  • 125. First mistake: setting the Young too small Old Young 73 Tuesday, July 10, 12
  • 126. First mistake: setting the Young too small Old Young fills up quickly = many GC Young Objects promoted to Tenured too fast = Young many GC Old 73 Tuesday, July 10, 12
  • 127. Second mistake: setting Young too large Old Young 74 Tuesday, July 10, 12
  • 128. Second mistake: setting Young too large Old GC Young pauses increase Young 74 Tuesday, July 10, 12
  • 129. Tuning Young Old Default NewRatio=8 with -server on Intel = Young Too small for a webapp with non- trivial load! 75 Tuesday, July 10, 12
  • 130. Tuning Young Old Increase Young slowly and measure the effects! Young 75 Tuesday, July 10, 12
  • 131. Old: Mind the Gaps (fragmentation)! Old Young 76 Tuesday, July 10, 12
  • 132. Old: Mind the Gaps (fragmentation)! K6 < u22: on failed) JD Old omoti 15595) (pr ure size = fail (promotion ParNew Young 76 Tuesday, July 10, 12
  • 133. Old generation : ideal shape 77 Tuesday, July 10, 12
  • 134. Old generation : real life 78 Tuesday, July 10, 12
  • 135. Old generation : ideal vs. real 79 Tuesday, July 10, 12
  • 136. Old generation : ideal vs. real Rate increases 79 Tuesday, July 10, 12
  • 137. Things to watch for • Traffic/Load variance • Traffic increases => Memory pressure increase • CMS requires some headroom to operate properly • Several phases are concurrent, i.e. at the same time as new objects are allocated 80 Tuesday, July 10, 12
  • 138. Things to watch for • Traffic/Load variance • Traffic increases => Memory pressure increase • CMS requires some headroom to operate properly • Several phases are concurrent, i.e. at the same time as new objects are allocated (concurrent mode failure): 2165740K->1284261K(2228224K), 8.9411250 secs 80 Tuesday, July 10, 12
  • 139. Giving CMS some room to operate Old Young 81 Tuesday, July 10, 12
  • 140. Giving CMS some room to operate CMSInitiatingOccupancyFraction = 92% This is the default.... Old Young 81 Tuesday, July 10, 12
  • 141. Giving CMS some room to operate We really need 75-80% UseCMSInitiatingOccupancyOnly to force the JVM to only consider this criteria Old Young 81 Tuesday, July 10, 12
  • 142. CMS initial-mark 82 Tuesday, July 10, 12
  • 143. CMS initial-mark (cumulative) 83 Tuesday, July 10, 12
  • 144. CMS initial-mark (cumulative) Median: -83% 83 Tuesday, July 10, 12
  • 145. CMS initial-mark (cumulative) Top 99%: -79% Median: -83% 83 Tuesday, July 10, 12
  • 146. CMS remark 84 Tuesday, July 10, 12
  • 147. CMS remark (cumulative) 85 Tuesday, July 10, 12
  • 148. CMS remark (cumulative) Top 90%: -56% 85 Tuesday, July 10, 12
  • 149. But...I still see pauses ! • RMI triggers explicit GC regularly • Invokes System.gc() • Explicit GC = Full GC (Serial) = 4-8s stop-the-world pause ! • DisableExplicitGC + CMSClassUnloadingEnabled • ExplicitGCInvokesConcurrentAndUnloadsClasses 86 Tuesday, July 10, 12
  • 150. Complete GC comparison 87 Tuesday, July 10, 12
  • 153. What’s next? • Survivors tuning (S0 & S1) • Size, ratio vs. Eden, max generation • G1 • Principles and operations are radically different! • Other JVMs : JRockit, Azul, IBM • Check tuning validity after every code change! • Measure, measure, measure! 89 Tuesday, July 10, 12
  • 154. Questions ? 90 Tuesday, July 10, 12