简体   繁体   English

Maven和Fortify如何确定要使用多少内存?

[英]How do Maven and Fortify determine how much memory to use?

I am using the Fortify SCA plugin with Maven 3.2.1 to scan a pretty large Java webapp. 我正在使用带有Maven 3.2.1的Fortify SCA插件来扫描相当大的Java webapp。

  1. I have a custom .bat file that sets up my all my environment variables and makes a call to mvn.bat to start the scan. 我有一个自定义.bat文件,用于设置我的所有环境变量,并调用mvn.bat来启动扫描。
  2. Then mvn.bat reads my pom.xml and finds the custom profiles for clean, translate, and scan and then calls sourceanalyzer. 然后mvn.bat读取我的pom.xml并找到clean,translate和scan的自定义配置文件,然后调用sourceanalyzer。

The trouble is, it never seems like sourceanalyzer uses the full amount of memory that I grant it in either the custom bat file or the pom file. 麻烦的是,似乎sourceanalyzer似乎没有使用我在自定义bat文件或pom文件中授予它的全部内存。 This machine has 16GB of RAM, and when the scan is done 18-20 hours later it will print "memory used: 317 MB" and the report has a bunch of Out of Memory warnings. 这台机器有16GB的RAM,当扫描完成18-20小时后,它将打印“使用的内存:317 MB”,并且报告有一堆内存不足的警告。 This machine is doing nothing besides this scan, and while it's running the Task Manager shows that something is using a bunch of memory. 除了这次扫描之外,这台机器什么也没做,当它运行时,任务管理器显示某些东西正在使用一堆内存。

The error message is "Scan progress is slowing due to JVM garbage collection." 错误消息“由于JVM垃圾回收,扫描进度正在减慢”。

My MAVEN_OPTS: 我的MAVEN_OPTS:

  • -Xmx4096m -Xmx4096m
  • -XX:MaxPermSize=1024m -XX:MaxPermSize参数=1024米
  • -Dfortify.sca.64bit=true -Dfortify.sca.64bit =真
  • -Dfortify.sca.Xmx=8000m -Dfortify.sca.Xmx =8000米
  • -DskipTests=true -DskipTests =真
  • -Dfortify.sca.verbose=true -Dfortify.sca.verbose =真

I need to figure out how to both speed this scan up and remove the memory warnings. 我需要弄清楚如何加快扫描速度并删除内存警告。

Thanks 谢谢

You can try using the SCA memory variable option. 您可以尝试使用SCA内存变量选项。 Set: 组:

SCA_VM_OPTS=-Xmx8000M SCA_VM_OPTS = -Xmx8000M

You can also try posting Fortify issues to their online forum at https://protect724.hp.com . 您也可以尝试将Fortify问题发布到他们的在线论坛https://protect724.hp.com The support group monitors those forums. 支持小组监督这些论坛。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM