Yet another java heap space question

Hello KNIMErs,

I am working on a Windows 7 Pro SP1 x64 PC with 16 GB of RAM.

If I set -Xmx beyond 1024m, KNIME will not start and the message "Failed to create java virtual machine" will be displayed. In the Windows Resource Monitor, I have more than 10 GB of RAM available (13650 free).

Anybody has an idea what I should do to have access to 8 GB of RAM in KNIME?

I thought that -Xmx8192m would do the trick but it does not.

Cheers,

Fred

Hi Fred,

Actually -Xmx8192m or -Xmx8G should work. Could you post your knime.ini? Maybe it helps finding out whats going wrong.

Cheers,

Christian

 

Hello Christian,

I suspect the version of KNIME was the 32 bit version installed on an x64 architecture. My suspicion is based on the .ini that stated the launcher.library to be x86, when the current version now states x86_64.

I overwrote the version of KNIME I had with one I was sure was x64 and it is now working ok.

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-vmargs
-Xmx12288m
-XX:MaxPermSize=1024m
-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-Dknime.enable.fastload=true

Thanks for your reply, Christian.

Cheers,

Fred

I have occassionally similar problem when I want to assign more than 1024m to -Xmx

Sometimes I can successfully assign -Xmx1300m and run the program. But sometimes it gives me 'Failed to create java virtual machine' error message. I check the resource monitor and I have enough memory. 

I run windows 7 32-bit architecture. 

Do you have any idea why there are some inconsistency?

 

Copy of my knime.ini file: 

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-vmargs
-Xmx1024m
-XX:MaxPermSize=256m
-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-Dknime.enable.fastload=true
-Djava.library.path=C:\Program Files\R\R-3.1.0\library\rJava\jri\i386

 

This is a strange Windows behaviour. I won't give Java the memory it requests. Ask Microsoft for details ;-)

:-)

I find it pretty strange since sometimes it works and sometimes it doesn't.

I have been trying to close all programs and it does not always solve the case.

Misterious case of JVM.

It is possible the OS memory is fragmented and it cannot find large enough segment of continuous memory for Java (though I am just speculating, I use 64 OSes almost exclusively on PCs). Probably you can close other programs and start them after successfully started KNIME.

Hi,

ubuntu (32-bit) user here.

I have the same problem when I set my -Xmx higher than 2048m, which is strange cause I got 16g RAM all in all.

Earlier I got the same "Failed to create java virtual machine" pop up message as Fred did. Now (starting knime from the terminal) I get the console message "Failed to create java virtual machine".

Turns out it's not only a Windows thing. Maybe my report helps for further development.

Or maybe someone got an idea about that?

Cheers,

Manu

You cannot use more than ~1500MB RAM for 32-bit applications. Therefore Java refuses to start if you try to reserve 2GB heap size.