1

I have a server that has KVM installed on it. this server I have created for testing purposes.

server's configuration : OS: CentOS 7 Space: 60GB RAM: 2GB

I created one Windows VM on this server with 1400MB RAM and 20GB HDD.

So the problem is whenever this windows VM is running, on the server it shows it has utilized all 1400MB RAM assigned to it.

But when I logged into this windows VM and checked it is using 900MB.

the output of free -m when Windows VM is stopped:

              total        used        free      shared  buff/cache   available
Mem:           1837         158        1360          96         318        1437
Swap:          1022          67         955

the output of free -m when Windows VM is running.

              total        used        free      shared  buff/cache   available
Mem:           1837        1466          76          96         294         129
Swap:          1022         120         902

Windows VM has virtIO drivers installed.

I tried KSM service to resolve this issue, but it didn't work.

This happens with more RAM (e.g 16GB or 60GB) as well.

On the server why it is showing all the RAM is used? when actually it is not.

Please let me know if you need more information.

  • 1
    I don't see a question here. You allocate RAM from a vmhist and its allocated. Whether the is of the VM uses it or not is outside the scope of the host unless you are using paravirtualization. KVM does full virtualization. – davidgo May 11 '20 at 01:27
  • On server why it is showing all the RAM is used? when actually it is not using. – Akshay Rathod May 11 '20 at 05:03
  • Because the server has allocated it to the client. If you go to a restaurant and order a bowl of 1400 chips and this is given to your table to eat - the chips are in the restaurant, but the kitchen can't take your chips and give them to others. Chips = memory, your table = VM, restaurant = host PC. – davidgo May 11 '20 at 05:25
  • But this is not the case with the Linux VM. Why is that? Can explain that? – Akshay Rathod May 11 '20 at 07:51
  • 1
    Memory ballooning. It exists in kernels with support for kvm and 9/10 times its a dumb idea. The 10th time its still a hack. See https://rwmj.wordpress.com/2010/07/17/virtio-balloon/ – davidgo May 11 '20 at 08:05
  • (The Linux VM gets all the memory assigned to it, then gives some back) – davidgo May 11 '20 at 08:05
  • https://forum.proxmox.com/threads/windows-10-guest-agent-balloon-issues.43802/ may be useful to you. Apparently there is a balloon driver for Windows. – davidgo May 11 '20 at 08:16

0 Answers0