Is there a way to have a virtual machine only have one core yet use three cores on the host machine? [duplicate]

Possible Duplicate:
Can a single Virtual Core on a VM use more then 1 physical core?

I'm a co-owner of a Minecraft server that is getting rather large each day, but as we get bigger we're running into the limits of Minecraft and the way it's coded. The game isn't coded to use multiple cores, instead it only uses one core. So talking with a friend he suggested seeing if it was possible to have a virtual machine only have one virtual core yet use three of the four cores on the host machine. I've done some research and can't seem to find any answers. It doesn't matter if the host operating system is Windows or Linux, I'm just curious as to if it can be done.

If it can be done or is done automatically, can you provide links so that I can read upon this and learn more... I am new to virtual machines so go easy.


Solution 1:

As of today all answer seem to be correct: No way to do it.

I would like to add some meat to those statements:

Wikipedia on "automatic parallelization".

Automatic parallelization would be the process to take a given serial algorithm and try to find command sequences that could be executed in parallel, then scheduling and dispatching those sequences to the available (hardware: cpu) resources, and then joining the outcome (=data) back for further processing.

The problem not only is in finding sequences that do not depend on each other and are therefore able to being worked on in parallel. But also the communication overhead may become prohibitive. Think about your particular problem where the one Minecraft world is going to be split in some way onto the different cpus: If you split the world geometrically, lets say in := 9 blocks, then at the borders the individual sub worlds need to exchange any world modifications or movements of inhabitants.

While the above is a typical "divide-and-conquer" approach, and geometrical split-up of a problem is a widespread solution to parallelization, it is normally handcoded, making use of the knowledge the problem designer - in this case - the game developer has.

Your proposed idea would involve some automation of an algorithm that is completely unknown, because the virtual "hyper" server has no way of knowing how Minecraft internally behaves. So the only angle to this problem is the executed assembly code. At this low a level it is very hard - and currently seems to be impossible - to come up with a solution that has any merit.

Google can search for scientific publications these days. And if you're really interested I'd look at the publications on related conferences. Organizations such as the IEEE and the ACM may be good starting points for that.

Solution 2:

Nine women are unable to produce a baby in one month. Sorry, at least for now it's impossible to glue CPUs together in VM environment. But that's an interesting idea!

Solution 3:

No. Point. You can not magically make a super core out of physical cores. Hyper-Visors can not reqire your core.