Java on Link2
I have a link2 plan and have been trying to get Java to run.
I have read all the threads in this forum, jeveloper's blog and numerous other Internet offerings. However despite what exotic jvm parameters i set java will not load and in all situations will simply state.
[root@vps bin]# ./java -client
Picked up _JAVA_OPTIONS: -Xms4m -Xmx8m
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Btw this is the same result on ubuntu, debian and fedora core.
On each attempt to run java the failcnt will increase on privvmpages indicating that the jvm is trying to reserve more memory than i have specified. Yes I know jvm has other memory requirements in addition to those of heap allocation but they should not be this vast.
resource held maxheld barrier limit failcnt
privvmpages 5864 16613 29720 29720 2
My impression from what I have observed and read from the various sources is that Sun Java is simply not compatible with OpenVZ in a highly memory restricted environment. With openVZ not hiding the underlying system resources and Java not doing what it is told when it sees vast amounts of resources.
This kinda sucks in my opinion as its not unreasonable to expect to run a simple Java process with 108mb of memory free.
If anyone has had any success in running Sun Java on a link2 plan I would love to hear *exactly* how, and if anyone could assure me that if I upgrade to link3 plan I would be able to get Java running. Or if anyone has any additional thoughts into how to reign in the JVM to doing what it is told.
|