Skip to contentSkip to conversation

Increase the tx queue to 512 descriptors to fix performance problem.

PATCH In review Dor Laor 5 participants 6 messages Jan 9, 2008 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Dor Laor

author
#0 lore raw

PATCH 1/1 Increase the tx queue to 512 descriptors to fix performance problem.

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).

---
 qemu/hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu/hw/virtio-net.c +1 -1
index 777fe2c..3d07b65 100644
@@ -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,
Signature · 9 lines
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
#1 lore raw
Quoted 5 lines · Dor Laor

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.

Quoted 3 lines

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

Quoted 19 lines
---
 qemu/hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu/hw/virtio-net.c +1 -1
index 777fe2c..3d07b65 100644
@@ -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,
#2 lore raw
Quoted 8 lines · Anthony Liguori
Quoted 5 lines · Dor Laor

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.

Quoted 6 lines
Quoted 4 lines

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.

Quoted 25 lines

Regards,

Anthony Liguori

Quoted 19 lines
---
 qemu/hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu/hw/virtio-net.c +1 -1
index 777fe2c..3d07b65 100644
@@ -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,

A message that is not in the archive (sent off-list or not yet received): 1199889527.4382.28.camel__11785.4029442698$1199889627$gmane$org-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#4 lore raw
Quoted 7 lines · Dor Laor
Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Dor Laor

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.

Quoted 5 lines
Quoted 1 line

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.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

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

Quoted 9 lines
Quoted 9 lines

Regards,

Anthony Liguori

Quoted 5 lines
---
 qemu/hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
qemu/hw/virtio-net.c +0 -0
index 777fe2c..3d07b65 100644
@@ -293,7 +293,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
     n->vdev.update_config = virtio_net_update_config;
Quoted 8 lines

qemu/hw/virtio-net.c void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) · line 299

Quoted 8 lines
qemu/hw/virtio-net.c +1 -1
     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

#5 lore raw
In reply to Dor Laor
Quoted 7 lines · Dor Laor
Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Dor Laor

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.

Quoted 5 lines
Quoted 1 line

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.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

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

Quoted 23 lines
Quoted 23 lines

Regards,

Anthony Liguori

Quoted 19 lines
---
 qemu/hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
qemu/hw/virtio-net.c +1 -1
index 777fe2c..3d07b65 100644
@@ -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,

A message that is not in the archive (sent off-list or not yet received): 4784DA51.7080507-r/[email protected]

author
#7 lore raw
Quoted 8 lines · Anthony Liguori
Quoted 5 lines · Dor Laor

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.

Quoted 6 lines
Quoted 4 lines

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.

Quoted 10 lines

Regards,

Anthony Liguori

Quoted 5 lines
---
 qemu/hw/virtio-net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines
Quoted 6 lines
qemu/hw/virtio-net.c +0 -0
index 777fe2c..3d07b65 100644

qemu/hw/virtio-net.c void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) · line 299

Quoted 8 lines
qemu/hw/virtio-net.c +1 -1
@@ -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