SlideShare a Scribd company logo
Am I Reading GC Logs Correctly?
Ram Lakshmanan
Founder – GCEasy.io & FastThread.io
Agenda
• Let’s learn to read 1 GC Log line
• Let’s learn to read 1 more GC Log line
SUSPENSE
How to enable GC Logging?
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<file-path>
Rotate GC Log file
from Java 6 Update 34
-XX:+UseGCLogFileRotation
must be used with -Xloggc:<filename>;
-XX:NumberOfGCLogFiles=<number of files>
must be >=1, default is one;
-XX:GCLogFileSize=<number>M (or K)
default will be set to 512K.
Best Practice: Enable ON all JVMs always
GC Log
2016-03-21T13:46:58.371+0000: 500.203: [Full GC [PSYoungGen: 1047584K-
>0K(1048064K)] [ParOldGen: 2097151K->865378K(2097152K)] 3144735K-
>865378K(3145216K) [PSPermGen: 29674K->29634K(262144K)], 1.8485590 secs]
[Times: user=3.17 sys=0.21, real=1.84 secs]
2 3 4
5
7
8
1
2
3
4
5
6
7
6
8
1
2016-03-21T13:46:58.371 – Timestamp at which GC event ran
500.203 – Number of seconds since application started
Full GC – Type of GC
PSYoungGen: 1047584K->0K(1048064K) – Young Gen size dropped from 1047584
(i.e.1gb) to 0k. Total allocated Young Gen size is 1048064K
ParOldGen: 2097151K->865378K(2097152K) – Old Gen size dropped from 2097151
(i.e.1.99gb) to 865378K(i.e.845mb). Total allocated Old Gen size is 2097152k (i.e.2gb)
3144735K->865378K(3145216K) – overall heap size dropped from 3144735K
(i.e.2.99gb) to 865378K (i.e.845mb)
PSPermGen: 29674K->29634K(262144K) – Perm Gen Size dropped from 29674K to
29634K. Overall Perm Gen Size is 262144K (i.e.256mb)
[Times: user=3.17 sys=0.21, real=1.84 secs]
Unix command – “time”
GC Time
• Real is wall clock time – time from start to finish of the call. This is all
elapsed time including time slices used by other processes and time the
process spends blocked (for example if it is waiting for I/O to complete).
• Sys is the amount of CPU time spent in the kernel within the process. This
means executing CPU time spent in system calls within the kernel, as
opposed to library code, which is still running in user-space. Like ‘user’,
this is only CPU time used by the process.
• User is the amount of CPU time spent in user-mode code (outside the
kernel) within the process. This is only actual CPU time used in executing
the process. Other processes and time the process spends blocked do not
count towards this figure.
• User+Sys will tell you how much actual CPU time your process used. Note
that this is across all CPUs, so if the process has multiple threads it could
potentially exceed the wall clock time reported by Real.
[Times: user=3.09 sys=0.00, real=3.10 secs]
[Times: user=11.53 sys=1.38, real=1.03 secs]
Typical for Serial GC
Agenda
• Let’s learn to read 1 GC Log line
• Let’s learn to read 1 more GC Log line
SUSPENSE
2015-09-14T12:32:24.398-0700: 0.356: [GC pause (G1 Evacuation Pause) (young), 0.0215287
secs]
[Parallel Time: 20.0 ms, GC Workers: 8]
[GC Worker Start (ms): Min: 355.9, Avg: 356.3, Max: 358.4, Diff: 2.4]
[Processed Buffers: Min: 0, Avg: 1.1, Max: 5, Diff: 5, Sum: 9]
:
:
[Free CSet: 0.0 ms]
[Eden: 12.0M(12.0M)->0.0B(14.0M) Survivors: 0.0B->2048.0K Heap: 12.6M(252.0M)-
>7848.3K(252.0M)]
[Times: user=0.08 sys=0.00, real=0.02 secs]
1 2 3
5
6
4
G1 GC Log Format
1
2
3
4
5
6
2015-09-14T12:32:24.398-0700: 0.356 – indicates the time at which this GC event fired. Here 0.356 indicates that 356 milliseconds after the
Java process was started this GC event was fired.
GC pause (G1 Evacuation Pause) — Evacuation Pause is a phase where live objects are copied from one region (young or young + old) to
another region.
(young) – indicates that this is a Young GC event.
GC Workers: 8 – indicates the number of GC worker threads.
[Eden: 12.0M(12.0M)->0.0B(14.0M) Survivors: 0.0B->2048.0K Heap: 12.6M(252.0M)->7848.3K(252.0M)] – This line indicates the heap size
changes:
Eden: 12.0M(12.0M)->0.0B(14.0M) - indicates that Eden generation’s capacity was 12mb and all of the 12mb was occupied. After this
GC event, young generation occupied size came down to 0. Target Capacity of Eden generation has been increased to 14mb, but not
yet committed. Additional regions are added to Eden generation, as demands are made.
Survivors: 0.0B->2048.0K - indicates that Survivor space was 0 bytes before this GC event. But after the event Survivor size increased
to 2048kb. It indicates that objects are promoted from Young Generation to Survivor space.
Heap: 12.6M(252.0M)->7848.3K(252.0M) – indicates that capacity of heap size was 252mb, in that 12.6mb was utilized. After this GC
event, heap utilization dropped to 7848.3kb (i.e. 5mb (i.e. 12.6mb – 7848.3kb) of objects has been garbage collected in this event).
And heap capacity remained at 252mb.
Times: user=0.08, sys=0.00, real=0.02 secs
Agenda
• Let’s learn to read 1 GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
SUSPENSE
Agenda
• Let’s learn to read 1 GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
• Let’s learn to read 1 more GC Log line
Agenda
• Let’s learn to read 1 GC Log line
• Let’s learn to read 1 more GC Log line
• How many more GC Logs lines should I learn?
• Troubleshoot real world GC Logs
I don’t know!!
G1 GC Log - another format
53957.956: [GC pause (G1 Evacuation Pause) (young) 104M-
>49M(118M), 0.0020080 secs]
CMS Log format
Before GC:
Statistics for BinaryTreeDictionary:
------------------------------------
Total Free Space: 2524251
Max Chunk Size: 2519552
Number of Blocks: 13
Av. Block Size: 194173
Tree Height: 8
2016-05-03T04:27:37.503+0000: 30282.678: [ParNew
Desired survivor size 214728704 bytes, new threshold 1 (max 1)
- age 1: 85782640 bytes, 85782640 total
: 3510063K->100856K(3774912K), 0.0516290 secs] 9371816K->6022161K(14260672K)After GC:
Statistics for BinaryTreeDictionary:
------------------------------------
Total Free Space: 530579346
Max Chunk Size: 332576815
Number of Blocks: 7178
Av. Block Size: 73917
Tree Height: 44
After GC:
Statistics for BinaryTreeDictionary:
------------------------------------
Total Free Space: 2524251
Max Chunk Size: 2519552
Number of Blocks: 13
Av. Block Size: 194173
Tree Height: 8
, 0.0552970 secs] [Times: user=0.67 sys=0.00, real=0.06 secs]
Heap after GC invocations=5898 (full 77):
par new generation total 3774912K, used 100856K [0x000000047ae00000, 0x000000057ae00000, 0x000000057ae00000)
eden space 3355520K, 0% used [0x000000047ae00000, 0x000000047ae00000, 0x0000000547ae0000)
from space 419392K, 24% used [0x0000000547ae0000, 0x000000054dd5e328, 0x0000000561470000)
to space 419392K, 0% used [0x0000000561470000, 0x0000000561470000, 0x000000057ae00000)
concurrent mark-sweep generation total 10485760K, used 5921305K [0x000000057ae00000, 0x00000007fae00000, 0x00000007fae00000)
concurrent-mark-sweep perm gen total 49380K, used 29537K [0x00000007fae00000, 0x00000007fde39000, 0x0000000800000000)
}
IBM GC Log format
<af type="tenured" id="4" timestamp="Jun 16 11:28:22 2016" intervalms="5633.039">
<minimum requested_bytes="56" />
<time exclusiveaccessms="0.010" meanexclusiveaccessms="0.010" threads="0" lastthreadtid="0xF6B1C400" />
<refs soft="7232" weak="3502" phantom="9" dynamicSoftReferenceThreshold="30" maxSoftReferenceThreshold="32
<tenured freebytes="42949632" totalbytes="1073741824" percent="3" >
<soa freebytes="0" totalbytes="1030792192" percent="0" />
<loa freebytes="42949632" totalbytes="42949632" percent="100" />
</tenured>
<pending-finalizers finalizable="0" reference="0" classloader="0" />
<gc type="global" id="6" totalid="6" intervalms="3342.687">
<classunloading classloaders="0" classes="0" timevmquiescems="0.000" timetakenms="1.200" />
<finalization objectsqueued="75" />
<timesms mark="28.886" sweep="1.414" compact="0.000" total="31.571" />
<tenured freebytes="1014673616" totalbytes="1073741824" percent="94" >
<soa freebytes="982461648" totalbytes="1041529856" percent="94" />
<loa freebytes="32211968" totalbytes="32211968" percent="100" />
</tenured>
</gc>
<tenured freebytes="1014608080" totalbytes="1073741824" percent="94" >
<soa freebytes="982396112" totalbytes="1041529856" percent="94" />
<loa freebytes="32211968" totalbytes="32211968" percent="100" />
</tenured>
<refs soft="7020" weak="2886" phantom="9" dynamicSoftReferenceThreshold="30" maxSoftReferenceThreshold="32
<pending-finalizers finalizable="75" reference="15" classloader="0" />
<time totalms="33.852" />
</af>
IBM GC Log – another format
<gc-op id="139" type="scavenge" timems="335.610" contextid="136"
timestamp="2016-06-15T15:51:10.128">
<scavenger-info tenureage="4" tenuremask="7ff0" tiltratio="58" />
<memory-copied type="nursery" objects="11071048" bytes="448013400"
bytesdiscarded="88016" />
<memory-copied type="tenure" objects="286673" bytes="9771936"
bytesdiscarded="320608" />
<copy-failed type="nursery" objects="286673" bytes="9771936" />
<finalization candidates="112" enqueued="16" />
<ownableSynchronizers candidates="8111" cleared="11" />
<references type="soft" candidates="1256" cleared="0" enqueued="0"
dynamicThreshold="32" maxThreshold="32" />
<references type="weak" candidates="2953" cleared="0" enqueued="0" />
<references type="phantom" candidates="142406" cleared="142335"
enqueued="142335" />
</gc-op>
GC Log format varies
• Java Vendor
• JVM Version
• GC Algorithm
• Arguments
gceasy.io
Universal GC log analyzer – http://gceasy.io
gceasy.io – REST API
GARBAGE COLLECTION LOG ANALYSIS API @Blog
Agenda
• Let’s learn to read 1 GC Log line
• Let’s learn to read 1 more GC Log line
• How many more GC Logs lines should I learn?
• Troubleshoot real world GC Logs
1: Long GC Pause
2: Poor Throughput
3: Memory Leak
4: Consecutive Full GCs
5: G1 GC – advanced info
ram@tier1app.com
On-site Training
Consulting
SPA (Scalability, Performance, Availability)
Services Offered
Ram Lakshmanan
Thank you
Follow Us:

More Related Content

What's hot

淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
Leon Chen
 
DIY Java Profiler
DIY Java ProfilerDIY Java Profiler
DIY Java Profiler
aragozin
 
Java profiling Do It Yourself
Java profiling Do It YourselfJava profiling Do It Yourself
Java profiling Do It Yourself
aragozin
 
Speeding up ps and top
Speeding up ps and topSpeeding up ps and top
Speeding up ps and top
Kirill Kolyshkin
 
Java Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame GraphsJava Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame Graphs
Brendan Gregg
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
Brendan Gregg
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
Brendan Gregg
 
On heap cache vs off-heap cache
On heap cache vs off-heap cacheOn heap cache vs off-heap cache
On heap cache vs off-heap cache
rgrebski
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
Brendan Gregg
 
Managing PostgreSQL with PgCenter
Managing PostgreSQL with PgCenterManaging PostgreSQL with PgCenter
Managing PostgreSQL with PgCenter
Alexey Lesovsky
 
Velocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFVelocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPF
Brendan Gregg
 
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...
Ontico
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
Brendan Gregg
 
USENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsUSENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame Graphs
Brendan Gregg
 
Java profiling Do It Yourself (jug.msk.ru 2016)
Java profiling Do It Yourself (jug.msk.ru 2016)Java profiling Do It Yourself (jug.msk.ru 2016)
Java profiling Do It Yourself (jug.msk.ru 2016)
aragozin
 
GitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons LearnedGitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons Learned
Alexey Lesovsky
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
Brendan Gregg
 
Debugging Distributed Systems - Velocity Santa Clara 2016
Debugging Distributed Systems - Velocity Santa Clara 2016Debugging Distributed Systems - Velocity Santa Clara 2016
Debugging Distributed Systems - Velocity Santa Clara 2016
Donny Nadolny
 
Java on Linux for devs and ops
Java on Linux for devs and opsJava on Linux for devs and ops
Java on Linux for devs and ops
aragozin
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
Brendan Gregg
 

What's hot (20)

淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
 
DIY Java Profiler
DIY Java ProfilerDIY Java Profiler
DIY Java Profiler
 
Java profiling Do It Yourself
Java profiling Do It YourselfJava profiling Do It Yourself
Java profiling Do It Yourself
 
Speeding up ps and top
Speeding up ps and topSpeeding up ps and top
Speeding up ps and top
 
Java Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame GraphsJava Performance Analysis on Linux with Flame Graphs
Java Performance Analysis on Linux with Flame Graphs
 
Designing Tracing Tools
Designing Tracing ToolsDesigning Tracing Tools
Designing Tracing Tools
 
Linux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF SuperpowersLinux 4.x Tracing Tools: Using BPF Superpowers
Linux 4.x Tracing Tools: Using BPF Superpowers
 
On heap cache vs off-heap cache
On heap cache vs off-heap cacheOn heap cache vs off-heap cache
On heap cache vs off-heap cache
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Managing PostgreSQL with PgCenter
Managing PostgreSQL with PgCenterManaging PostgreSQL with PgCenter
Managing PostgreSQL with PgCenter
 
Velocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFVelocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPF
 
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...Мастер-класс "Логическая репликация и Avito" / Константин Евтеев,  Михаил Тюр...
Мастер-класс "Логическая репликация и Avito" / Константин Евтеев, Михаил Тюр...
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
 
USENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame GraphsUSENIX ATC 2017: Visualizing Performance with Flame Graphs
USENIX ATC 2017: Visualizing Performance with Flame Graphs
 
Java profiling Do It Yourself (jug.msk.ru 2016)
Java profiling Do It Yourself (jug.msk.ru 2016)Java profiling Do It Yourself (jug.msk.ru 2016)
Java profiling Do It Yourself (jug.msk.ru 2016)
 
GitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons LearnedGitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons Learned
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Debugging Distributed Systems - Velocity Santa Clara 2016
Debugging Distributed Systems - Velocity Santa Clara 2016Debugging Distributed Systems - Velocity Santa Clara 2016
Debugging Distributed Systems - Velocity Santa Clara 2016
 
Java on Linux for devs and ops
Java on Linux for devs and opsJava on Linux for devs and ops
Java on Linux for devs and ops
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
 

Viewers also liked

Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming Replication
Alexey Lesovsky
 
G1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and TuningG1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and Tuning
Simone Bordet
 
RxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance ResultsRxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance Results
Brendan Gregg
 
Row Pattern Matching in SQL:2016
Row Pattern Matching in SQL:2016Row Pattern Matching in SQL:2016
Row Pattern Matching in SQL:2016
Markus Winand
 
Shell,信号量以及java进程的退出
Shell,信号量以及java进程的退出Shell,信号量以及java进程的退出
Shell,信号量以及java进程的退出
wang hongjiang
 
SREcon 2016 Performance Checklists for SREs
SREcon 2016 Performance Checklists for SREsSREcon 2016 Performance Checklists for SREs
SREcon 2016 Performance Checklists for SREs
Brendan Gregg
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
Brendan Gregg
 
Blazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBlazing Performance with Flame Graphs
Blazing Performance with Flame Graphs
Brendan Gregg
 

Viewers also liked (8)

Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming Replication
 
G1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and TuningG1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and Tuning
 
RxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance ResultsRxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance Results
 
Row Pattern Matching in SQL:2016
Row Pattern Matching in SQL:2016Row Pattern Matching in SQL:2016
Row Pattern Matching in SQL:2016
 
Shell,信号量以及java进程的退出
Shell,信号量以及java进程的退出Shell,信号量以及java进程的退出
Shell,信号量以及java进程的退出
 
SREcon 2016 Performance Checklists for SREs
SREcon 2016 Performance Checklists for SREsSREcon 2016 Performance Checklists for SREs
SREcon 2016 Performance Checklists for SREs
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
 
Blazing Performance with Flame Graphs
Blazing Performance with Flame GraphsBlazing Performance with Flame Graphs
Blazing Performance with Flame Graphs
 

Similar to Am I reading GC logs Correctly?

Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection Hero
Tier1app
 
Become a GC Hero
Become a GC HeroBecome a GC Hero
Become a GC Hero
Tier1app
 
Become a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsBecome a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day Devops
Tier1app
 
GC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash CourseGC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash Course
Tier1 app
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo Conference
Tier1app
 
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorJava Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Gurpreet Sachdeva
 
Gc crash course (1)
Gc crash course (1)Gc crash course (1)
Gc crash course (1)
Tier1 app
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?
C2B2 Consulting
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Erik Krogen
 
ELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log systemELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log system
Avleen Vig
 
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Jayesh Thakrar
 
Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!
Monica Beckwith
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
Prem Kuppumani
 
SOLR Power FTW: short version
SOLR Power FTW: short versionSOLR Power FTW: short version
SOLR Power FTW: short version
Alex Pinkin
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & Diagnostics
Dhaval Shah
 
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Monica Beckwith
 
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Spark Summit
 
Gc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linuxGc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linuxCuong Tran
 
Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016
Vsevolod Polyakov
 
Top-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
Tier1 app
 

Similar to Am I reading GC logs Correctly? (20)

Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection Hero
 
Become a GC Hero
Become a GC HeroBecome a GC Hero
Become a GC Hero
 
Become a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsBecome a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day Devops
 
GC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash CourseGC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash Course
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo Conference
 
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorJava Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
 
Gc crash course (1)
Gc crash course (1)Gc crash course (1)
Gc crash course (1)
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
 
ELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log systemELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log system
 
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
 
Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 
SOLR Power FTW: short version
SOLR Power FTW: short versionSOLR Power FTW: short version
SOLR Power FTW: short version
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & Diagnostics
 
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
Garbage First Garbage Collector (G1 GC) - Migration to, Expectations and Adva...
 
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
 
Gc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linuxGc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linux
 
Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016Мониторинг. Опять, rootconf 2016
Мониторинг. Опять, rootconf 2016
 
Top-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
 

Recently uploaded

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

Am I reading GC logs Correctly?

  • 1. Am I Reading GC Logs Correctly? Ram Lakshmanan Founder – GCEasy.io & FastThread.io
  • 2. Agenda • Let’s learn to read 1 GC Log line • Let’s learn to read 1 more GC Log line SUSPENSE
  • 3. How to enable GC Logging? -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<file-path> Rotate GC Log file from Java 6 Update 34 -XX:+UseGCLogFileRotation must be used with -Xloggc:<filename>; -XX:NumberOfGCLogFiles=<number of files> must be >=1, default is one; -XX:GCLogFileSize=<number>M (or K) default will be set to 512K. Best Practice: Enable ON all JVMs always
  • 4. GC Log 2016-03-21T13:46:58.371+0000: 500.203: [Full GC [PSYoungGen: 1047584K- >0K(1048064K)] [ParOldGen: 2097151K->865378K(2097152K)] 3144735K- >865378K(3145216K) [PSPermGen: 29674K->29634K(262144K)], 1.8485590 secs] [Times: user=3.17 sys=0.21, real=1.84 secs] 2 3 4 5 7 8 1 2 3 4 5 6 7 6 8 1 2016-03-21T13:46:58.371 – Timestamp at which GC event ran 500.203 – Number of seconds since application started Full GC – Type of GC PSYoungGen: 1047584K->0K(1048064K) – Young Gen size dropped from 1047584 (i.e.1gb) to 0k. Total allocated Young Gen size is 1048064K ParOldGen: 2097151K->865378K(2097152K) – Old Gen size dropped from 2097151 (i.e.1.99gb) to 865378K(i.e.845mb). Total allocated Old Gen size is 2097152k (i.e.2gb) 3144735K->865378K(3145216K) – overall heap size dropped from 3144735K (i.e.2.99gb) to 865378K (i.e.845mb) PSPermGen: 29674K->29634K(262144K) – Perm Gen Size dropped from 29674K to 29634K. Overall Perm Gen Size is 262144K (i.e.256mb) [Times: user=3.17 sys=0.21, real=1.84 secs]
  • 5. Unix command – “time”
  • 6. GC Time • Real is wall clock time – time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is waiting for I/O to complete). • Sys is the amount of CPU time spent in the kernel within the process. This means executing CPU time spent in system calls within the kernel, as opposed to library code, which is still running in user-space. Like ‘user’, this is only CPU time used by the process. • User is the amount of CPU time spent in user-mode code (outside the kernel) within the process. This is only actual CPU time used in executing the process. Other processes and time the process spends blocked do not count towards this figure. • User+Sys will tell you how much actual CPU time your process used. Note that this is across all CPUs, so if the process has multiple threads it could potentially exceed the wall clock time reported by Real. [Times: user=3.09 sys=0.00, real=3.10 secs] [Times: user=11.53 sys=1.38, real=1.03 secs] Typical for Serial GC
  • 7. Agenda • Let’s learn to read 1 GC Log line • Let’s learn to read 1 more GC Log line SUSPENSE
  • 8. 2015-09-14T12:32:24.398-0700: 0.356: [GC pause (G1 Evacuation Pause) (young), 0.0215287 secs] [Parallel Time: 20.0 ms, GC Workers: 8] [GC Worker Start (ms): Min: 355.9, Avg: 356.3, Max: 358.4, Diff: 2.4] [Processed Buffers: Min: 0, Avg: 1.1, Max: 5, Diff: 5, Sum: 9] : : [Free CSet: 0.0 ms] [Eden: 12.0M(12.0M)->0.0B(14.0M) Survivors: 0.0B->2048.0K Heap: 12.6M(252.0M)- >7848.3K(252.0M)] [Times: user=0.08 sys=0.00, real=0.02 secs] 1 2 3 5 6 4 G1 GC Log Format 1 2 3 4 5 6 2015-09-14T12:32:24.398-0700: 0.356 – indicates the time at which this GC event fired. Here 0.356 indicates that 356 milliseconds after the Java process was started this GC event was fired. GC pause (G1 Evacuation Pause) — Evacuation Pause is a phase where live objects are copied from one region (young or young + old) to another region. (young) – indicates that this is a Young GC event. GC Workers: 8 – indicates the number of GC worker threads. [Eden: 12.0M(12.0M)->0.0B(14.0M) Survivors: 0.0B->2048.0K Heap: 12.6M(252.0M)->7848.3K(252.0M)] – This line indicates the heap size changes: Eden: 12.0M(12.0M)->0.0B(14.0M) - indicates that Eden generation’s capacity was 12mb and all of the 12mb was occupied. After this GC event, young generation occupied size came down to 0. Target Capacity of Eden generation has been increased to 14mb, but not yet committed. Additional regions are added to Eden generation, as demands are made. Survivors: 0.0B->2048.0K - indicates that Survivor space was 0 bytes before this GC event. But after the event Survivor size increased to 2048kb. It indicates that objects are promoted from Young Generation to Survivor space. Heap: 12.6M(252.0M)->7848.3K(252.0M) – indicates that capacity of heap size was 252mb, in that 12.6mb was utilized. After this GC event, heap utilization dropped to 7848.3kb (i.e. 5mb (i.e. 12.6mb – 7848.3kb) of objects has been garbage collected in this event). And heap capacity remained at 252mb. Times: user=0.08, sys=0.00, real=0.02 secs
  • 9. Agenda • Let’s learn to read 1 GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line SUSPENSE
  • 10. Agenda • Let’s learn to read 1 GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line • Let’s learn to read 1 more GC Log line
  • 11. Agenda • Let’s learn to read 1 GC Log line • Let’s learn to read 1 more GC Log line • How many more GC Logs lines should I learn? • Troubleshoot real world GC Logs
  • 13. G1 GC Log - another format 53957.956: [GC pause (G1 Evacuation Pause) (young) 104M- >49M(118M), 0.0020080 secs]
  • 14. CMS Log format Before GC: Statistics for BinaryTreeDictionary: ------------------------------------ Total Free Space: 2524251 Max Chunk Size: 2519552 Number of Blocks: 13 Av. Block Size: 194173 Tree Height: 8 2016-05-03T04:27:37.503+0000: 30282.678: [ParNew Desired survivor size 214728704 bytes, new threshold 1 (max 1) - age 1: 85782640 bytes, 85782640 total : 3510063K->100856K(3774912K), 0.0516290 secs] 9371816K->6022161K(14260672K)After GC: Statistics for BinaryTreeDictionary: ------------------------------------ Total Free Space: 530579346 Max Chunk Size: 332576815 Number of Blocks: 7178 Av. Block Size: 73917 Tree Height: 44 After GC: Statistics for BinaryTreeDictionary: ------------------------------------ Total Free Space: 2524251 Max Chunk Size: 2519552 Number of Blocks: 13 Av. Block Size: 194173 Tree Height: 8 , 0.0552970 secs] [Times: user=0.67 sys=0.00, real=0.06 secs] Heap after GC invocations=5898 (full 77): par new generation total 3774912K, used 100856K [0x000000047ae00000, 0x000000057ae00000, 0x000000057ae00000) eden space 3355520K, 0% used [0x000000047ae00000, 0x000000047ae00000, 0x0000000547ae0000) from space 419392K, 24% used [0x0000000547ae0000, 0x000000054dd5e328, 0x0000000561470000) to space 419392K, 0% used [0x0000000561470000, 0x0000000561470000, 0x000000057ae00000) concurrent mark-sweep generation total 10485760K, used 5921305K [0x000000057ae00000, 0x00000007fae00000, 0x00000007fae00000) concurrent-mark-sweep perm gen total 49380K, used 29537K [0x00000007fae00000, 0x00000007fde39000, 0x0000000800000000) }
  • 15. IBM GC Log format <af type="tenured" id="4" timestamp="Jun 16 11:28:22 2016" intervalms="5633.039"> <minimum requested_bytes="56" /> <time exclusiveaccessms="0.010" meanexclusiveaccessms="0.010" threads="0" lastthreadtid="0xF6B1C400" /> <refs soft="7232" weak="3502" phantom="9" dynamicSoftReferenceThreshold="30" maxSoftReferenceThreshold="32 <tenured freebytes="42949632" totalbytes="1073741824" percent="3" > <soa freebytes="0" totalbytes="1030792192" percent="0" /> <loa freebytes="42949632" totalbytes="42949632" percent="100" /> </tenured> <pending-finalizers finalizable="0" reference="0" classloader="0" /> <gc type="global" id="6" totalid="6" intervalms="3342.687"> <classunloading classloaders="0" classes="0" timevmquiescems="0.000" timetakenms="1.200" /> <finalization objectsqueued="75" /> <timesms mark="28.886" sweep="1.414" compact="0.000" total="31.571" /> <tenured freebytes="1014673616" totalbytes="1073741824" percent="94" > <soa freebytes="982461648" totalbytes="1041529856" percent="94" /> <loa freebytes="32211968" totalbytes="32211968" percent="100" /> </tenured> </gc> <tenured freebytes="1014608080" totalbytes="1073741824" percent="94" > <soa freebytes="982396112" totalbytes="1041529856" percent="94" /> <loa freebytes="32211968" totalbytes="32211968" percent="100" /> </tenured> <refs soft="7020" weak="2886" phantom="9" dynamicSoftReferenceThreshold="30" maxSoftReferenceThreshold="32 <pending-finalizers finalizable="75" reference="15" classloader="0" /> <time totalms="33.852" /> </af>
  • 16. IBM GC Log – another format <gc-op id="139" type="scavenge" timems="335.610" contextid="136" timestamp="2016-06-15T15:51:10.128"> <scavenger-info tenureage="4" tenuremask="7ff0" tiltratio="58" /> <memory-copied type="nursery" objects="11071048" bytes="448013400" bytesdiscarded="88016" /> <memory-copied type="tenure" objects="286673" bytes="9771936" bytesdiscarded="320608" /> <copy-failed type="nursery" objects="286673" bytes="9771936" /> <finalization candidates="112" enqueued="16" /> <ownableSynchronizers candidates="8111" cleared="11" /> <references type="soft" candidates="1256" cleared="0" enqueued="0" dynamicThreshold="32" maxThreshold="32" /> <references type="weak" candidates="2953" cleared="0" enqueued="0" /> <references type="phantom" candidates="142406" cleared="142335" enqueued="142335" /> </gc-op>
  • 17. GC Log format varies • Java Vendor • JVM Version • GC Algorithm • Arguments
  • 18. gceasy.io Universal GC log analyzer – http://gceasy.io
  • 19. gceasy.io – REST API GARBAGE COLLECTION LOG ANALYSIS API @Blog
  • 20. Agenda • Let’s learn to read 1 GC Log line • Let’s learn to read 1 more GC Log line • How many more GC Logs lines should I learn? • Troubleshoot real world GC Logs
  • 21. 1: Long GC Pause
  • 25. 5: G1 GC – advanced info
  • 26. ram@tier1app.com On-site Training Consulting SPA (Scalability, Performance, Availability) Services Offered Ram Lakshmanan

Editor's Notes

  1. Doubtful on #3.