[Box-Admins] How does Jenkins start?

Frank Shearar frank.shearar at gmail.com
Sun Feb 9 23:03:37 UTC 2014


<snip>

Just so people know what I've been hacking on, Tony Garnock-Jones and
I have seen many builds fail because PermGen runs out of space. This
is a GC generation where the JVM stores class definitions. In vanilla
Java classes only get set up at the start of a process, usually, so
doesn't cause a problem. Script-y languages (and we use Groovy to
trigger builds) generate classes at runtime... and that's a memory
leak.

So I've added to the JAVA_ARGS in /etc/defaults/jenkins the arguments
"-XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled".

These allow classes to be unloaded. (I don't know why, but if you want
CMSClassUnloadingEnabled to actually work, you _must_ also use
UseConcMarkSweepGC. (An ex colleague of mine told me this _should_ be
the default GC: it's simply much better, and he can't understand why
it's not.)

Hopefully this will (a) result in a leaner Jenkins process and (b)
(more importantly) improve the stability of the build processes.

Thanks to Ken & David for their help, as always.

frank


More information about the Box-Admins mailing list