Re: Some more basic questions..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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?
>
“-realtime mlock=on” will mlockall(MCL_CURRENT | MCL_FUTURE) QEMU's ALL memory,
because VM's memory is part of QEMU's, so this option will keep VM's memory unswapped.

>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.
>
On linux, user-process's memory is allocating on demand, the physical memory does not allocate until the virtual memory is touched.
Because VM's memory is part of QEMU's, so ...
I guess the VM you said above is linux guest. Windows guest will memset its memory during booting period.

You can use "-realtime mlock=on" to reserve VM's ALL memory upfront.

>
>Thank you in advance.
��.n��������+%������w��{.n�����o�^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux