[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1329519726-25763-1-git-send-email-aliguori@us.ibm.com>
Date: Fri, 17 Feb 2012 17:02:04 -0600
From: Anthony Liguori <aliguori@...ibm.com>
To: netdev@...r.kernel.org
Cc: Michael Tsirkin <mst@...hat.com>
Subject: [PATCH 0/2][RFC] vhost: improve transmit rate with virtqueue polling
Hi,
We've been studying small packet performance under KVM. Currently, this type of
workload performs fairly poorly in KVM compared to other hypervisors.
After a lot of study, we concluded that two factors currently are bottlenecking
performance.
1) vhost uses a single thread to read both the transmit and receive rings. The
code is clearly structured to support multiple threads but only does a single
thread today. As these patches show, this has a significant affect on
performance when running a two VCPU Linux guest under KVM.
2) When dealing with a workload like multiple TCP_RR instances, we process
packets off the transmit queue too quickly. It seems to be rare to actually
get significant batching. vhost does not use a timer for TX mitigation
instead relying on scheduling latency to encourage batching. But in an
unloaded system, the vhost thread simply gets scheduled too quickly and the
exit cost dominates the workload.
In the second patch, we introduce an mechanism to poll the transmit ring for
a short period of time. While this series doesn't show it, in our testing
with similar code, this can have a dramatic affect on throughput.
The second patch does manual tuning but we have a third patch that uses a simple
adaptive algorithm. I'll follow up soon with this patch and results for it.
We're looking to get some feedback on the approach here. I think the first
patch should be pretty non-controversial (other than the broadcast wake-up).
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists