* [Qemu-devel] Enabling vhost-net cause insane high memory usage.
@ 2014-01-09 23:00 Piotr Karbowski
2014-01-15 2:41 ` Stefan Hajnoczi
2014-01-15 10:03 ` Michael S. Tsirkin
0 siblings, 2 replies; 5+ messages in thread
From: Piotr Karbowski @ 2014-01-09 23:00 UTC (permalink / raw)
To: qemu-devel
Hello,
kernel 3.12.5, qemu-1.7.0.
With vhost=on, qemu shortly after start uses all its assigned memory (2G
for example), without vhost-net enabled it does not go to more than 200
MB on my idling test virtual machine. 100% reproducable. I think its not
how it should be.
Full command:
/usr/bin/qemu-system-x86_64 -machine accel=kvm -name _debian -usb
-machine accel=kvm -cpu host,level=9 -smp cpus=2 -vga std -monitor
unix://home/piotr/src/vmninja/sockets/_debian.monitor.socket,server,nowait
-vnc unix://home/piotr/src/vmninja/sockets/_debian.vnc.socket -m 2048
-boot order=d,menu=on -drive if=ide,index=2,media=cdrom,id=virtcd
-netdev tap,id=if0,helper=/usr/libexec/qemu-bridge-helper --br=lebridge0
-device virtio-net-pci,netdev=if0,mac=de:ee:b3:9e:a3:d5,romfile= -drive
file=/home/piotr/virt/kvm/_debian.raw,if=virtio,cache=writeback
-- Piotr.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Enabling vhost-net cause insane high memory usage.
2014-01-09 23:00 [Qemu-devel] Enabling vhost-net cause insane high memory usage Piotr Karbowski
@ 2014-01-15 2:41 ` Stefan Hajnoczi
2014-01-15 10:03 ` Michael S. Tsirkin
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2014-01-15 2:41 UTC (permalink / raw)
To: Piotr Karbowski; +Cc: jasowang, qemu-devel, Michael S. Tsirkin
On Fri, Jan 10, 2014 at 12:00:31AM +0100, Piotr Karbowski wrote:
> kernel 3.12.5, qemu-1.7.0.
>
> With vhost=on, qemu shortly after start uses all its assigned memory
> (2G for example), without vhost-net enabled it does not go to more
> than 200 MB on my idling test virtual machine. 100% reproducable. I
> think its not how it should be.
>
> Full command:
> /usr/bin/qemu-system-x86_64 -machine accel=kvm -name _debian -usb
> -machine accel=kvm -cpu host,level=9 -smp cpus=2 -vga std -monitor unix://home/piotr/src/vmninja/sockets/_debian.monitor.socket,server,nowait
> -vnc unix://home/piotr/src/vmninja/sockets/_debian.vnc.socket -m
> 2048 -boot order=d,menu=on -drive
> if=ide,index=2,media=cdrom,id=virtcd -netdev
> tap,id=if0,helper=/usr/libexec/qemu-bridge-helper --br=lebridge0
> -device virtio-net-pci,netdev=if0,mac=de:ee:b3:9e:a3:d5,romfile=
> -drive
> file=/home/piotr/virt/kvm/_debian.raw,if=virtio,cache=writeback
How are you measuring memory usage? Please post the output of the
command.
Did previous kernel/qemu versions work better?
Maybe Michael or Jason can give you hints on debugging this.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Enabling vhost-net cause insane high memory usage.
2014-01-09 23:00 [Qemu-devel] Enabling vhost-net cause insane high memory usage Piotr Karbowski
2014-01-15 2:41 ` Stefan Hajnoczi
@ 2014-01-15 10:03 ` Michael S. Tsirkin
2014-01-15 21:36 ` Piotr Karbowski
1 sibling, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2014-01-15 10:03 UTC (permalink / raw)
To: Piotr Karbowski; +Cc: qemu-devel
On Fri, Jan 10, 2014 at 12:00:31AM +0100, Piotr Karbowski wrote:
> Hello,
>
> kernel 3.12.5, qemu-1.7.0.
>
> With vhost=on, qemu shortly after start uses all its assigned memory
> (2G for example), without vhost-net enabled it does not go to more
> than 200 MB on my idling test virtual machine.
Could you explain how you measure that exactly?
> 100% reproducable. I
> think its not how it should be.
>
> Full command:
> /usr/bin/qemu-system-x86_64 -machine accel=kvm -name _debian -usb
> -machine accel=kvm -cpu host,level=9 -smp cpus=2 -vga std -monitor unix://home/piotr/src/vmninja/sockets/_debian.monitor.socket,server,nowait
> -vnc unix://home/piotr/src/vmninja/sockets/_debian.vnc.socket -m
> 2048 -boot order=d,menu=on -drive
> if=ide,index=2,media=cdrom,id=virtcd -netdev
> tap,id=if0,helper=/usr/libexec/qemu-bridge-helper --br=lebridge0
> -device virtio-net-pci,netdev=if0,mac=de:ee:b3:9e:a3:d5,romfile=
> -drive
> file=/home/piotr/virt/kvm/_debian.raw,if=virtio,cache=writeback
>
> -- Piotr.
Yes, this should not happen.
One interesting thing to try would be switching device type from
virtio-net to e1000.
This means vhost will be initialized but not started.
--
MST
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Enabling vhost-net cause insane high memory usage.
2014-01-15 10:03 ` Michael S. Tsirkin
@ 2014-01-15 21:36 ` Piotr Karbowski
2014-01-15 21:44 ` Piotr Karbowski
0 siblings, 1 reply; 5+ messages in thread
From: Piotr Karbowski @ 2014-01-15 21:36 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
Hello,
On 01/15/2014 11:03 AM, Michael S. Tsirkin wrote:
>
> Could you explain how you measure that exactly?
>
I check the resident memory (RES) of qemu-system-x86_64 proces.
> Yes, this should not happen.
> One interesting thing to try would be switching device type from
> virtio-net to e1000.
>
> This means vhost will be initialized but not started.
>
So with virtio-net-pci + vhost=on I have VM process on 580-590 MB of RES
memory, if I disable vhost OR set e1000 NIC and leave vhost enabled, its
take just 109-120 MB of resident memory.
The memory usage check is done after few minutes after VM start, and the
vm have minimal debian7 system without even single additional service.
-- Piotr.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Enabling vhost-net cause insane high memory usage.
2014-01-15 21:36 ` Piotr Karbowski
@ 2014-01-15 21:44 ` Piotr Karbowski
0 siblings, 0 replies; 5+ messages in thread
From: Piotr Karbowski @ 2014-01-15 21:44 UTC (permalink / raw)
To: Piotr Karbowski, Michael S. Tsirkin; +Cc: qemu-devel
On 01/15/2014 10:36 PM, Piotr Karbowski wrote:
> Hello,
>
> On 01/15/2014 11:03 AM, Michael S. Tsirkin wrote:
>>
>> Could you explain how you measure that exactly?
>>
>
> I check the resident memory (RES) of qemu-system-x86_64 proces.
>
>
>> Yes, this should not happen.
>> One interesting thing to try would be switching device type from
>> virtio-net to e1000.
>>
>> This means vhost will be initialized but not started.
>>
>
> So with virtio-net-pci + vhost=on I have VM process on 580-590 MB of RES
> memory, if I disable vhost OR set e1000 NIC and leave vhost enabled, its
> take just 109-120 MB of resident memory.
>
> The memory usage check is done after few minutes after VM start, and the
> vm have minimal debian7 system without even single additional service.
Quick note, the test was done on VM with 512 MB memory set, if I test it
on the 2 GB one, RES with vhost-enabled virtio-net-pci goes a bit above
2 GB shortly after start.
-- Piotr.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-15 21:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 23:00 [Qemu-devel] Enabling vhost-net cause insane high memory usage Piotr Karbowski
2014-01-15 2:41 ` Stefan Hajnoczi
2014-01-15 10:03 ` Michael S. Tsirkin
2014-01-15 21:36 ` Piotr Karbowski
2014-01-15 21:44 ` Piotr Karbowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).