DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: Zoltan Kiss <zoltan.kiss@schaman.hu>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] rte_sched library performance question
Date: Thu, 16 Feb 2017 19:08:05 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891265274E7BB@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <CAMgiFNxGanV+cC4eO2o6bbah=5teZTaheZ5iYV+xiNk5Hz7unQ@mail.gmail.com>

Hi Zoltan,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zoltan Kiss
> Sent: Thursday, February 16, 2017 3:14 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] rte_sched library performance question
> 
> Hi,
> 
> I'm experimenting a little bit with the scheduler library, and I got some
> performance numbers which seems to be worse than what I've expected.
> I'm sending 64 bytes packets on a 10G interface to a separate thread, and
> my simple test program (based on the qos_sched example) does the
> following:
> 
> while (1) {
>             uint16_t ret = rte_ring_sc_dequeue_burst(it.ring,
> (void**)flushbatch, FLUSH_SIZE);
>             rte_mbuf** t = flushbatch;
> 
>             if (!ret) {
>                 /* This call is necessary to make sure the TX completed
> mbuf's
>                  * are returned to the pool even if there is nothing to
>                  * transmit */
>                 rte_eth_tx_burst(it.portid, lcore, t, 0);
>                 continue;
>             }
>             rte_sched_port_enqueue(it.port, flushbatch, ret);
>             ret = rte_sched_port_dequeue(it.port, flushbatch, FLUSH_SIZE);

Looks to me like the scheduler dequeue burst is equal to the enqueue burst size of FLUSH_SIZE, right?
In this case, you are always dequeueuing the exact packets that you just enqueued, and the scheduler dequeue needs to work really hard to find exactly those FLUSH_SIZE queues that each one have a single packet at this point.

This is wht the enqueue burst size should be bigger than the dequeue burst size. Basically, you add some water into the reservoir up to a reasonable fill level before you start pouring it in your glass if you want to fill the glass quickly.

Typical values used:
-for vector PMD: (enqueue = 32, dequeue = 24), (32, 28), (32, 16), etc
-for scalar PMD: (64, 48), (64, 32), ... We used (256, 248) for VPP

>             while (ret) {
>                 uint16_t n = rte_eth_tx_burst(it.portid, lcore, t, ret);
>                 /* we cannot drop the packets, so re-send */
>                 /* update number of packets to be sent */
>                 ret -= n;
>                 t = &t[n];
>             };
> }
> 
> I run this on a separate thread, another one doing rx and feeding the
> packets to the ring. When I comment out the enqueue and dequeue part in
> the
> code (reducing it to simple l2fwd), I can forward the entire ~14 Mpps
> traffic, whilst with the scheduler enabled I can only reach ~5.4 Mpps at
> best. I've tried with a single pipe or with 4k (used rand() to randomly
> distribute between pipe, everything else (class etc) was set to 0), didn't
> make a difference. Is this expected? I'm running this on a Xeon E5-2630 0 @
> 2.30GHz
> 
> I've used the following configuration:
> 
> ; port configuration [port]
> 
> [port]
> frame overhead = 24
> number of subports per port = 1
> number of pipes per subport = 1024
> queue sizes = 64 64 64 64
> 
> ; Subport configuration
> 
> [subport 0]
> tb rate = 1250000000; Bytes per second
> tb size = 1000000000; Bytes
> tc 0 rate = 1250000000;     Bytes per second
> tc 1 rate = 1250000000;     Bytes per second
> tc 2 rate = 1250000000;     Bytes per second
> tc 3 rate = 1250000000;     Bytes per second
> tc period = 10;             Milliseconds
> tc oversubscription period = 1000;     Milliseconds
> 
> pipe 0-1024 = 0;        These pipes are configured with pipe profile 0
> 
> ; Pipe configuration
> 
> [pipe profile 0]
> tb rate = 1250000000; Bytes per second
> tb size = 1000000000; Bytes
> 
> tc 0 rate = 1250000000; Bytes per second
> tc 1 rate = 1250000000; Bytes per second
> tc 2 rate = 1250000000; Bytes per second
> tc 3 rate = 1250000000; Bytes per second
> tc period = 10; Milliseconds
> 
> tc 0 oversubscription weight = 1
> tc 1 oversubscription weight = 1
> tc 2 oversubscription weight = 1
> tc 3 oversubscription weight = 1
> 
> tc 0 wrr weights = 1 1 1 1
> tc 1 wrr weights = 1 1 1 1
> tc 2 wrr weights = 1 1 1 1
> tc 3 wrr weights = 1 1 1 1
> 
> Regards,
> 
> Zoltan

Regards,
Cristian

  reply	other threads:[~2017-02-16 19:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 15:13 Zoltan Kiss
2017-02-16 19:08 ` Dumitrescu, Cristian [this message]
2017-02-24 21:09   ` Zoltan Kiss

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=3EB4FA525960D640B5BDFFD6A3D891265274E7BB@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=zoltan.kiss@schaman.hu \
    /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).