From: Harold Huang <baymaxhuang@gmail.com>
To: users@dpdk.org
Cc: jasowang@redhat.com, Maxime Coquelin <maxime.coquelin@redhat.com>,
Chenbo Xia <chenbo.xia@intel.com>
Subject: Re: Question about the sndbuf of the tap interface with vhost-net
Date: Wed, 23 Feb 2022 21:46:12 +0800 [thread overview]
Message-ID: <CAHJXk3bpBosy01XojpCd=LFC1Dwbms9GA7FOEudOa_mRgPz7qA@mail.gmail.com> (raw)
In-Reply-To: <CAHJXk3b9WhMb7CDHbO3ixGg23G1u7Y+guoLQLWkARgX6Ssrpow@mail.gmail.com>
Sorry. The performance tested by iperf is degraded from 4.5 Gbps to
750Mbps per flow.
Harold Huang <baymaxhuang@gmail.com> 于2022年2月23日周三 21:13写道:
>
> I see in dpdk virtio-user driver, the TUNSETSNDBUF is initialized with
> INT_MAX, see: https://github.com/DPDK/dpdk/blob/main/drivers/net/virtio/virtio_user/vhost_kernel_tap.c#L169
> It is ok because tap driver uses it to support tx baching, see this
> patch: https://github.com/torvalds/linux/commit/0a0be13b8fe2cac11da2063fb03f0f39359b3069
>
> But in tun_xdp_one, napi is not supported and I want to user napi in
> tun_get_user to enable gro. As I result, I change the sndbuf to a
> value such as 212992 in /proc/sys/net/core/wmem_default. But the
> performance tested by iperf is greatly degraded, from 4.5 Gbps to
> 750Gbps per flow. I see the the iperf server consume 100% cpu core,
> which should be the bottleneck of the this test. The perf top result
> of iperf server cpu core is as follows:
>
> '''
> Samples: 72 of event 'cycles', 4000 Hz, Event count (approx.):
> 22685278 lost: 0/0 drop: 0/0
> Overhead Shared O Symbol
> 59.86% [kernel] [k] report_bug
> 20.66% [kernel] [k] module_find_bug
> 6.51% [kernel] [k] common_interrupt
> 2.82% [kernel] [k] __slab_free
> 1.48% [kernel] [k] copy_user_enhanced_fast_string
> 1.44% [kernel] [k] __skb_datagram_iter
> 1.42% [kernel] [k] notifier_call_chain
> 1.41% [kernel] [k] irq_work_run_list
> 1.41% [kernel] [k] update_irq_load_avg
> 1.41% [kernel] [k] task_tick_fair
> 1.41% [kernel] [k] cmp_ex_search
> 0.16% [kernel] [k] __ghes_peek_estatus.isra.12
> 0.02% [kernel] [k] acpi_os_read_memory
> 0.00% [kernel] [k] native_apic_mem_write
> '''
> I am not clear about the test result. Can we change the sndbuf size in
> dpdk? Is any way to enable vhost_net to use napi without changing the
> tun kernel driver?
next prev parent reply other threads:[~2022-02-23 13:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 13:13 Harold Huang
2022-02-23 13:46 ` Harold Huang [this message]
2022-02-24 3:23 ` Jason Wang
2022-02-24 4:19 ` Harold Huang
2022-02-24 4:36 ` Harold Huang
2022-02-24 4:39 ` Jason Wang
2022-02-24 7:31 ` Harold Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHJXk3bpBosy01XojpCd=LFC1Dwbms9GA7FOEudOa_mRgPz7qA@mail.gmail.com' \
--to=baymaxhuang@gmail.com \
--cc=chenbo.xia@intel.com \
--cc=jasowang@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).