From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id A389C45DA8;
	Mon, 25 Nov 2024 20:44:20 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 675C140BA0;
	Mon, 25 Nov 2024 20:44:20 +0100 (CET)
Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com
 [209.85.215.182])
 by mails.dpdk.org (Postfix) with ESMTP id 5265040BA0
 for <dev@dpdk.org>; Mon, 25 Nov 2024 20:44:19 +0100 (CET)
Received: by mail-pg1-f182.google.com with SMTP id
 41be03b00d2f7-7f8b01bd40dso3405356a12.0
 for <dev@dpdk.org>; Mon, 25 Nov 2024 11:44:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1732563857;
 x=1733168657; darn=dpdk.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=TD4cTj+iG312VhnjrHoKlSl3LptbvrPWf+7lRFnuygk=;
 b=Yk6n2JmfmEGwWDDlqnv6Prypj/s70O3jjldKCxDYgCuyiASwZ9Q/k06RCELW3+0N82
 RokpiO5xulTwzjumhN9MSesck3oQCaBrJpQQnowkEVypdV3QEE+UIsne+4VmIBnc3B0N
 OxDK06hKnGMRZ+qpl4K7bc1J+c9Df50UBmHxtyZaYkIRfMB5A8cf6e7iPee0Bcw/UZew
 JS+QL1RWrbcVCr5FlS+xdzBcD1Zz6zMqz+R4zI9pj+eVTzFsnRbiNsgvEk36QYQ1oOtI
 YayW2HC8TLOJL5cqn8dQXNCq0QuLnwx1qWCJfZu/LWOAjDwXrdOu6JRbQpCK+iaoIlMv
 kNdw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1732563857; x=1733168657;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=TD4cTj+iG312VhnjrHoKlSl3LptbvrPWf+7lRFnuygk=;
 b=m7hFuYecAYI/HAwY7Su1b2+TteKT47qNul3Z1MetctDNdioJ3cvLnItHpReSyCd4WY
 Z6VOfc50cWwRYrvHheJIa4KWmDix7j44goMZX18LnTdSswXD8aB2X8Zt+d59IZJtAUIg
 Eh/WHN438ow3bsxGYSCZR1LdAlCkcMQmbcRyj16Tq76o5nVSJ/E8NtDcOVDfqTKuIGWS
 m3TYY70R5A+DvGOQYBjCLma6qyo2ViE0DfdMaKps2nZBTgc/VNX9/3msMCmNci5U3pCt
 aGwsHMKvBr+QXTJpZCX9cuQoMJbSW9qtx3Fj2b/xAACpSl++Pm8KvJhYsE+jX4hav4Z0
 rohg==
X-Gm-Message-State: AOJu0YwTV1p9mSJZmG+KcKmjiF9EHeOzXHQQu6lu7ixHIEBQZDnEo1BA
 o55uFR0fOjqt+9ZzClYAfQ7qDQA3aU4cK5+QoSkyze/wJ9HGqFX18JWJvmTFRUk=
X-Gm-Gg: ASbGncuEVd8XXESXD4DL0FakpPvprDgD1MDdgFeiSpc18goX8x8O+wm5eECz1yPZzPY
 /1+gS7xUlGPfShzZNlwBipe8ZxZjH0O4qizk/nrZYoOsLC6/0O0kACDYmkXDFa1yCHedQvCGi93
 eZfZwNzq64pbQa1ucpFnYFpx0RbwGFj5iY/TCfUxvd9EE6eeNLNU+vXtsKATZ9SGndiga92gAAF
 mOdBXoRwlM308QJpa9f87yCESXYAhGSJySvyq5ZJkVq5aJhW9j8tQB5Om02peaTYJPlu17O5zYH
 o2uuTBiurfl56NHxxzI5sT1mw0Y=
X-Google-Smtp-Source: AGHT+IFb3ivleQVW5cQAycgyy1sUvz8hDf8yx1sh2aINeivXkSZvqnSiPL6H3JfX/TFUrPH7a1Aghw==
X-Received: by 2002:a17:902:db0e:b0:20c:68af:a4e3 with SMTP id
 d9443c01a7336-214e6f09464mr10354195ad.22.1732563857348; 
 Mon, 25 Nov 2024 11:44:17 -0800 (PST)
Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-2129dc2ab8csm68526025ad.277.2024.11.25.11.44.16
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 25 Nov 2024 11:44:17 -0800 (PST)
Date: Mon, 25 Nov 2024 11:44:10 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jie Hai <haijie1@huawei.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@amd.com>, Morten
 =?UTF-8?B?QnLDuHJ1cA==?= <mb@smartsharesystems.com>, Chengwen Feng
 <fengchengwen@huawei.com>, Huisong Li <lihuisong@huawei.com>,
 <huangdengdui@huawei.com>
Subject: Re: [PATCH] examples/l3fwd: fix Tx performance deteriorate
Message-ID: <20241125114410.2e8fe285@hermes.local>
In-Reply-To: <20241122071336.18470-1-haijie1@huawei.com>
References: <20241122071336.18470-1-haijie1@huawei.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, 22 Nov 2024 15:13:36 +0800
Jie Hai <haijie1@huawei.com> wrote:

> The application send packets only when the buffer is full, or the
> buffer is empty and the number of packets to be sent extends half
> of the buffer.
> 
> The change of MAX_PKT_BURST increases TX buffer size, while the
> default size of local cache on each lcore is 256, which not greater
> than the limit of transmitting. That would make the mbuf not on the
> local cache be frequently used and the performance deteriorates.
> 
> This problem can be solved by making the TX threshold smaller than
> the local cache size. For example, use the '--mbcache' parameter to
> make the local cache greater. This patch optimizes the default
> performance by lowering TX threshold.
> 
> Fixes: d5c4897ecfb2 ("examples/l3fwd: add option to set Rx burst size")
> 
> Signed-off-by: Jie Hai <haijie1@huawei.com>

Do the other variants of l3fwd have the same problem?