News for hackers. Stuff that matters.
Re:Ask HN: help needed on VM placement algorithm by kuvkir on Tuesday May 12, 2009 @09:36AM (#605326)
That's not that simple.

Let us imagine the following configuration.

We have 3 servers each of 4 slots, below is the state of each server (the state of a server is a set of VMs it's running)

[3], [2, 1] and [2].

Say we need to place a new 3-slot VM to our system. We'll pick the third server as less-loaded and try to accomodate the second server. Together they have enough space, but we can't provision the VM withour using all 3 servers. The solution here is

1) migrate a 1-slot VM from server 2 to server 1

2) migrate a 2-slot VM from server 2 to server 3

3) place the new VM to server 2

Re:Ask HN: help needed on VM placement algorithm by rjprins on Tuesday May 12, 2009 @09:41AM (#605334)
Don't get me wrong, a correct packing algorithm for this is far from trivial!

What would you say is more important: minimizing the amount of slots to move or the number of VM's?

Re:Ask HN: help needed on VM placement algorithm by kuvkir on Tuesday May 12, 2009 @10:21AM (#605396)
That's not a simple question. But I would guess having one 2-slot migration is better than two 1-slot migrations...