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 CC81EA0C4C; Tue, 30 Nov 2021 15:14:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CB224113C; Tue, 30 Nov 2021 15:14:16 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 70F5C410F7 for ; Tue, 30 Nov 2021 15:14:15 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 46404A0C53; Tue, 30 Nov 2021 15:14:15 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 892] librte.sched scheduler can undershoot target rate Date: Tue, 30 Nov 2021 14:14:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: core X-Bugzilla-Version: 21.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mike.evans@microsoft.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org https://bugs.dpdk.org/show_bug.cgi?id=3D892 Bug ID: 892 Summary: librte.sched scheduler can undershoot target rate Product: DPDK Version: 21.11 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Normal Component: core Assignee: dev@dpdk.org Reporter: mike.evans@microsoft.com Target Milestone: --- As per the comments, we found that the scheduler can significantly undersho= ot the target rate, particularly if tc_period is set to a low value, the packet size is large and the bitrate is fairly low. As examples, testing with tc_period =3D 10ms, packet size of 1538 bytes and both pipe and TC bitrates= set to 1875000 bytes/s (1.5Mbps) we saw the target rate undershot by ~20%. The problem appears to be in grinder_credits_update, where TC credits are refreshed. Because the update simply sets the tc_credits to tc_credits_per_period, any residual credits are lost. In our test scenario, tc_period is 10ms, and so tc_credits_per_period is 1875. This means that in each tc_period the scheduler only sends one 1538 byte packet and the residu= al 337 bytes of credit are lost on the next refresh. This means we send 100 packets per second, whereas we would expect either 121 or 122 packets per second. It's not clear if the behaviour is intentional and the choice of 10ms for tc_credit is a poor one. It seems sensible not to let TC credit grow unbou= nded when it is not being used, but isn't that the purpose of the tb_size parame= ter? If this is intentional then it means shaping at the TC is very different to shaping at the pipe or subport levels. --=20 You are receiving this mail because: You are the assignee for the bug.=