Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp429114rwb; Tue, 6 Dec 2022 23:54:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf42khv079isF/9B0pVk/po9B+dMguGphQ/U0vEfZuiAY0SSEbr7IkGd+trKWt618BqesMXF X-Received: by 2002:a50:c314:0:b0:46c:4850:a192 with SMTP id a20-20020a50c314000000b0046c4850a192mr17524325edb.65.1670399680794; Tue, 06 Dec 2022 23:54:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670399680; cv=none; d=google.com; s=arc-20160816; b=Hpb6yKfm0rlbU95alV4yrH9vLiHvO3513VT6tUZ2svFg0aVMLdfegcKO3RRK6EAlwY g+O/Q8PC/HeiYYPWvz0cBa1Rx8OMnosnPRPb68M+UkG0SHz1qjY4HYgW9XRZizm/+tbW flc3gseWlvwo6lz2T0FEJUwXCqUxPMgZVDhdumupj6gOVRL7lctOmajhjKUoqJ2wc2mV 6FLtjaNfxuKr6UkMtvNuiIu4nqC2nSNYrv6GGvKIniU+2BKXvJXIJjDS8TGgeouiHVNd Ijg7suVT/2SmvzH/jLcwBBZ9h4h/oy/BvqnWADZ3vRvvb4LamawkpROn/3YBR2NiQhL0 WV1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:references :in-reply-to:message-id:date; bh=5DD/o8/XVCYDH/XtoqLZe6ioUBlVf6/aSmjLIdzH20E=; b=NuZWepZ6Nw75AZHBXOm2G2fC+nASa8z7gQuHqnJkVy3nvKbsAyZ3KoFZbACcA15hXf dgXAcXCSUk1mijq8E7twbuUeG+zQ4woDQ/7d7VEhf0KaWRq+BF4uUpqQXEympB8BBQFX 0s8uZ8cBI2gC0qAMzl36pyebv9ddt3OFyfY+D79oYxks1ThDxsn3MXfKigHC8ZLKaOUc zvykfYvmZyqmBx9TmmnmGn5v+AaA1PV2tQ7MS1K2/e0SU8GrArRakkLXkrnxdv8E1dUb CqUpEaWv66CGJPUXnrft9D2y9huro0O4lTWRmHPvdWsTmqwpErj5YDbRZjz4lKkQObgB ID3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c2-20020aa7df02000000b0045c7611d8ddsi3546196edy.179.2022.12.06.23.54.22; Tue, 06 Dec 2022 23:54:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbiLGH1h (ORCPT + 77 others); Wed, 7 Dec 2022 02:27:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiLGH1g (ORCPT ); Wed, 7 Dec 2022 02:27:36 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AF6B276; Tue, 6 Dec 2022 23:27:31 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4NRplP6XBTz4y0vN; Wed, 7 Dec 2022 15:27:29 +0800 (CST) Received: from szxlzmapp02.zte.com.cn ([10.5.231.79]) by mse-fl1.zte.com.cn with SMTP id 2B77RJwO026399; Wed, 7 Dec 2022 15:27:19 +0800 (+08) (envelope-from yang.yang29@zte.com.cn) Received: from mapi (szxlzmapp02[null]) by mapi (Zmail) with MAPI id mid14; Wed, 7 Dec 2022 15:27:22 +0800 (CST) Date: Wed, 7 Dec 2022 15:27:22 +0800 (CST) X-Zmail-TransId: 2b046390405affffffffbd27def7 X-Mailer: Zmail v1.0 Message-ID: <202212071527223155626@zte.com.cn> In-Reply-To: <20221205184742.0952fc75@kernel.org> References: 20221205175314.0487527a@kernel.org,20221205184742.0952fc75@kernel.org Mime-Version: 1.0 From: To: Cc: , , , , , , , , , , , Subject: =?UTF-8?B?UmU6IFtQQVRDSCBsaW51eC1uZXh0XSBuZXQ6IHJlY29yZCB0aW1lcyBvZiBuZXRkZXZfYnVkZ2V0IGV4aGF1c3RlZA==?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 2B77RJwO026399 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.13.novalocal with ID 63904061.001 by FangMail milter! X-FangMail-Envelope: 1670398049/4NRplP6XBTz4y0vN/63904061.001/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63904061.001/4NRplP6XBTz4y0vN X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 6 Dec 2022 10:47:07 +0800 (CST) kuba@kernel.org wrote: > But are you seeing actual performance wins in terms of throughput > or latency? I did a test and see 7~8% of performance difference with small and big netdev_budget. Detail: 1. machine In qemu. CPU is QEMU TCG CPU version 2.5+. 2. kernel Linux (none) 5.14.0-rc6+ #91 SMP Tue Dec 6 19:55:14 CST 2022 x86_64 GNU/Linux 3. test condition Run 5 rt tasks to simulate workload, task is test.sh: --- #!/bin/bash while [ 1 ] do ls > /dev/null done --- 4. test method Use ping -f to flood. # ping -f 192.168.1.201 -w 1800 With netdev_buget is 500, and netdev_budget_usecs is 2000: 497913 packets transmitted, 497779 received, 0% packet loss, time 1799992ms rtt min/avg/max/mdev = 0.181/114.417/1915.343/246.098 ms, pipe 144, ipg/ewma 3.615/0.273 ms With netdev_budget is 1, and netdev_budget_usecs is 2000: 457530 packets transmitted, 457528 received, 0% packet loss, time 1799997ms rtt min/avg/max/mdev = 0.180/123.287/1914.186/253.883 ms, pipe 147, ipg/ewma 3.934/0.301 ms With small netdev_budget, avg latency increases 7%, packets transmitted decreases 8%. > Have you tried threaded NAPI? (find files called 'threaded' in sysfs) Thanks, we had researched on threaded NAPI, much applaud for it! But we think someone maynot use it because some kinds of reasons. One is threaded NAPI is good for control, but maynot good for throughput, especially for those who not care real-time too much. Another reason is distribution kernel may too old to support threaded NAPI? >Well, we can't be sure if there's really nobody that uses them :( As we still retain netdev_budget*, and there maybe some using it, should it be improve? Netdev_budget* are sysctl for administrator, when administrator adjust them, they may want to see the effect in a direct or easy way. That's what this patch's purpose.