Re: Live memory allocation?

Brian Jackson
2009-03-28T17:16:27Z

On Saturday 28 March 2009 08:38:33 Alberto Treviño wrote:
> On Thursday 26 March 2009 08:11:02 am Tomasz Chmielewski wrote:
> > Like, two guests, each with 2 GB memory allocated only use 1 GB of
> > host's memory (as long as they don't have many programs/buffers/cache)?
> >
> > So yes, it's also supported by KVM.
>
> The problem I've seen with this feature is that Windows guests end up
> taking all of their available memory once they are up and running. For
> example, booting Windows XP in KVM 82 show a steady increase in memory.
> Then about the time the login box is about to appear, memory usage jumps to
> the maximum allowed to the VM (512 MB in this case). I remember reading
> somewhere Windows would try to initialize all memory during boot, causing
> KVM to allocate all memory. VMware, however (and I don't know about
> VirtualBox) knows about this and works around it, making sure memory isn't
> all allocated during the Windows boot process.
>
> Would there a way to work around the Windows memory allocation issue in KVM
> as well?

KVM devs have a patch called KSM (short for kernel shared memory I think) that
helps windows guests a good bit. See the original announcement [1] for some
numbers. I spoke to one of the devs recently and they said they are going to
resubmit it soon.

[1] http://marc.info/?l=kvm&m=122688851003046&w=2

> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html