From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96CF6A034C for ; Wed, 23 Feb 2022 14:46:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E10E41226; Wed, 23 Feb 2022 14:46:26 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id B4E62411B2 for ; Wed, 23 Feb 2022 14:46:24 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id gb21so501399pjb.5 for ; Wed, 23 Feb 2022 05:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=q5P3dNdy0CWfzmwgUEXOhnRWjyTEpKCZeaUXylssZ74=; b=HfcSfS6T2eOM7D859xPWQwLx6sb27zPt3FrqkpjmZvAtgs49IfJByKTRNU54nqXbQ1 IoUmaPy+uAzsDU2D5oeu6l8A7IZ84BL5iKx75dtaE833mhk/1nrXNYfuxuMGsLiXSId1 DssxDQZDW1xbDsNEZQ1cZogvG/EKndhV1Lpktvhe/mu0cAEIQcW91n65cA1cQzJ96c/e rw79x5Z0sXO7FmtYH1DMf8GxOjaB7/UeSduPvlWWO8MZGTGJHXhG5cN1E8uIHo8C8DK7 pCaLJz6yV6ZoBPvKdOPmjprGs5wuULiqy1aokhMUwuh9YwV7b+i4IlmR0AFHReMdg2we hnYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=q5P3dNdy0CWfzmwgUEXOhnRWjyTEpKCZeaUXylssZ74=; b=yFdw8RtA1LeIx+28IulLtDF/RSVorNBmNCp8W7irSf06c8iW5dz6zBITxoo2kPGnwk iw+bTSZKozmqaWKUqywHWIbCaMp2OTbrO1fUiBm/3rE8JvuoMoyUQLb8yu+x6/DKCxmC 55j5hPsAU0mzyCBzjHlvjolJyK2cKT4srIblW3j0yx35IdxAA8WxG/KP9lnyxAea6HCo zLY8Gq4CZ0xerkFoI1ZafnaqoEtF+2LuXKa3qP5NS6EXUmV/v8VTA9v0MXay2N4NL83d r5jZxEmDE8BncqRX3dwc11Hs4Y9FcTrcnEoCd5FO16SJCz5lkBqEiSWEBDA03W1dyZ1N 7DVw== X-Gm-Message-State: AOAM533rs2khVy/i47GgSmH9z3YfxNEZnSPIvtRBcSzIO1eFzl7HxE1N dkodZcoR91UDWwvACjEE6E3a1muIxkG+tN1YzgzT2m0dSyB9Lw== X-Google-Smtp-Source: ABdhPJwUrL5cT9LrNk0m9avg5Hg0l/CisWZorde+lWYONNiUhLLXhULeWDW1Vlm0yvPFZMeEn4XlqMe7270zL3SHoUI= X-Received: by 2002:a17:902:6b0a:b0:14d:8ee9:3298 with SMTP id o10-20020a1709026b0a00b0014d8ee93298mr27724767plk.125.1645623983638; Wed, 23 Feb 2022 05:46:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Harold Huang Date: Wed, 23 Feb 2022 21:46:12 +0800 Message-ID: Subject: Re: Question about the sndbuf of the tap interface with vhost-net To: users@dpdk.org Cc: jasowang@redhat.com, Maxime Coquelin , Chenbo Xia Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sorry. The performance tested by iperf is degraded from 4.5 Gbps to 750Mbps per flow. Harold Huang =E4=BA=8E2022=E5=B9=B42=E6=9C=8823=E6= =97=A5=E5=91=A8=E4=B8=89 21:13=E5=86=99=E9=81=93=EF=BC=9A > > 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/v= irtio_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/0a0be13b8fe2cac11da2063fb= 03f0f39359b3069 > > 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?