Java on OpenVZ

Ask any Prometeus related question !
J2R
Posts: 8
Joined: Wed Sep 05, 2012 12:28 pm

Java on OpenVZ

Post by J2R » Wed Sep 05, 2012 12:38 pm

I currently have one of your KVM7 VPS offerings, which I'm very happy with. I'm planning to take out another VPS with you, and will probably go for the KVM7 option again, but your VZ11 option is also very tempting. In the past, with another hosting provider, I've run into problems with using Java under OpenVZ because of Java's tendency to see all burstable RAM as available to it, and had to work with the provider to sort this out (simply setting the maximum heap size for Java was not enough, and I believe they had to make some changes to the settings of the container itself).

Do you have experience of dealing with and preventing Java issues with OpenVZ, such that I could go for one of your OpenVZ offerings with confidence?

Admin
Site Admin
Posts: 490
Joined: Wed Jul 25, 2012 10:54 pm

Re: Java on OpenVZ

Post by Admin » Wed Sep 05, 2012 1:48 pm

This is a known problem for Java BUT, from what you are saying it looks like the other provider was overcommiting a lot.
Even if Java will use the vswap, this will not be a problem usually with us, because all OVZ nodes are under capacity atm and will not be oversold to jeopardize stability and customer satisfaction. Before we run out of memory, will run out of disk IO, so no worries about that. There were people running desktop linux in VZ1 and we only had to kick because they were torrenting killing IO not because of vswap usage.
That being said, if java uses vswap for real operations and not as buffers/storage and whatnot, your app might be slow because, while vswap is still memory, ovz is making it slow memory to mimic real disk swap.
You should worry about other issues with Java, such as not running some network applications, but if it run in the past, chances are it will run now too.
Get a small VZ3 or something, try it without much load and see how it works. You can upgrade later.

Admin

jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Re: Java on OpenVZ

Post by jcaleb » Wed Sep 05, 2012 1:54 pm

I have a VZ11. Installing Tomcat and 1 Grails app consumes around 700-800mb RAM. Take note I also use InnoDB.

J2R
Posts: 8
Joined: Wed Sep 05, 2012 12:28 pm

Re: Java on OpenVZ

Post by J2R » Wed Sep 05, 2012 2:16 pm

Thanks, Admin and jcaleb! Jon, I'd be very interested in hearing how you've got on with the VZ11 with Grails (what JVM settings you've used, etc.), because that is one of the things I'll be doing. I'm a Grails developer myself, and I'm already hosting a Grails app on my KVM7 VPS.

I think I'll probably be safe to order one of these.

jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Re: Java on OpenVZ

Post by jcaleb » Wed Sep 05, 2012 2:21 pm

Hi, J2R. PM sent with my email. Actually, I did not do anything special with my VZ11. I just copied whatever I did with my KVM7. Hmmm... I just realized we signed up for the same packages =)

Edit: I still prefer the KVM though. Using the exact same setup, my KVM is just eating 350mb RAM. while OVZ eats 700-800mb. I think regardless if its with burst or vswap, Java dont like OVZ very much =)

Admin
Site Admin
Posts: 490
Joined: Wed Jul 25, 2012 10:54 pm

Re: Java on OpenVZ

Post by Admin » Wed Sep 05, 2012 2:27 pm

Yes, java is not really recommended for OVZ, but there are some advantages, one of them is speed, KVM will run java slower because of CPU unless it is a big package with beefy stats and will probably cost twice as much for the same speeds.

Admin

jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Re: Java on OpenVZ

Post by jcaleb » Wed Sep 05, 2012 2:30 pm

That is very true Admin, OVZ is so much faster. I would stay with KVM for Java because I could predict memory consumption much better. Not much fluctuations.

J2R
Posts: 8
Joined: Wed Sep 05, 2012 12:28 pm

Re: Java on OpenVZ

Post by J2R » Wed Sep 05, 2012 2:42 pm

Using the exact same setup, my KVM is just eating 350mb RAM. while OVZ eats 700-800mb
But the OVZ VPS has hugely more RAM (3Gb vs 1Gb), does it not? Or is that burstable, not 'real' RAM?

I have to say that in the existing OpenVZ installation I mentioned, with another provider, speed is very impressive and we haven't had any more issues after the initial problems.

Admin
Site Admin
Posts: 490
Joined: Wed Jul 25, 2012 10:54 pm

Re: Java on OpenVZ

Post by Admin » Wed Sep 05, 2012 2:57 pm

Yes, exactly my points, OVZ is cheaper, seems like using more ram and is faster too.
If your app runs there, by all means, take OVZ. Only problem with it is that Java might not run because of the way OVZ is "faking" network and some other things, once you know it runs, go with OVZ. The speed is good and the price is right.

Admin

jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Re: Java on OpenVZ

Post by jcaleb » Wed Sep 05, 2012 3:04 pm

It runs when I tried it =) VZ11 is much faster than KVM7 too

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests