0

I built a freebsd guest OS for a custom Java application. No Gui, no frills, just SSH and an API to coordinate all the machines.

This application is inherently single-threaded, and it is only limited by the CPU speed. Which is the best Virtualization framework for JAVA CPU-bound applications?

We started with OpenVZ but we found a nasty bug that causes memory leaks in our app, so now we're looking on what to use next.

5
  • 1
    Given that you've already run into compatability issues, maybe the answer is not to use what other people find good but to test it for yourself? And there's not a huge number of products available.
    – symcbean
    Dec 1, 2011 at 13:47
  • isn't OpenVZ linux-only? can you put a freeBSD guest on it?
    – Javier
    Dec 1, 2011 at 13:57
  • @symcbean if you answe with a list and a short comparison I will choose your answer
    – Mascarpone
    Dec 1, 2011 at 15:12
  • @Javier yes I was using centos on OpenVZ, OpenVZ is freebsd only.
    – Mascarpone
    Dec 1, 2011 at 15:13
  • 1
    See also serverfault.com/questions/105314/… Dec 2, 2011 at 2:54

4 Answers 4

1

There isn't a quick and easy way to set processor affinity for VMs in Linux that I'm aware of, having used VMWare and VirtualBox both, but either should work fine. If you're really keen on speed, you may want to go with KVM completely, if only for the native integration vs. a few layers added for VMWare/VirtualBox. Sounds like you really don't need much for gfx, sound, etc. so that might be optimal for you.


The next part of this answer is a bit off-topic as you asked for a full VM solution, but I'm posting anyways because it may make more sense in your situation. Using a VM sounds awfully heavy-weight, when you could use a container instead to get the same benefits (isolation) without the drawbacks (VM overhead). Yes you will have your environment jump from processor to processor over time, but then again all of the VM solutions will attempt that out of the box, because they are tied to the system scheduler, and the scheduler is what is causing this to happen.

3
  • Containers are not crash-resilent as VMs
    – Mascarpone
    Dec 2, 2011 at 16:34
  • I'm puzzled by this comment, given that it implies that the host OS itself lacks some kind of crash resiliency; the same host OS that would in turn be running your VM software; by extension, if the host OS is unstable regardless of environment (VM or container), then all things being equal, why would it matter?. Still, I'd like to hear what your argument is supporting the statement. Dec 2, 2011 at 18:08
  • If I have a java memory leak due to poor software, or certain soft errors in ram, the guest machine will crash and be restarted. The container is more likely to crash behind (seen from direct experience)
    – Mascarpone
    Dec 2, 2011 at 18:24
1

Why not fix the memory leak instead of changing platforms?

If it's single threaded, the scheduler isn't going to impact things a whole lot unless the host is way over-committed. Performance should be very similar across most platforms.

1
  • the memory leak is due to OpenVZ, not the program.
    – Mascarpone
    Dec 1, 2011 at 15:11
1

Which is the best Virtualization framework for JAVA CPU-bound applications?

One that allows you to assign physical CPUs to VMs persistently, so context swapping is kept to a minimum.

2
  • and which one is that?
    – Mascarpone
    Dec 1, 2011 at 15:10
  • VMware ESXi allows that. Dec 1, 2011 at 23:52
1

With the latest vmware server you can combine multiple cores into one virtual cpu so that may help if you've got a single threaded application:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1010184

edit: it's the 4.1 version that's got this. You can try the free esxi version and test your application on it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .