java
Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20-03-2012, 10:02
mikycol mikycol is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Default Launch JBoss skipping the memory test

I have a virtual machine on Hyper-V configured with memory in dynamic mode, when an application requires the use of memory is automatically increased. I configured JBoss as a service, but when I try to run it by mistake because I had not enough memory. Is there a way to launch JBoss ignoring the memory check?
thanks
Reply With Quote
  #2  
Old 20-03-2012, 10:30
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,126
Default

Dear mikycol,

I am not completely sure I understand your question. What memory check are you talking about?

JBoss (actually the underlying JVM) runs with fixed-size memory pools. So if you are short on memory you can give JBoss a smaller heap (with the -Xmx command line argument).

Kees Jan
Reply With Quote
  #3  
Old 20-03-2012, 11:02
mikycol mikycol is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Default

The service I have to install one requires the use of the following parameters for JBoss (-Xms1024m-Xmx2048m).
Quote:
================================================== =============================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: D:\jboss\bin\\..
.
JAVA: C:\Java\jdk1.5.0_22\bin\java
.
JAVA_OPTS: -Dprogram.name=run.bat -Xms1024m -Xmx2048m
.
CLASSPATH: D:\jboss\server\default\libPDDO\saaj.jar;C:\Java\j dk1.5.0_22\lib\to
ols.jar;D:\jboss\bin\\run.jar
.
================================================== =============================
.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Reply With Quote
  #4  
Old 20-03-2012, 11:14
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,126
Default

Dear mikycol,

The problem seems to be that your JVM cannot allocate the 1GB memory for the start size (-Xms flag). It tries to allocate that memory as a single block. You could try to remove that flag and let the JVM start with whatever it likes.

If it does start (I am not sure it will), I think you will get unexpected JVM memory allocation errors later on.

If you are this starved for RAM, perhaps you need to add more memory to the machine? RAM is quite cheap these days.

Kees Jan
Reply With Quote
  #5  
Old 20-03-2012, 11:17
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,126
Default

Another question, are you using a 32-bit system?
Reply With Quote
  #6  
Old 20-03-2012, 11:23
mikycol mikycol is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Default

I thought the same problem but now my server has 4GB of RAM that are allocated dynamically on demand. If I configure with-Xmx1024m-Xms1024m jboss start without problems.

The server has the following characteristics:
OS: Windows Server 2003 Standard x64 SP2
CPU: 2x Intel Xeon X3323@2.50GHz
Ram: 4GB (dynamically)
HD: 200GB
Everything is a virtual machine on Hyper-V
Reply With Quote
  #7  
Old 20-03-2012, 11:33
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,126
Default

Dear mikycol,

Perhaps the issue is not the availability of memory, but the availability of one, contiguous block of memory. You could have plenty of free memory and still not be able to allocation 2GB as one block.

Instead, could you try -Xmx2048m -Xms2048m. This forces the JVM to get all memory in one go and perhaps the hypervisor will allocate it as one block.

Kees Jan
Reply With Quote
  #8  
Old 20-03-2012, 11:37
mikycol mikycol is offline
Junior Member
 
Join Date: May 2010
Posts: 9
Default

I just did a test, but it seems that the JVM is unable to trigger the memory increase.
I will be forced to eliminate the option of dynamic memory and put it as fixed.

Thanks for the help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump