Thanks Zhang and Venkateshwara, some more follow up questions below:) 1. Does -realtime mlock=on allocate all the memory upfront and keep it for the VM, or does it just make sure the memory that is allocated within the guest is not swapped out under host memory pressure? 2. I notice on a 4G guest on an 8G host, guest allocates only about 1G initially, and the rest later as I start applications. Is there a way for me to reserve ALL memory (4G in this case) upfront somehow without changes to guest and without allocating it? It will have to be something the host OS or some component within the host OS. Isnt there something to that effect? It seems odd that there isnt. Thank you in advance. On Wed, May 28, 2014 at 11:45 PM, Zhang Haoyu <zhanghy@xxxxxxxxxxx> wrote: >> Hello, >> Some more basic questions.. >> >> 1. How can I ensure that memory for the a guest is available and >> reserved? In other words, I bring up a Linux VM which has 4G >> allocated, I want to make sure it has all the 4G available right away. >> I saw references to balloon driver, it seemed like that was more for >> dynamic memory exchange between host and guest. In my case, it is a >> Linux guest with a Linux VM. >> > Try -realtime mlock=on, this option ensure that all the memory allocated for VM is available right away. > >> 2. Does the host reclaim pages from guest if it needs it without a >>balloon driver? >> > Yes, just consider the memory of VM as that of QEMU(user-process). > >> 3. This might be a very basic question, please bear with me:) If I use >> virtio for say network and block, does network and block traffic still >> go through QEMU? Is the host part of virtio basically QEMU or is it >> something that runs in the host kernel. If QEMU, does every IO still >> pass through it? Found some conflicting information, so not a 100% >> sure. Found this, not sure if it is 100% accurate? Trying to >> understand the flow through different layers, and what the layers are. >> http://events.linuxfoundation.org/sites/events/files/slides/MasakiKimura_LinuxConNorthAmerica2013_1.pdf >> >> > It depends on whether you enable the vhost or something. > >> Thank you in Advance:) >> -- > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html