Java VM 因堆大小增加而失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33365237/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 21:34:07  来源:igfitidea点击:

Java VM fails with heap size increase

javajvm

提问by Tom

S0 the command I am trying to run is;

S0 我试图运行的命令是;

java -jar -Xmx290G  /ibers/ernie/home/thh32/rumenISPG/GenomeAnalysisTK.jar  -T VariantFiltration -R Contigs_1.fa  -V Rank10_clean.fasta.gz.Contig_1-sort.bam.vcf1.vcf  --filterExpression "QD < 2.0 || FS > 60.0 || MQ < 40.0 || HaplotypeScore > 13.0 || MappingQuality RankSum < -12.5 "  --filterName "testing_filter"  -o filtered_snps.vcf

The machine I am running it on has access to 500G RAM so shouldnt be an issue, however I keep getting this error message;

我正在运行它的机器可以访问 500G RAM,所以应该不是问题,但是我不断收到此错误消息;

Error occurred during initialization of VM
Unable to allocate 9502720KB bitmaps for parallel garbage collection for the requested 304087040KB heap.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Has anyone else experienced this issue and if so did you resolve it?

有没有其他人遇到过这个问题,如果有,你解决了吗?

Oh also just incase people wonder why I am giving this program so much memory, when I didnt I got this message which indicates that it needs more RAM. This was with 100G heaps size.

哦也只是为了防止人们想知道为什么我给这个程序这么多内存,当我没有收到这条消息时,表明它需要更多的内存。这是 100G 的堆大小。

INFO  09:55:57,953 HelpFormatter - --------------------------------------------------------------------------------- 
INFO  09:55:57,955 HelpFormatter - The Genome Analysis Toolkit (GATK) v3.4-46-gbc02625, Compiled 2015/07/09 17:38:12 
INFO  09:55:57,956 HelpFormatter - Copyright (c) 2010 The Broad Institute 
INFO  09:55:57,956 HelpFormatter - For support and documentation go to http://www.broadinstitute.org/gatk 
INFO  09:55:57,961 HelpFormatter - Program Args: -T VariantFiltration -R Contigs_1.fa -V Rank10_clean.fasta.gz.Contig_1-sort.bam.vcf1.vcf --filterExpression QD < 2.0 || FS > 60.0 ||
 MQ < 40.0 || HaplotypeScore > 13.0 || MappingQuality RankSum < -12.5  --filterName testing_filter -o filtered_snps.vcf 
INFO  09:55:57,967 HelpFormatter - Executing as thh32@node011 on Linux 2.6.32-504.30.3.el6.x86_64 amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_40-b26. 
INFO  09:55:57,968 HelpFormatter - Date/Time: 2015/10/27 09:55:57 
INFO  09:55:57,968 HelpFormatter - --------------------------------------------------------------------------------- 
INFO  09:55:57,969 HelpFormatter - --------------------------------------------------------------------------------- 
INFO  09:55:58,474 GenomeAnalysisEngine - Strictness is SILENT 
##### ERROR ------------------------------------------------------------------------------------------
##### ERROR A USER ERROR has occurred (version 3.4-46-gbc02625): 
##### ERROR
##### ERROR This means that one or more arguments or inputs in your command are incorrect.
##### ERROR The error message below tells you what is the problem.
##### ERROR
##### ERROR If the problem is an invalid argument, please check the online documentation guide
##### ERROR (or rerun your command with --help) to view allowable command-line arguments for this tool.
##### ERROR
##### ERROR Visit our website and forum for extensive documentation and answers to 
##### ERROR commonly asked questions http://www.broadinstitute.org/gatk
##### ERROR
##### ERROR Please do NOT post this error to the GATK forum unless you have really tried to fix it yourself.
##### ERROR
##### ERROR MESSAGE: There was a failure because you did not provide enough memory to run this program.  See the -Xmx JVM argument to adjust the maximum heap size provided to Java
##### ERROR ------------------------------------------------------------------------------------------

Thanks, Tom

谢谢,汤姆

回答by Bhushan Karmarkar

Reduce the values in Xms and Xmx parameters in JAVA_OPTS. Set the values based on how much is required for your application and considering available RAM space.

减少 JAVA_OPTS 中 Xms 和 Xmx 参数中的值。根据您的应用程序需要多少并考虑可用 RAM 空间来设置值。