开发者

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

开发者 https://www.devze.com 2023-03-03 23:20 出处:网络
I have a CI System setup based on Jenkins on a Windows 2003 server box (8cores, 16GB 8 of which are on \'standby\' according to the Resource Monitor).

I have a CI System setup based on Jenkins on a Windows 2003 server box (8cores, 16GB 8 of which are on 'standby' according to the Resource Monitor). There are two main jobs configured, both based on multi module projects.

I suspecting that the build performance could be improved by tweaking the memory settings (-xmx) of the builds. But there are just to many places to configure stuff and not enough places to monitor success. So my questions are:

  • How can I connect with JConsole, or JVisualVm with jenkins and the build jobs, in order to analyze what it is going on in memory.

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

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

  • What might be reasonabl开发者_JS百科y values for such a setup

  • What is the best way to change these settings.

  • What other settings should I look into?


Jenkins uses the default VM settings if you have started Jenkins via java -jar jenkins.war otherwise if you started jenkins via Tomcat etc. the defaults are coming via Tomcat (Jetty or whatever). In tomcat you can set JAVA_OPTS before Tomcat starts to define things like this.

Furthermore the settings for Maven can be controled by MAVEN_OPTS environment variable which can be set for each build in Jenkins as well. Take a look into the Job configuration for you job. The reasonably values for such setup depend on what your build does which i don't know.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号