I'm testing CentOS 6.6 in Hyper-V (W2K12R2) with dynamic memory. I set Startup and Minimum Memory to 4096MB, Maximum Memory to 16384MB. 20% buffer size.

After boot I can see it's memory size as 3882MB from CentOS and memory demand is ~700MB in Hyper-V Manager on Host OS.

Than I tried to create couple of 2GB tmpfs mounts and filled them with random data. Since it was more than 4GB, memory size became to increase in guest OS and I saw memory size as 5996MB.

Than I erased everything from tmpfs directories and assigned memory on Host OS became 4096MB, demand memory 901MB. But memory size in CentOS stayed as 5996MB. Memory usage shown as 2940MB

Mem:   6140300k total,  3903940k used,  2236360k free,   116944k buffers
Swap:        0k total,        0k used,        0k free,   775396k cached

1. Should guest OS see memory decrease?

2. If it shouldn't, how can I figure out real memory size and memory usage from guest OS?

1 Answer 1


The guests will hang on to the existing memory until either the guest is rebooted or ballooning takes effect and the host "steals" back some of the RAM (which shows as used on the guest). This is likely because the OS doesn't respond as well to sudden "missing" RAM (similar to hot-add being a thing but removal requiring a reboot).

  • So, even when Host OS will get memory back from guest OS, guest OS will not decrease available memory size and will show it as maximum assigned memory. Am I right?
    – b0rman
    Dec 26, 2014 at 12:23
  • @b0rman Yes, basically.
    – Nathan C
    Dec 26, 2014 at 15:56
  • OK. How can I figure out real memory size and real memory usage from guest VM? I mean, not in Hyper-V Manager on Host.
    – b0rman
    Dec 26, 2014 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.