Upload
haim-yadid
View
211
Download
2
Embed Size (px)
Citation preview
Reversim Summit 2015 JVM Garbage Collection logs, you
do not want to ignore them!
Haim Yadid - Performize-IT
About Me: Haim Yadid•22 Years of SW development experience •Performance Expert •Consulting R&D •Training
http://il.linkedin.com/in/haimyadid
www.performize-it.comblog.performize-it.com
https://github.com/lifey
@lifeyx
Logging GC activity
Add the following to the command line -XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+PrintGCDateStamps
-Xloggc:<logfile>
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
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