DPDK patches and discussions
 help / color / mirror / Atom feed
From: 张伟 <zhangwqh@126.com>
To: "Kyle Larose" <eomereadig@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] two different threads polls the same port, different queues, why the throughput is the same
Date: Mon, 14 Nov 2016 14:34:01 +0800 (CST)	[thread overview]
Message-ID: <dccf6ba.71bf.158618ae253.Coremail.zhangwqh@126.com> (raw)
In-Reply-To: <CAMFWN9=sA9v3-PwC_WnSdRYSNnR=Pe-k9PeMib2enwr-9bPh5A@mail.gmail.com>



I do not have any lock/critical sections in my code. 
I have logs to print out the core id, src port, dst port and queue id.  worker 0 runs on core 1,  run macswap very light, the throughput is 4.5Mpps. worker 1 runs on core2, is a load balancer heavy, the throughput is also 4.5Mpps. This does not make sense at all. 

***thread core_id=1, src_port=0, dst_port=0, rx_queue_id=0, tx_queue_id=0

***thread core_id=2, src_port=0, dst_port=0, rx_queue_id=1, tx_queue_id=1

Core 0: Running stat thread

worker_id=0, core_id=1, pkt_rate=4418972

worker_id=1, core_id=2, pkt_rate=4419808

worker_id=0, core_id=1, pkt_rate=4631684

worker_id=1, core_id=2, pkt_rate=4632928
 







At 2016-11-14 14:13:25, "Kyle Larose" <eomereadig@gmail.com> wrote:
>On Mon, Nov 14, 2016 at 2:28 PM, 张伟 <zhangwqh@126.com> wrote:
>> Hi all,
>>
>>
>> I have two threads process the packets with different ways. thread A (core 0) is very heavy, thread B (core 1) is very light.   If I just run each of them, their throughput is huge different with small packet. Thread A polls queue 0 of port 0, thread B polls queue 1 of port 0. If I run them at the same time, why thread A and thread B get same throughput. This makes me very confused. Does anyone have the same experience or know some possible reasons?
>>
>
>Can you give some examples with numbers? My first thought is that
>maybe the two threads are contending for the same physical core. You
>don't have any locking/critical sections, do you?
>>
>> Thanks,
>> wei

      parent reply	other threads:[~2016-11-14  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14  5:28 张伟
     [not found] ` <CAMFWN9=sA9v3-PwC_WnSdRYSNnR=Pe-k9PeMib2enwr-9bPh5A@mail.gmail.com>
2016-11-14  6:34   ` 张伟 [this message]

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=dccf6ba.71bf.158618ae253.Coremail.zhangwqh@126.com \
    --to=zhangwqh@126.com \
    --cc=dev@dpdk.org \
    --cc=eomereadig@gmail.com \
    /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).