[英]how to extend Java Virtual Memory in CentOS?
as I wrote on the title, I want to extend Virtual Memory while performing my java code. 正如我在标题上所写的那样,我想在执行Java代码时扩展虚拟内存。 currently, I'm writing a code for word Analyzer.
目前,我正在为字分析器编写代码。 In eclipse if there are 1000 number of inputs then it gives 1000 fine outputs.
在日食中,如果有1000个输入,则给出1000个精细输出。 however when I run it from a server, it gives 80% outputs and 20% for null.
但是,当我从服务器运行它时,它提供80%的输出,而20%为null。 after that I asked this problem to someone I know and he said it is because of small size of Virtual Memory in the server.
之后,我问了一个我认识的人这个问题,他说这是因为服务器中虚拟内存的大小很小。
I normally run the java program with .sh file and content of the .sh file is written as below. 我通常使用.sh文件运行Java程序,并且.sh文件的内容编写如下。
export JAVA_HOME="usr/lib/jvm/java-1.6.0-openjdk.x86_64"
PATH=$PATH:JAVA_HOME/jre/bin
export JAVA_HOME
java -cp /home/account/count_con.jar countConversation.countCon_Starter &
and then type "bash .sh file". 然后键入“ bash .sh文件”。
Please give me your kind advice for how to run java code with extra Virtual memory size in server(OS:CentOS). 请给我有关如何在服务器(OS:CentOS)中运行具有额外虚拟内存大小的Java代码的建议。
Thank you 谢谢
after java command set the flag -Xmx size m 在java命令设置标志-Xmx size后
FYI 费耶
Xms is initial Java heap size Xms是初始Java堆大小
Xmx is maximum Java heap size Xmx是最大Java堆大小
Xss is java thread stack size XSS是Java线程堆栈大小
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.