简体   繁体   中英

Increase the heap memory of jboss

I am trying to increase the heap memory of my jboss server.

So I am changing in jboss-5.1.0.GA\\bin\\run.conf file :

set "JAVA_OPTS=-Xms1024M -Xmx2048M -XX:MaxPermSize=2048M -XX:MaxHeapSize=2048M"

but when I run jboss server it display me :

INFO  [ServerInfo] VM arguments: -Dprogram.name=JBossTools: JBoss 5.1 Runtime -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=D:\jboss-5.1.0.GA\lib\endorsed -Dfile.encoding=Cp1252 

So what is reason behind it?

I don't know actually memory is increase or not ?

尝试这个

"JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx2048m"

Using SET is only valid for the current CMD session which means the JAVA_OPTS variable you have defined will only be visible to JBoss if you start the server in the same CMD session.

As you are starting JBoss through eclipse, you will need to set the environment variable differently.

Not sure what version of Windows you have but in XP (old school), you can go to Control Panel->System and under Advanced, there should be an option to edit environment variables. Add your JAVA_OPTS variable here, restart eclipse and then launch JBoss again.

[Edit]

For Windows 7, see this link to help setting JAVA_OPTS variable: http://www.itechtalk.com/thread3595.html

variable name : JAVA_OPTS
variable value : %JAVA_OPTS% -Xms1024M -Xmx2048M -XX:MaxPermSize=2048M -XX:MaxHeapSize=2048M

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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