Re: [PATCH 0/9][RFC] KVM virtio_net performance

Mark McLoughlin
2008-07-25T16:36:43Z

On Thu, 2008-07-24 at 13:29 -0500, Anthony Liguori wrote:
> Mark McLoughlin wrote:
> > Hey,
> > One all all-important thing I forgot to include was a comparison with
> > lguest :-)
> >
>
> Hey Mark,
>
> This patch set is really great! I guess the hard part now is deciding
> what all we want to apply. Do you have a suggestion of which patches
> you think are worth applying?

Good question. I think they're all fairly sane as a starting point, I
guess.

Making the tx timer adaptive, dropping the mutex when writing to the tap
interface and flushing the tx queue immediately on notify are all things
worth adding too, but they could be an additional patch set.

Your zero-copy patch is quite a chunk for not much gain - how do you
feel about that? Could we get that in upstream qemu?

> BTW, do you have native and guest loopback numbers to compare where we
> stand with native?

Yep, sorry:

netperf, 10x20s runs (Gb/s) | guest->host | host->guest
-----------------------------+----------------------------+---------------------------
KVM | 4.230/ 4.619/ 4.780/ 0.155 | 8.140/ 8.578/ 8.770/ 0.162
lguest | 5.700/ 5.926/ 6.150/ 0.132 | 8.680/ 9.073/ 9.320/ 0.205
loopback | 9.520/12.473/15.390/ 1.947

ping -f -c 100000 (ms) | guest->host | host->guest
-----------------------------+----------------------------+---------------------------
KVM | 0.199/ 0.326/ 7.698/ 0.744 | 0.199/ 0.245/ 0.402/ 0.022
lguest | 0.022/ 0.055/ 0.467/ 0.019 | 0.019/ 0.046/89.249/ 0.448
loopback | 0.001/ 0.002/ 0.025/ 0.001

Very surprising how much jitter there is in the loopback throughput figures.

> I'm surprised lguest gets an extra 1.3gb guest->host. Any idea of where
> we're loosing it?

The main difference on the tx path would appear to be the adaptive
timeout and the immediate flushing of the queue on notify.

Cheers,
Mark.