Memory compression on hypervisor vs host
Memory compression on hypervisor vs host
I've been wondering whether it's better for memory pages to be compressed at the hypervisor level, or on the VM level.
I'm leaning toward the VM level, because
1: VMs have better knowledge of memory pressure by the application, and can better decide when to swap pages out to zram. The VM has access to information about memory pages that the hypervisor doesn't have.
2: if pages are compressed on the hypervisor level, the VM doesn't "see" any increased memory available. The host box gains free memory, but the application never sees it to make use of it, it'll just see the same 8GB as it always has, so it never really benefits. This maybe lets you host more VMs on one box, but at the cost of the applications not being as efficient.
Is this a reasonable position? I'm wondering if I'm missing something obvious.