Tuning Jenkins GC For Responsiveness and Stability with Large Instances
This is a
cross
post by Sam Van Oort, Software Engineer at
CloudBees and contributor to the Jenkins project.
Today I’m going to show you how easy it is to tune Jenkins Java settings to
make your controllers more responsive and stable, especially with large heap sizes.
The Magic Settings:
Basics: -server -XX:+AlwaysPreTouch
GC Logging: -Xloggc:$JENKINS_HOME/gc-%t.log -XX:NumberOfGCLogFiles=5 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=20m -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy
G1 GC...