[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1609968] Re: "cannot set up guest memory" b/c no autom
From: |
Dr. David Alan Gilbert |
Subject: |
[Qemu-devel] [Bug 1609968] Re: "cannot set up guest memory" b/c no automatic clearing of Linux' cache |
Date: |
Mon, 08 Aug 2016 14:32:19 -0000 |
Hi Celmor,
That shouldn't happen! QEMU's allocation of memory is pretty normal, so
really the question is for the kernel guys.
Having chatted to a collague, two questions:
a) Does it still happen if you set /proc/sys/vm/overcommit_memory to 1?
b) What filesystem are you using (some have different behaviour when
dealing with the caches).
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1609968
Title:
"cannot set up guest memory" b/c no automatic clearing of Linux' cache
Status in QEMU:
New
Bug description:
Version: qemu-2.6.0-1
Kernel: 4.4.13-1-MANJARO
Full script (shouldn't matter though): https://pastebin.com/Hp24PWNE
Problem:
When host has been up and used for a while cache has been filled as much that
guest can't be started without droping caches.
Expected behavior:
Qemu should be able to request as much Memory as it needs and cause Linux to
drop cache pages if needed. A user shouldn't be required to have to come to
this conclusion and having to drop caches to start Qemu with the required
amount of memory.
My fix:
Following command (as root) required before qemu start:
# sync && echo 3 > /proc/sys/vm/drop_caches
Example:
$ sudo qemu.sh -m 10240 && echo success || echo failed
qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate
memory
failed
$ free
total used free shared buff/cache
available
Mem: 16379476 9126884 3462688 148480 3789904
5123572
Swap: 0 0 0
$ sudo sh -c 'sync && echo 3 > /proc/sys/vm/drop_caches'
$ free
total used free shared buff/cache
available
Mem: 16379476 1694528 14106552 149772 578396
14256428
Swap: 0 0 0
$ sudo qemu.sh -m 10240 && echo success || echo failed
success
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1609968/+subscriptions