Java Web-App on OVZ

Other issues, related or not with your VPS. Things that don't fit any of the above.
jcaleb
Posts: 92
Joined: Fri Aug 03, 2012 8:56 am

Java Web-App on OVZ

Postby jcaleb » Fri Aug 03, 2012 11:28 am

John's post is very informative about OVZ vs. XEN vs. KVM. Maounique at LET also gave some more info on running Java on OVZ, that there might be some network functionality not supported.

It seems from my testing on VZ11, my java web app (simple database + html java app) is working perfectly. Does anyone have any advice if I should really go for OVZ for this? Like other potential issues. @Admin, am I allowed or do you have concerns if I do this?

Thank you so much

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

Re: Java Web-App on OVZ

Postby Admin » Fri Aug 03, 2012 12:03 pm

Let me go a bit a la long here.
OVZ is not a full machine. It emulates nics in an unorthodox way. This is why there are problems with VPN, this is why IPSec is not supported, and many other things. In general, if your app needs to bind to some nic, it will likely have problems in OVZ. Java has a networking part that needs this and it may not work well or fail altogether with cryptic messages.
For general Java apps, OVZ is lean and fast, albeit Java will appear to use more memory on OVZ.

KVM, on the other hand, is fully emulating a machine. The OS inside is not aware it is not running on a regular PC (well, some do detect it, they can if they want, but that only to optimize some things, not that it is needed to function).
As such, EVERYTHING will work inside KVM if it has the required resources, including any Java app.

To make a comparison, OVZ is for VPSes what shared hosting is for hosting.. If you put a webserver in a small machine, will perform perfectly until it runs out of memory/io or cpu, usually the first. In case of shared hosting, the server is much larger and can allocate unused resources to sustain short increased bursts in visitors or load testing, as such shared hosting will look like it does much better. In reality, you will be kicked by the host if you abuse the resources repeatedly and hinder other people there while your standalone server will only go away for a while under very heavy load and you can always add more ram/cpu/bw/ssd to solve the issue.
In our analogy, KVM is like your own server, you can put there in theory any OS, any mysql, any php, any webserver, but will be limited to the resources allocated and will rarely cause abuse. If it is not enough for your needs, add more CPU, more ram, same as in a real computer.
In case of OVZ, you have the IO of the node (fast arrays and such) and the cpu for bursts of load. If you load the server too much and hinder other people, will be considered abuse. But again, a 3 GB ram ovz is expected to use more io/cpu, if yours is an 128 mb heavy swap, then it is not expected and you will hear from the host at the first sign of problems.

Bottom of line, plan well ahead, we are here to help you, if it doesn't work, we will help you change plan. The only thing a host doesn't like is the people that expect an 256 MB machine perform like a shared host or like their home computer and insist to be given the same performance for pennies. Everything else can be worked out :)
Admin

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

Re: Java Web-App on OVZ

Postby jcaleb » Fri Aug 03, 2012 1:28 pm

Thank you so much @Admin. I'm sorry I just realized I asked the question already on another thread. Just too many things on my head.

Follow up question, when someone needs grows to move from VPS to Dedicated, does it matter which virtualization he came from?

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

Re: Java Web-App on OVZ

Postby Admin » Fri Aug 03, 2012 1:31 pm

If you reinstall, no.
If you plan to simply move files, yes.
But only userfiles and not os configuration, no, it does not matter.


Return to “Other”

Who is online

Users browsing this forum: No registered users and 1 guest