DPDK patches and discussions
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <bug-892-3@http.bugs.dpdk.org/> (raw)

https://bugs.dpdk.org/show_bug.cgi?id=892

            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 undershoot
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 = 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 residual
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 unbounded
when it is not being used, but isn't that the purpose of the tb_size parameter?
 If this is intentional then it means shaping at the TC is very different to
shaping at the pipe or subport levels.

-- 
You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2021-11-30 14:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-892-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@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).