.img on nfs, relative on ram, consuming mass ram


Hi !
Here’s my config :

Version : qemu-kvm-0.12.5
Hosts : AMD 64X2, Phenom and Core 2 duo
OS : Slackware 64 13.0
Kernel : and many previous versions

I use a PXE server to boot semi-diskless (swap partitions and some local stuff) stations.
This server also serves a read-only nfs folder, with plenty of .img on it.
When clients connects, a relative image is created in /tmp, which is a tmpfs, so hosted in ram.

And here i go on my 2G stations :
qemu-system-x86_64 -m 1024 -vga std -usb -usbdevice tablet -localtime -soundhw es1370 /tmp/relimg.img
qemu-system-x86_64 -m 1024 -vga std -usb -usbdevice tablet -localtime -soundhw es1370 /dev/shm/relimg.img

I tried both. Always the same result : the ram is consumed quickly, and mass swap occurs.
On a 4G system, i see kvm uses more than 1024, maybe 1200.
And everytime a launch a program inside the vm, the amount of the host free ram (not cached) diminishes, which is weird, because it should have been reserved.

So on a 2G system, swap occurs very fast and the machine slow a lot down.
An on a total diskless system, this leads fast to a freeze.

I have no problem if i use a relative image on disk :
qemu-system-x86_64 -m 1024 -vga std -usb -usbdevice tablet -localtime -soundhw es1370 -drive file=/mnt/hd/sda/sda1/tmp/relimg.img,cache=none


The thread on the mailing list :

thread.gmane.org/gmane.comp.emul … evel/59582