On Thu, Aug 20, 2009 at 04:49:47PM +0930, Rusty Russell wrote: > On Thu, 13 Aug 2009 03:05:48 am Michael S. Tsirkin wrote: > > On Mon, Aug 10, 2009 at 03:51:12PM -0500, Anthony Liguori wrote: > > > Any rough idea on performance? Better or worse than userspace? > > > > Well, I definitely see some gain in latency. > ... > > Part of it might be that tx mitigation does not come into play with vhost. I > > need to disable it in qemu and see. > > A simple test I've found reasonably indicative when looking at base performance (before stuff like TSO get involved) is to do pings. Throughput with "ping -s 1024 -l 120 -c 1000000 -f -q" and latency with "ping -c 1000000 -f -q". > > (You may need to cut -l down if your ring is too small). > > Cheers, > Rusty. Surprisingly, I seem to get better-than-userspace throughput with this benchmark as well. Here's a test run locally, host-to-guest, over a veth link: vhost: [root@qus19 ~]# ping -c 1000000 -f -q 11.0.0.4 PING 11.0.0.4 (11.0.0.4) 56(84) bytes of data. --- 11.0.0.4 ping statistics --- 1000000 packets transmitted, 1000000 received, 0% packet loss, time 10230ms rtt min/avg/max/mdev = 0.005/0.006/0.035/0.000 ms, ipg/ewma 0.010/0.006 ms [root@qus19 ~]# ping -s 1024 -l 120 -c 1000000 -f -q 11.0.0.4 PING 11.0.0.4 (11.0.0.4) 1024(1052) bytes of data. --- 11.0.0.4 ping statistics --- 1000000 packets transmitted, 1000000 received, 0% packet loss, time 11270ms rtt min/avg/max/mdev = 0.006/0.006/0.022/0.002 ms, pipe 120, ipg/ewma 0.011/0.007 ms qemu: [root@qus19 ~]# ping -c 1000000 -f -q 12.0.0.2 PING 12.0.0.2 (12.0.0.2) 56(84) bytes of data. --- 12.0.0.2 ping statistics --- 1000000 packets transmitted, 1000000 received, 0% packet loss, time 59974ms rtt min/avg/max/mdev = 0.025/0.044/8.076/0.012 ms, pipe 2, ipg/ewma 0.059/0.045 ms [root@qus19 ~]# ping -s 1024 -l 120 -c 1000000 -f -q 12.0.0.2 PING 12.0.0.2 (12.0.0.2) 1024(1052) bytes of data. --- 12.0.0.2 ping statistics --- 1000000 packets transmitted, 833496 received, 16% packet loss, time 38841ms rtt min/avg/max/mdev = 0.133/4.482/9.728/0.771 ms, pipe 120, ipg/ewma 0.038/4.144 ms Will try over an external link next week when I get access to a back-to-back setup (don't want to bother with external switches at this point). -- MST _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization