# [OmniOS-discuss] qemu-system-x86_64 can not locked enough memory

Fucai Liang （BLCT） fcliang at baolict.com
Wed Dec 2 03:38:35 UTC 2015

- Previous message: [OmniOS-discuss] qemu-system-x86_64 can not locked enough memory
- Next message: [OmniOS-discuss] PCRE version
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Thank for  your help!

    when the server boot up, it has 7989066 pages  availrmem.  after I launch one VM (8Gmemory),  availrmem decrease to 4756624 .

    7989066-4756624 = 3232442

    3232442/256 = 12626.7265625 / 1024 = 12.3G

    root at BLCC01:/root# mdb -ke 'availrmem/D ; pages_pp_maximum/D'
    availrmem:
    availrmem:      7989066
    pages_pp_maximum:
    pages_pp_maximum:               325044

    root at BLCC01:/root# qemu-system-x86_64 -enable-kvm -vnc 0.0.0.0:12 -cpu host -smp 4 -m 8192 -no-hpe

    root at BLCC01:/root# mdb -ke 'availrmem/D ; pages_pp_maximum/D'
    availrmem:
    availrmem:      4756624
    pages_pp_maximum:
    pages_pp_maximum:               325044
    root at BLCC01:/root#

    That mean the VM  use 12.3G availrmem , how it happens ?

    Thank !

    ------------------------------
    fcliang

    On Dec 2, 2015, at 1:37, Joshua M. Clulow <josh at sysmgr.org> wrote:

    > On 1 December 2015 at 09:11, Dan McDonald <danmcd at omniti.com> wrote:
    >>> On Dec 1, 2015, at 12:03 PM, Fucai.Liang <fcliang at baolict.com> wrote:
    >>> then I start the third vm (4G memory), it got the following error :
    >>> qemu-system-x86_64 -enable-kvm -vnc 0.0.0.0:2 -cpu host -smp 2 -m 4096 -no-hpet
    >>>
    >>> qemu_mlock: have only locked 1940582400 of 4294967296 bytes; still trying...
    >>> qemu_mlock: have only locked 1940582400 of 4294967296 bytes; still trying...
    >>> qemu_mlock: have only locked 1940582400 of 4294967296 bytes; still trying...
    >>> qemu_mlock: have only locked 1940582400 of 4294967296 bytes; still trying...
    >>> qemu_mlock: have only locked 1940582400 of 4294967296 bytes; still trying...
    >>> qemu_mlock: have only locked 1940582400 of 4294967296 bytes; still trying…
    >>>
    >>> I got 15G free memory in the system, why qemu-system-x86_64 can not locked enough memory ？
    >> What does "vmstat 1 5" say prior to your launch of the third VM?
    >
    > I suspect it will show you have free memory available, but that what
    > is really happening is getting here:
    >
    >  https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/vm/seg_vn.c#L7989-L8002
    >
    > This is likely failing in page_pp_lock() because "availrmem" has
    > fallen below "pages_pp_maximum":
    >
    >  https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/vm/vm_page.c#L3817-L3818
    >
    > We set this value here, though it can be overridden in "/etc/system":
    >
    >  https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/vm/vm_page.c#L423-L436
    >
    > You can look at the current values with mdb:
    >
    >  mdb -ke 'availrmem/D ; pages_pp_maximum/D'
    >
    > Increasing this value doesn't seem to be without risk: I believe that
    > it can lead to memory exhaustion deadlocks, amongst other things.  I
    > don't know if it's expected to be tuneable without a reboot.
    >
    >
    > Cheers.
    >
    > --
    > Joshua M. Clulow
    > UNIX Admin/Developer
    > http://blog.sysmgr.org

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://lists.omniti.com/pipermail/omnios-discuss/attachments/20151202/54940a76/attachment.html>

- Previous message: [OmniOS-discuss] qemu-system-x86_64 can not locked enough memory
- Next message: [OmniOS-discuss] PCRE version
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the OmniOS-discuss mailing list