I just did some tests on PVE 1.7, trying out combinations of Kernels 2.6.32-4 and 2.6.35-1 with virtio NIC vs e1000 NIC. The objective of the test was to find the best possible network performance between (debian lenny amd64) KVM guests.
Latency was tested with: ping -c 10000 -f <otherGuest>
Throughput was tested with: iperf --format m --time 60 --client <otherGuest>
System under test:
My conclusions from these very simple tests are:
Now my question is: do I have to choose between good latency and good throughput? Or can I somehow improve the latency of virtio, making it the network emulation of choice? Thanks for any advice!
PS: let me know if you want more details about the test setup
Latency was tested with: ping -c 10000 -f <otherGuest>
Throughput was tested with: iperf --format m --time 60 --client <otherGuest>
System under test:
- 1x KVM host, running PVE 1.7, 4-core Intel i7-920, 12GB RAM
- 2x KVM guest, running on the one KVM host, 1 CPU, 2GB RAM, virtio block device, cache=none
My conclusions from these very simple tests are:
- The choice of kernel did not seem to make much difference (I only observed a slightly better latency in 2.6.35 by about 10%)
- Latency is ~3 times better with e1000
- Throughput is ~3 times better with virtio
- KVM guests were fully CPU-bound during iperf tests (as expected)
- KVM guest --> KVM Host throughput is very bad with e1000 (~300Mbit/s), but excellent with virtio (~2.1Gbit/s)
- e1000: latency 0.300ms; throughput 600Mbit/s
- virtio: latency 0.850ms; throughput 1.8Gbit/s
Now my question is: do I have to choose between good latency and good throughput? Or can I somehow improve the latency of virtio, making it the network emulation of choice? Thanks for any advice!
PS: let me know if you want more details about the test setup