At Rusty's suggestion, I tested vhost base performance with ping.
Results below, and seem to be what you'd expect. I'm working on TSO
support, expect results shortly.
latency with ping (lower is better):
native:
[root at virtlab17 ~]# ping -c 1000000 -f -q 21.1.50.4
PING 21.1.50.4 (21.1.50.4) 56(84) bytes of data.
--- 21.1.50.4 ping statistics ---
1000000 packets transmitted, 1000000 received, 0% packet loss, time 73624ms
rtt min/avg/max/mdev = 0.047/0.061/1.253/0.036 ms, ipg/ewma 0.073/0.097 ms
vhost:
[root at virtlab17 ~]# ping -c 1000000 -f -q 20.1.50.4
PING 20.1.50.4 (20.1.50.4) 56(84) bytes of data.
--- 20.1.50.4 ping statistics ---
1000000 packets transmitted, 1000000 received, 0% packet loss, time 92308ms
rtt min/avg/max/mdev = 0.064/0.080/1.062/0.041 ms, ipg/ewma 0.092/0.083 ms
userspace:
[root at virtlab17 ~]# ping -c 100000 -f -q 20.1.50.4
PING 20.1.50.4 (20.1.50.4) 56(84) bytes of data.
--- 20.1.50.4 ping statistics ---
100000 packets transmitted, 100000 received, 0% packet loss, time 54473ms
rtt min/avg/max/mdev = 0.219/0.505/2.342/0.131 ms, ipg/ewma 0.544/0.485 ms
Conclusion: for latency difference between native and vhost is about
20usec, userspace is way slower.
This basically matches what was observed with venet.
##
throughput with ping (lower time is better):
native:
[root at virtlab17 ~]# ping -s 1024 -l 120 -c 100000 -f -q 20.1.50.2
PING 20.1.50.2 (20.1.50.2) 1024(1052) bytes of data.
--- 20.1.50.2 ping statistics ---
100000 packets transmitted, 100000 received, 0% packet loss, time 3582ms
rtt min/avg/max/mdev = 0.105/4.155/5.471/0.471 ms, pipe 120, ipg/ewma
0.035/4.567 ms
vhost:
[root at virtlab17 ~]# ping -s 1024 -l 120 -c 100000 -f -q 20.1.50.4
PING 20.1.50.4 (20.1.50.4) 1024(1052) bytes of data.
--- 20.1.50.4 ping statistics ---
100000 packets transmitted, 100000 received, 0% packet loss, time 3900ms
rtt min/avg/max/mdev = 0.354/4.129/6.009/0.520 ms, pipe 120, ipg/ewma
0.039/3.109 ms
userspace:
[root at virtlab17 ~]# ping -s 1024 -l 120 -c 1000000 -f -q 20.1.50.4
PING 20.1.50.4 (20.1.50.4) 1024(1052) bytes of data.
--- 20.1.50.4 ping statistics ---
1000000 packets transmitted, 999731 received, 0% packet loss, time 45082ms
rtt min/avg/max/mdev = 0.299/4.130/8.143/1.094 ms, pipe 120, ipg/ewma
0.045/1.117 ms
Conclusion: for throughput vhost is half-way between native and
userspace. Again, same thing as was observed with venet.
--
MST