On Sat, Jun 06, 2020 at 03:10:37PM -0700, Samuel Sieb wrote: > On 6/6/20 9:04 AM, Richard W.M. Jones wrote: > >On Fri, Jun 05, 2020 at 04:07:44PM -0600, Chris Murphy wrote: > >>This laptop with 8GiB RAM is running two VMs at the same time: Windows > >>10 and Fedora Workstation 32. The host is Fedora Workstation 32. > > > >So this suggests another interesting question: If I have Fedora > >virtual machines running on a Fedora host, and both are using zram, > >could there be some negative interaction? ie. With the pages not > >being compressible twice. I suppose (without looking at the source) > >that zram will skip compressing a page if the compressed page is not > >any smaller? > > I considered this as well. But that would only be a concern if the > live memory of the VM is getting swapped out. Is that something > that could happen? That's a good point. The answer is yes (VMs are just regular processes). However usually if that does happen then the end result isn't great, with potentially huge guest pauses when a guest tries to run and its memory needs to be swapped back in. Serious virtualization hosts will try to ensure that memory is not overcommitted like this. KSM (kernel samepage merging) might also be affected. I wonder if the same original page content always compresses to exactly the same zram page? I'm going to guess not, in which case KSM would be defeated by zram. Although personally I've never found KSM does anything. https://www.linux-kvm.org/page/KSM Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/ _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx