ram usage sharing between lxc(ubuntu),vm(windows),host

ilia987

Member
Sep 9, 2019
175
4
18
33
I assume that this is impossible, but ill ask this anyway.

i need to put one lxc (ubuntu) and one vm on each host (for large computational tasks) somtiems we need windows and sometimes we need linux
the problem that the VM need to have all the ram prealocation and not freed when not in use.

is it possible to free it the ram is not in used?
 

Stefan_R

Proxmox Staff Member
Staff member
Jun 4, 2019
856
153
43
Vienna
A container automatically shares unused RAM with the host. For a VM you need to enable ballooning (Hardware -> Memory) and install the latest ballooning driver in the guest (from virtio in Windows, Linux comes with support built in).
 

ilia987

Member
Sep 9, 2019
175
4
18
33
i installed virtio and enable the flag, but the system still uses all ram and it is not shared
i see "BalloonService " running on windows
 
Last edited:

Stefan_R

Proxmox Staff Member
Staff member
Jun 4, 2019
856
153
43
Vienna
How did you determine that RAM isn't shared? Also, what the balloon driver does is allow the Windows guest to voluntarily give up some memory it's not using to the host, if you're actually using all the RAM in the guest, it of course can't be shared.
 

ilia987

Member
Sep 9, 2019
175
4
18
33
the proxmox host had the same ram usage as before:
the max ram available to the vm was marked as used, even when the vm used around 1% of the ram
 

Stefan_R

Proxmox Staff Member
Staff member
Jun 4, 2019
856
153
43
Vienna
If there's no memory pressure the kernel might decide to let the VM keep the memory. Or your guest OS might be doing some aggressive caching. There's a heap of things to go wrong, without any logs, VM configs, 'pveversion -v' output, in general any more detailed configs its very hard to say...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!