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

Philip Moltmann
2015-06-12T15:07:44Z

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

Hi,

thanks for taking so much interest in this driver. It is quite good
that our design choices get scrutinized by non-current VMware
employees.

> I understand that you negotiate the capabilities between hypervisor
> and
> the balloon driver, however that was not my concern (and I am sorry
> that
> I did not express it properly).
>
> The patch description stated:
>
> "Before this patch the slow memory transfer would cause the
> destination
> VM to have internal swapping until all memory is transferred. Now the
> memory is transferred fast enough so that the destination VM does not
> swap."
>
> As far as I understand the improvements in memory transfer speed
> hinge
> on the availability of batched operations, you however remove the
> limits
> on non-sleep allocations unconditionally. Thus my question: on older
> ESXi's that do not support batcher operations won't this cause VM to
> start swapping?

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.

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¥