* two different threads polls the same port, different queues, why the throughput is the same @ 2016-11-14 5:28 张伟 2016-11-14 6:13 ` Kyle Larose 0 siblings, 1 reply; 3+ messages in thread From: 张伟 @ 2016-11-14 5:28 UTC (permalink / raw) To: dev 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? Thanks, wei ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: two different threads polls the same port, different queues, why the throughput is the same 2016-11-14 5:28 two different threads polls the same port, different queues, why the throughput is the same 张伟 @ 2016-11-14 6:13 ` Kyle Larose 2016-11-14 6:34 ` 张伟 0 siblings, 1 reply; 3+ messages in thread From: Kyle Larose @ 2016-11-14 6:13 UTC (permalink / raw) To: 张伟; +Cc: dev 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: two different threads polls the same port, different queues, why the throughput is the same 2016-11-14 6:13 ` Kyle Larose @ 2016-11-14 6:34 ` 张伟 0 siblings, 0 replies; 3+ messages in thread From: 张伟 @ 2016-11-14 6:34 UTC (permalink / raw) To: Kyle Larose; +Cc: dev 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-14 6:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-11-14 5:28 two different threads polls the same port, different queues, why the throughput is the same 张伟 2016-11-14 6:13 ` Kyle Larose 2016-11-14 6:34 ` 张伟
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).