20
Reversim Summit 2015 JVM Garbage Collection logs, you do not want to ignore them! Haim Yadid - Performize-IT

JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summit 2015

Embed Size (px)

Citation preview

Reversim  Summit  2015      JVM  Garbage  Collection  logs,  you  

do  not  want  to  ignore  them!  

Haim Yadid - Performize-IT

3 2

1

About  Me:  Haim  Yadid•22 Years of SW development experience •Performance Expert •Consulting R&D •Training

http://il.linkedin.com/in/haimyadid

[email protected]

www.performize-it.comblog.performize-it.com

https://github.com/lifey

@lifeyx

GC

•You allocate • myObject = new MyClass(2015)

•GC cleans •So everything is cool !

Responsiveness?

Overhead

GCtime  —————  Total  Time  

Logging GC activity

Add the following to the command line -XX:+PrintGCDetails

-XX:+PrintGCTimeStamps

-XX:+PrintGCDateStamps

-Xloggc:<logfile>

When should I use it ?

Always In production ?

Log File Rotation

-XX:+UseGCLogFileRotation

Control log file size -XX:GCLogFileSize=1000

Number of log files -XX:NumberOfGCLogFiles=10

Starting from Java 7

Tuning Memory: Tuning GC

The GC Log

2014-03-04T14:58:04.184+0000: 112134.528: [Full GC [PSYoungGen: 1987780K->0K(266920448K)] [ParOldGen: 536855033K->340775638K(538269056K)] 538842813K->340775638K(805189504K) [PSPermGen: 38132K->38120K(67968K)], 310.6279200 secs]

[Times: user=5357.69 sys=2.73, real=310.64 secs]

Whats nice about GC log

They are not human readable Takes time and knowledge to understand

Not machine readable Good luck writing a parser

GCViewer

JClarity: Censum

Commercial product

What can we do about it ?

So what are we doing with it?

Overhead should be less than 5% Usually high overhead is due to heap too small Make your heap larger and reduce overhead

So what are we doing with it?

shenandoah

reduce  footprint

Tune    JVM