1

Skype Chat

[10:27:47 PM] Koby: Xen is better for Java anyway
[10:28:11 PM] ME: does java have issues in other virts?
[10:28:47 PM] Koby: OpenVZ, yes.
[10:29:03 PM] ME: any reason why?
[10:29:04 PM] Koby: Crashes a lot.
[10:29:16 PM] Koby: It's very unstab
[10:29:17 PM] Johnson @ SolidShellSecurity.com: Koby, what server is your OpenVZ Container on?

Does Java have issues under OpenVZ? If so what makes OpenVZ different from other virts?

I've never heard of this until now and was very curious as to how true this is.

2 Answers2

0

There is major difference in memory mangement between Xen and OpenVZ.

In OpenVZ memory is assigned to hosts "dynamically", if some host is not using memory - that memory can be used by another virtual host.

In Xen - there is "fixed" area of memory that virtual machine can use and that memory cannot be taken away.

If you want to run java applications that use a lot of memory - it would be better/easier to use Xen. If you have control over OpenVZ host - I guess it's possible to configure memory management somehow to avoid problems like this.

Kamil
  • 2,686
0

common issue with Java on OpenVZ is:

-bash-3.00# /usr/java/jre1.5.0_06/bin/java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

See cat /proc/user_beancounters parameter privvmpages. It allows controlling the amount of memory allocated by applications.

You need to increase it in order to tun Java and this possible only from OpenVZ admin (( So you need to contact with your VPS hoster support to make this changes or switch to KVM/another hoster.

More reading at:

gavenkoa
  • 2,154