How to debug and tune the memory settings of my jenkins maven assembly

I have a Jenkins-based CI system setup on a Windows 2003 server (8 cells, 16 GB 8 of which are in standby mode according to the Resource Monitor). There are two main tasks based on projects with several modules.

I suspect that assembly performance may be improved by tuning memory settings (-xmx) in assemblies. But there are only in many places to set things up and not enough places to monitor success. So my questions are:

  • How can I connect to JConsole or JVisualVm using jenkins and build jobs to analyze what is happening in memory.

  • What are the default settings for jenkins for maximum heap size

  • What are the default settings for maven for maximum heap size

  • What could be a reasonable value for such a setting

  • What is the best way to change these settings.

  • What other settings should I look for?

+4
source share
2 answers

Jenkins uses the default virtual machine settings if you started Jenkins through java -jar jenkins.war, otherwise, if you started jenkins through Tomcat, etc., by default they go through Tomcat (Jetty or something else). In tomcat, you can set JAVA_OPTS before Tomcat begins to detect such things.

In addition, settings for Maven can be controlled by the MAVEN_OPTS environment variable, which can be set for each build in Jenkins. View the Job configuration for your job. Reasonable values ​​for such an installation depend on what your build is doing, which I don't know about.

+2
source

If you install Jenkins monitoring https://wiki.jenkins-ci.org/display/JENKINS/Monitoring through Manage Jenkins / Plugin Manager, then it is easy to get memory usage information through Javamelody http://code.google.com/p/ javamelody / .

+1
source

All Articles