TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: help needed on VM placement algorithm

8 点作者 kuvkir大约 16 年前
Hello!<p>I'm working on a "cloud computing" management system and need help on a VM placement/provision algorithm.<p>Let us assume we have a cluster of N physical servers. Each server has a single type of resource - slots (Note that in real world servers have more resources CPU/memory/disk/etc...). Let a server have M slots. Servers can run virtual machines, every VM occupies from 1 to M slots. Once the VM (with k slots) starts on a server, the number of free server slots is reduced accordingly. When the VM stops, the occupied slots are freed.<p>VMs can live-migrate across servers. For example, when there is no server with M free slots (every server runs at least one VM), and we need to start an M-slot VM - there we need to rearrange VMs across a cluster.<p>The goal is implement a VM placement policy to satisfy the following requirements:<p>* utilize server resources in a uniform way, e.g. if we have 3 servers and 3 single-slot VMs we should place them on different servers.<p>* minimize number of VM migrations as it is a costly operation.<p>It looks like the problem in question has something to do with multiple knapsack problem, so I'm looking for some kind of heuristic algorithm.<p>Any advise / papers / working solutions ?<p>Thanks in advance,<p>Kirill

2 条评论

eru大约 16 年前
I will look into your problem. Perhaps I can work out an integer linear formulation that you can feed into a standard solver for linear optimization problems.<p>If you want to read papers on the subject, look for 'scheduling' or 'production planning'. 'Bin packing' and 'cutting stock' might also be related.<p>Do you need an online solution or do you know all demands in advance? Also what do you do when not enough slots are available for all VMs? That could happen either because the number of slots in demand is higher than the supply --- or a bit more subtle: Say you have n servers, and n+1 VMs each taking M/2+1 slots. The total number of slots suffices, but still your VMs do not fit the machines.
评论 #605239 未加载
rjprins大约 16 年前
Is it first come first serve?<p>Very interesting, I'll see what I can work out..