Hi Zhike,
On 10/31/2017 12:25 PM, 王志克 wrote:
Hi,
I tested KNI, and compared with virtio-user. The result is beyond my
expectation:
The KNI performance is better (+30%) in simpe netperf test with TCP
and different size UDP. I though they have similar performance, but it
proved that KNI performed better in my test. Not sure why.
This is expected. As KNI has a better thread model, its kthread only
processes user->kernel path; the kernel->user path is processed in
ksoftirq thread.
Note in my test, I did not enable checksum/gso/… offloading and
multi-queue, since we need do vxLan encapsulation using SW. I am using
ovs2.8.1 and dpdk 17.05.2.
And below is the feature table. Note that OVS (mainstream) so far does
not integrate LRO/TSO etc.
KNI
virtio-user
Multi-seg (user->kernel) Y Y
Multi-seg (kernel->user) N Y
Multi-queue N Y
Csum offload (user->kernel) Y Y
Csum offload (kernel->user) N Y
Zero copy (user->kernel) N Experimental
Zero copy (kernel->user) N N
In addition, one queue pair on virtio-user would create one vhost
thread. If we have many containters, it seems hard to manage the CPU
usage. Is there any proposal/practice to limit the vhost kthread CPU
resource?
Yes, this is another thread model problem.
There is proposal from Redhat and IBM on this:
http://events.linuxfoundation.org/sites/events/files/slides/kvm_forum_2015_vhost_sharing_is_better.pdf.
But not sure when it will be ready.
Thanks,
Jianfeng
Br,
Wang Zhike