The title pretty much says it all, is there any advantage to giving a VM 2048MB of memory instead of rounding to base-10 and doing 2000MB?
The title pretty much says it all, is there any advantage to giving a VM 2048MB of memory instead of rounding to base-10 and doing 2000MB?
Hyper-V internally allocates memory in 2MB chunks. The hypervisor itself will use 2MB page table entries for efficiency, if possible, if your processor supports Second-Level Address Translation (SLAT.) This will be possible for pretty much any VM with Dynamic Memory turned off.
Other than that, no it doesn't matter.
The physical memory in the server is a multiple of a power of two, so it will slice evenly if you use other multiples. There may be some incredibly minor improvements with SLAT and such if they're properly aligned too. Otherwise no.
Just to clarify what the other answers have said; the limit that's being defined here is basically for your virtual machine's software, not the guest. That is, when your guest OS requests a page of memory, its doing so in defined increments (i.e., 4KB). So if you defined the virtual machine to have 4097KB of RAM, and your host VM was using a 4KB page size, then it would likely grant a total of 4100KB of RAM to the virtual machine.
If the guest OS, however, were to use a 1KB page size, and your host OS used a 4KB page size, then the host OS would essentially grant 4KB of space of which only 1KB will be used--but that's out of all the chunks of memory. So you will never really be wasting any discernible amount of space.
To note, alignment between the host OS and guest OS is not a factor here except for that last "off bits."
I suspect its a matter of tradition, and aligning it with how physical systems are built. Physical systems have memory in base 2 amounts (and least with every x86 ever made, this is true), and chances are some if not many OSes would expect this in managing memory.
In short, it really is because a virtual machine reflects a real machine, rather than a hypothetical one. Not a very technical answer, but I think that is the real one
Not really. Hyper-v dynamic memory will only allocate what the system uses anyway. The amount you assign is the startup value. If you are not using dynamic memory the only advantage I can see is to better align the physical memory to virtual.