On Mon, Aug 9, 2010 at 7:49 PM, Dennis <den...@satanclaus.com> wrote: > I have an application that takes up over 2 GB of memory but is > otherwise demanding virtually no other resources at all. > Running multiple instances of the application using physical memory > isn't an option. Would it be hard to change Qemu's > physical memory mapping to a file on disk ? (Not Qemu-KVM, just stock Qemu).
It's not 100% clear what you are trying to do, but are you aware that guest "physical" memory can be swapped on the host? If you put two VMs on one host which use more memory than available host RAM, some of their pages will get pushed out to swap, like any normal userspace process. Two things to consider in a memory overcommit scenario are reduced performance due to swapping and allocating enough swap so the out-of-memory killer does not terminate the QEMU process. Also, have you looked at Kernel Samepage Merging (KSM)? KSM detects guest physical pages that contain the same contents and merge them into a single page, saving memory. This is appropriate if you run multiple VMs based off the same disk image and expect they will be executing the same code. For more info, see http://kernelnewbies.org/Linux_2_6_32#head-d3f32e41df508090810388a57efce73f52660ccb. Stefan