• Welcome to KonaKart Community Forum. Please login or sign up.
 

Could not reserve enough space for object heap

Started by costis, September 22, 2010, 10:12:40 pm

Previous topic - Next topic

costis

I try to install the latest KonaKart5 64-bit version on a 64-bit CentOS 5 VPS system.
I have installed the latest 64-bit Sun-JDK and run the following script:

./KonaKart-5.0.0.0-tabaseType mysql \
                  -DDatabaseUrl jdbc:mysql://localhost:3306/gp?zeroDateTimeBehavior=convertToNull \
                  -DDatabaseUsername root \
                  -DDatabasePassword aPassword \
                  -DDatabaseDriver com.mysql.jdbc.Driver \
                  -DInstallationDir /usr/local/konakart \
                  -DLoadDB 1 \
                  -DJavaJRE /usr/java/jdk1.6.0_21/jre \
                  -DPortNumber 8780

After starting konakart using the demo data, KonaKart works almost fine.

Konakartadmin, on the other hand refuses to start and gives the following error:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

I tried to fiddle with -Xmx256m -Xms256m, using higher values as well as lower values, but nothing seems to make it work.

Has anybody seen this problem before?

costis

Sorry, the first two lines of the script are like this:

./KonaKart-5.0.0.0-Linux-Install-64 -S \
                  -DDatabaseType mysql \

costis

Could the silent mode installation script of the 64bit Konakart be broken?
I installed, with more or less the same command, the 32bit version
and now konakartadmin runs perfectly well. 

Brian

No, I don't think there's any problem with the 64bit installer.
It looks like you're just not able to allocate enough heap.
I'm sure if you looked into the options on the JVM for specifying the memory on a 64bit machine you would be able to get it to work... and you also need to ensure that your process is allowed to use the amount of memory you try to allocate... check the ulimit etc..

costis

Thank you Brian!
You are absolutely right! I just wanted to post a new reply about it, but you were faster.

There has been a Virtuozzo-configuration issue by the provider, which was later repaired.

In the mean time we installed the 32-bit Konakart with the 32-bit Sun-JDK successfully on a 64-bit CentOS5.
Everything seems to be running smoothly and very fast too.

Do you think we should bother and switch everything to 64-bit?

Brian

That's a difficult question!  With the 64' version you will use more memory but have the potential to address more memory.   
My guess is that you won't see a gain in performance...   You can read different opinions on this... This article is from 2006 but shows quite an interesting set of results:  http://blogs.sun.com/dagastine/entry/java_6_leads_out_of

Given that you probably don't need to address more memory than the 32bit version can comfortably support, and the performance gains are likely to be minimal (and could very well be worse!), I would stay where you are on the 32-bit version.

If you ever did benchmarks using KonaKart on the 32-bit and 64-bit JDKs it would be very interesting to see the results showing memory consumption and performance.