Re: [PATCH 6/9] VMware balloon: Do not limit the amount of frees and allocations in non-sleep mode.

Philip Moltmann
2015-06-12T15:40:46Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1917 bytes --]

Hi,
> >
> > Three improvements contribute to the overall faster speed:
> > - batched operations reduce the hypervisor overhead per page
> > - 2m instead of 4k buffer reduce the hypervisor overhead per page
> > - removing the rate-limiting for non-sleep allocations allows the
> > guest
> > operating system to reclaim memory as fast as it can instead of
> > artificially limiting it.
> >
> > Any of these improvements is great by itself and helps a lot. The
> > combination of all three makes a rather dramatic difference.
> >
> > We cause hypervisor-level swapping if the balloon driver does not
> > reclaim fast enough. As any of these improvements increases
> > reclamation
> > speed, we reduce swapping risk in any case.
> >
> > Unfortunately the first two improvements rely on hypervisor
> > support,
> > the last does not.
>
> As far as I can understand the justification for removing the limit
> (improvement #3) is that we have #1 and #2, at least that's how I
> read
> the patch description. I am saying: what if you running on a
> hypervisor
> that does not support neither #1 nor #2? What was the first release
> that
> of ESXi supports batching and 2M pages? What about workstation (I
> don't
> recall if it started using ballooning at some point)?

I see how caused this confusion. The rate limiting was there to not
cause the guest OS to stall while doing nothing else than ballooning.
With the batching the time spend ballooning is smaller, hence this is
less of a problem when these features are available.

Independent of that the yielding in the ballooning loop should help to
reduce stalling. Also hypervisor swapping - because we rate limited
ballooning - causes much worse stalling than in the balloon driver.

Thanks
Philipÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥