* [PATCH] Increase the tx queue to 512 descriptors to fix performance problem. @ 2008-01-09 13:23 Dor Laor 2008-01-09 14:29 ` Anthony Liguori 0 siblings, 1 reply; 4+ messages in thread From: Dor Laor @ 2008-01-09 13:23 UTC (permalink / raw) To: kvm-devel, Anthony Liguori, Rusty Russell, "virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" <virtualization@ Now that we have a host timer based tx wakeup it waits for 64 packets or timeout before processing them. This might cause the guest to run out of tx buffers while the host holds them up. This is a temporal solution to quickly bring back performance to 800mbps. But a better fix will soon be sent (its not the only problem). Signed-off-by: Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org> --- qemu/hw/virtio-net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 777fe2c..3d07b65 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -293,7 +293,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) n->vdev.update_config = virtio_net_update_config; n->vdev.get_features = virtio_net_get_features; n->rx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_rx); - n->tx_vq = virtio_add_queue(&n->vdev, 128, virtio_net_handle_tx); + n->tx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_tx); n->can_receive = 0; memcpy(n->mac, nd->macaddr, 6); n->vc = qemu_new_vlan_client(nd->vlan, virtio_net_receive, -- 1.5.3.7 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Increase the tx queue to 512 descriptors to fix performance problem. 2008-01-09 13:23 [PATCH] Increase the tx queue to 512 descriptors to fix performance problem Dor Laor @ 2008-01-09 14:29 ` Anthony Liguori [not found] ` <4784DA51.7080507-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> [not found] ` <1199889527.4382.28.camel__11785.4029442698$1199889627$gmane$org@localhost.localdomain> 0 siblings, 2 replies; 4+ messages in thread From: Anthony Liguori @ 2008-01-09 14:29 UTC (permalink / raw) To: dor.laor; +Cc: kvm-devel, virtualization@lists.linux-foundation.org Dor Laor wrote: > Now that we have a host timer based tx wakeup it waits for 64 > packets or timeout before processing them. > This might cause the guest to run out of tx buffers while the host > holds them up. > There's a proper fix that Rusty added last night. > This is a temporal solution to quickly bring back performance to 800mbps. > But a better fix will soon be sent (its not the only problem). > How are you doing performance testing? Regards, Anthony Liguori > Signed-off-by: Dor Laor <dor.laor@qumranet.com> > --- > qemu/hw/virtio-net.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c > index 777fe2c..3d07b65 100644 > --- a/qemu/hw/virtio-net.c > +++ b/qemu/hw/virtio-net.c > @@ -293,7 +293,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) > n->vdev.update_config = virtio_net_update_config; > n->vdev.get_features = virtio_net_get_features; > n->rx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_rx); > - n->tx_vq = virtio_add_queue(&n->vdev, 128, virtio_net_handle_tx); > + n->tx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_tx); > n->can_receive = 0; > memcpy(n->mac, nd->macaddr, 6); > n->vc = qemu_new_vlan_client(nd->vlan, virtio_net_receive, > ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <4784DA51.7080507-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] Increase the tx queue to 512 descriptors to fix performance problem. [not found] ` <4784DA51.7080507-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2008-01-09 14:38 ` Dor Laor 0 siblings, 0 replies; 4+ messages in thread From: Dor Laor @ 2008-01-09 14:38 UTC (permalink / raw) To: Anthony Liguori Cc: kvm-devel, Avi Kivity, virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org On Wed, 2008-01-09 at 08:29 -0600, Anthony Liguori wrote: > Dor Laor wrote: > > Now that we have a host timer based tx wakeup it waits for 64 > > packets or timeout before processing them. > > This might cause the guest to run out of tx buffers while the host > > holds them up. > > > > There's a proper fix that Rusty added last night. This is with his latest patch, without it I got a lot of "printk("Unlikely: restart svq failed\n");" + The performance is much better now. > > > This is a temporal solution to quickly bring back performance to 800mbps. > > But a better fix will soon be sent (its not the only problem). > > > > How are you doing performance testing? Not really, this was just to stabilize the module. It needs some more work, disable/enable of the device is broken. > > Regards, > > Anthony Liguori > > > Signed-off-by: Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org> > > --- > > qemu/hw/virtio-net.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c > > index 777fe2c..3d07b65 100644 > > --- a/qemu/hw/virtio-net.c > > +++ b/qemu/hw/virtio-net.c > > @@ -293,7 +293,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) > > n->vdev.update_config = virtio_net_update_config; > > n->vdev.get_features = virtio_net_get_features; > > n->rx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_rx); > > - n->tx_vq = virtio_add_queue(&n->vdev, 128, virtio_net_handle_tx); > > + n->tx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_tx); > > n->can_receive = 0; > > memcpy(n->mac, nd->macaddr, 6); > > n->vc = qemu_new_vlan_client(nd->vlan, virtio_net_receive, > > > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1199889527.4382.28.camel__11785.4029442698$1199889627$gmane$org@localhost.localdomain>]
[parent not found: <1199889527.4382.28.camel__11785.4029442698$1199889627$gmane$org-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>]
* Re: [PATCH] Increase the tx queue to 512 descriptors to fix performance problem. [not found] ` <1199889527.4382.28.camel__11785.4029442698$1199889627$gmane$org-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> @ 2008-01-09 14:51 ` Anthony Liguori 0 siblings, 0 replies; 4+ messages in thread From: Anthony Liguori @ 2008-01-09 14:51 UTC (permalink / raw) To: dor.laor-atKUWr5tajBWk0Htik3J/w Cc: kvm-devel, virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Dor Laor wrote: > On Wed, 2008-01-09 at 08:29 -0600, Anthony Liguori wrote: >> Dor Laor wrote: >>> Now that we have a host timer based tx wakeup it waits for 64 >>> packets or timeout before processing them. >>> This might cause the guest to run out of tx buffers while the host >>> holds them up. >>> >> There's a proper fix that Rusty added last night. > > This is with his latest patch, without it I got a lot of > "printk("Unlikely: restart svq failed\n");" > + The performance is much better now. How are you getting that? What are you running and what is your guest kernel? I've not seen that before. >>> This is a temporal solution to quickly bring back performance to 800mbps. >>> But a better fix will soon be sent (its not the only problem). >>> >> How are you doing performance testing? > > Not really, this was just to stabilize the module. > It needs some more work, disable/enable of the device is broken. What do you mean by disable/enable? FWIW, your patch really hurts netperf performance which is why I asked how you were measuring 800mbps. Regards, Anthony Liguori >> Regards, >> >> Anthony Liguori >> >>> Signed-off-by: Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org> >>> --- >>> qemu/hw/virtio-net.c | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c >>> index 777fe2c..3d07b65 100644 >>> --- a/qemu/hw/virtio-net.c >>> +++ b/qemu/hw/virtio-net.c >>> @@ -293,7 +293,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) >>> n->vdev.update_config = virtio_net_update_config; >>> n->vdev.get_features = virtio_net_get_features; >>> n->rx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_rx); >>> - n->tx_vq = virtio_add_queue(&n->vdev, 128, virtio_net_handle_tx); >>> + n->tx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_tx); >>> n->can_receive = 0; >>> memcpy(n->mac, nd->macaddr, 6); >>> n->vc = qemu_new_vlan_client(nd->vlan, virtio_net_receive, >>> ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-09 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09 13:23 [PATCH] Increase the tx queue to 512 descriptors to fix performance problem Dor Laor
2008-01-09 14:29 ` Anthony Liguori
[not found] ` <4784DA51.7080507-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-01-09 14:38 ` Dor Laor
[not found] ` <1199889527.4382.28.camel__11785.4029442698$1199889627$gmane$org@localhost.localdomain>
[not found] ` <1199889527.4382.28.camel__11785.4029442698$1199889627$gmane$org-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-01-09 14:51 ` Anthony Liguori
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox