sonar findbugs heap size

三世轮回 提交于 2019-11-29 10:51:42
barfuin

Yes, the sonar findbugs executor can use a lot of RAM if the analyzed code base is large.

You will have to increase not only the heap size available to the JVM, but also "MaxPermSize" and "ReservedCodeCacheSize" (at least for the Java Hotspot VM). The JVM options must be set on the JVM which is actually executing the FindBugs sonar executor. So probably not the Jenkins VM, but the one that Jenkins starts for the job.

Here's an example for a 64bit system:

-Xmx3062m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m

On a 32bit system, which I am assuming you are using, you would go for lower values, such as:

-Xmx1536m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=128m

Also, if Jenkins won't accept the JVM options, you can try running sonar using the sonar ant task from Jenkins. (That's what I am doing, and I can set as much memory as I like.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!