Question

I want to configure java PermGen option for jenkins.

in search web, I found article which write:

set java_opts JAVA_OPTS="-server -XX:PermSize=128M -XX:MaxPermSize=256m" 

other article says:

set java args JAVA_ARGS="-XX:MaxPermSize=512m -Xms512m -Xmx1024m"

Are each options valid? if not, what is the difference?

Was it helpful?

Solution 2

The only thing that is important is what the actual arguments are in the "-XX:MaxPermSize=512m -Xms512m -Xmx1024m".

What you call the environment variables is up to you for the most part, it is whatever the scripts you want to use it are expecting.

OTHER TIPS

Java applications are usually called by a startup script with a command like java $JAVA_ARGS $JAVA_OPTS -jar application.jar

Both variables are JVM options and they're both given to the application.

It is (unfortunately) not uncommon to have a list of 10 general options + 10 optimizations options so they're split across 2 variables for readability.

PermGen settings are considered garbage collector optimizations. They go in JAVA_OPTS. You should check that the jenkins script is using both variables as expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top