netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* utilizing multi queues of a net device
@ 2022-05-02  4:29 Eli Cohen
  2022-05-02 16:21 ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Cohen @ 2022-05-02  4:29 UTC (permalink / raw)
  To: virtualization, netdev

Hi all,

I am experimenting with virtio net device running on a host. The net device has
multiple queues and I am trying to measure the throughput while utilizing all
the queues simultaneously. I am running iperf3 like this:

taskset 0x1 iperf3 -c 7.7.7.24 -p 20000 & \
taskset 0x2 iperf3 -c 7.7.7.24 -p 20001 & \
...
taskset 0x80 iperf3 -c 7.7.7.24 -p 20007

Server instances with matching ports exist.

I was expecting traffic to be distributed over the available send queues but
the vast majority goes to a single queue. I do see a few packets going to other
queues.

Here's what tc qdisc shows:

tc qdisc show dev eth1
qdisc mq 0: root
qdisc fq_codel 0: parent :8 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
qdisc fq_codel 0: parent :7 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
qdisc fq_codel 0: parent :6 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
qdisc fq_codel 0: parent :5 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64

Any idea?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: utilizing multi queues of a net device
  2022-05-02  4:29 utilizing multi queues of a net device Eli Cohen
@ 2022-05-02 16:21 ` Jakub Kicinski
  2022-05-03 10:11   ` Eli Cohen
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2022-05-02 16:21 UTC (permalink / raw)
  To: Eli Cohen; +Cc: virtualization, netdev

On Mon, 2 May 2022 04:29:09 +0000 Eli Cohen wrote:
> Hi all,
> 
> I am experimenting with virtio net device running on a host. The net device has
> multiple queues and I am trying to measure the throughput while utilizing all
> the queues simultaneously. I am running iperf3 like this:
> 
> taskset 0x1 iperf3 -c 7.7.7.24 -p 20000 & \
> taskset 0x2 iperf3 -c 7.7.7.24 -p 20001 & \
> ...
> taskset 0x80 iperf3 -c 7.7.7.24 -p 20007
> 
> Server instances with matching ports exist.
> 
> I was expecting traffic to be distributed over the available send queues but
> the vast majority goes to a single queue. I do see a few packets going to other
> queues.
> 
> Here's what tc qdisc shows:
> 
> tc qdisc show dev eth1
> qdisc mq 0: root
> qdisc fq_codel 0: parent :8 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> qdisc fq_codel 0: parent :7 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> qdisc fq_codel 0: parent :6 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> qdisc fq_codel 0: parent :5 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> 
> Any idea?

Make sure XPS is configured correctly. Looks like virtio_net cooked 
a less-than-prevalent-for-networking way of distributing CPUs.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: utilizing multi queues of a net device
  2022-05-02 16:21 ` Jakub Kicinski
@ 2022-05-03 10:11   ` Eli Cohen
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Cohen @ 2022-05-03 10:11 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: virtualization, netdev

> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Monday, May 2, 2022 7:22 PM
> To: Eli Cohen <elic@nvidia.com>
> Cc: virtualization <virtualization@lists.linux-foundation.org>; netdev@vger.kernel.org
> Subject: Re: utilizing multi queues of a net device
> 
> On Mon, 2 May 2022 04:29:09 +0000 Eli Cohen wrote:
> > Hi all,
> >
> > I am experimenting with virtio net device running on a host. The net device has
> > multiple queues and I am trying to measure the throughput while utilizing all
> > the queues simultaneously. I am running iperf3 like this:
> >
> > taskset 0x1 iperf3 -c 7.7.7.24 -p 20000 & \
> > taskset 0x2 iperf3 -c 7.7.7.24 -p 20001 & \
> > ...
> > taskset 0x80 iperf3 -c 7.7.7.24 -p 20007
> >
> > Server instances with matching ports exist.
> >
> > I was expecting traffic to be distributed over the available send queues but
> > the vast majority goes to a single queue. I do see a few packets going to other
> > queues.
> >
> > Here's what tc qdisc shows:
> >
> > tc qdisc show dev eth1
> > qdisc mq 0: root
> > qdisc fq_codel 0: parent :8 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> > qdisc fq_codel 0: parent :7 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> > qdisc fq_codel 0: parent :6 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> > qdisc fq_codel 0: parent :5 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> > qdisc fq_codel 0: parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> > qdisc fq_codel 0: parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> > qdisc fq_codel 0: parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> > qdisc fq_codel 0: parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
> >
> > Any idea?
> 
> Make sure XPS is configured correctly. Looks like virtio_net cooked
> a less-than-prevalent-for-networking way of distributing CPUs.

That make the trick.
Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-03 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02  4:29 utilizing multi queues of a net device Eli Cohen
2022-05-02 16:21 ` Jakub Kicinski
2022-05-03 10:11   ` Eli Cohen

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).