Cannot assign multi-core to Trex Server

892 views
Skip to first unread message

hongyizh...@gmail.com

unread,
Oct 24, 2018, 7:39:35 AM10/24/18
to TRex Traffic Generator
Hey,

I have encountered a problem. I want to assign more cores since I need to test a NAT machine to find the bottleneck of it, which means I need to generate a huge amount flows and reach a really high generation rate.

But when I use the command below, it told me that the Virtio driver cannot support multi-queue.

root@left:~/trex/v2.43# ./t-rex-64 -i -c 4
WARNING: tried to configure 2048 hugepages for socket 0, but result is: 1431
Killing Scapy server... Scapy server is killed
Starting Scapy server..... Scapy server is started
The ports are bound/configured.
Starting TRex v2.43 please wait ...
set driver name net_virtio
driver capability :
Number of ports found: 2
Error: the number of cores should be 1 when the driver support only one tx queue and one rx queue. Please use -c 1

We are running Trex by using VM with Debian system. And actually, I think now Virito supports the multi-queueing. The machine using Moongen can send packets using this feature. Also, you can see the combined queues below.

Channel parameters for ens8:
Pre-set maximums:
RX: 0
TX: 0
Other: 0
Combined: 5
Current hardware settings:
RX: 0
TX: 0
Other: 0
Combined: 5

root@left:~# ethtool -l ens9
Channel parameters for ens9:
Pre-set maximums:
RX: 0
TX: 0
Other: 0
Combined: 5
Current hardware settings:
RX: 0
TX: 0
Other: 0
Combined: 5

Do you have any solution or suggestions for this? We are really confused about that. Thank you so much!

Regards

hanoh haim

unread,
Oct 24, 2018, 7:56:41 AM10/24/18
to hongyizh...@gmail.com, trex...@googlegroups.com
Hi, 
Move to physical ports or add move virtio interfaces. 

--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To post to this group, send email to trex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/1e5345ea-8c27-48ea-a354-fb79a11cd515%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Hanoh
Sent from my iPhone

hongyizh...@gmail.com

unread,
Oct 24, 2018, 8:31:33 AM10/24/18
to TRex Traffic Generator
Thanks for your reply.

Still the same problem when I adding more interface to the VM. Now it is 4 ports

root@left:~/trex/v2.43# ./t-rex-64 -i -c 2
WARNING: tried to configure 2048 hugepages for socket 0, but result is: 1438
Killing Scapy server... Scapy server is killed
Starting Scapy server.... Scapy server is started
The ports are bound/configured.
Starting TRex v2.43 please wait ...
set driver name net_virtio
driver capability :
Number of ports found: 4
Error: the number of cores should be 1 when the driver support only one tx queue and one rx queue. Please use -c 1

Does that mean I need to change the driver to solve this problem if I still use the VMs.

Regards

hanoh haim

unread,
Oct 24, 2018, 10:44:16 AM10/24/18
to hongyizh...@gmail.com, trex...@googlegroups.com
Hi, 
With virtio interface, each 2 ports could have only one DP code (c=1) so to have 4 DP cores, you should have 4*2 =8 virtio ports  

thanks,
Hanoh


For more options, visit https://groups.google.com/d/optout.


--

hongyizh...@gmail.com

unread,
Oct 24, 2018, 12:00:33 PM10/24/18
to TRex Traffic Generator
Yes, I know that. So now I tried to only use 2 DP cores and with 4 virtio ports. And also I assign 6 cores to the VM. The calculation is -c <num>(2) * dual ports (2) + 1 master thread +1 latency = 6 threads. I think it fits the requirement, but still appears the same error.

"the number of cores should be 1 when the driver support only one tx queue and one rx queue. Please use -c 1"

Thanks again for your response!

Regards

hanoh haim

unread,
Oct 24, 2018, 12:03:35 PM10/24/18
to hongyizh...@gmail.com, TRex Traffic Generator
Try to read my answer again.


For more options, visit https://groups.google.com/d/optout.
--

hongyizh...@gmail.com

unread,
Oct 24, 2018, 3:42:35 PM10/24/18
to TRex Traffic Generator
Thank you so much, I will try it again.

Best Regards

map...@gmail.com

unread,
Oct 31, 2018, 9:13:09 AM10/31/18
to TRex Traffic Generator
Hi Hanoch,

Can you elaborate on that? Virtio does support multi-queue and is behaving like any other physical drivers on that regard. What prevents multi-queing or multi-threading with virtio?

Thanks,
Tom

hanoh haim

unread,
Oct 31, 2018, 9:52:38 AM10/31/18
to map...@gmail.com, trex...@googlegroups.com
Hi Tom, 
TRex requires a hardware filter capability from the DPDK driver for redirecting the latency packets for rx-core. 
Due to this reason there is a limit for *one* DP core per dual ports. One way to add more traffic  is to add more virtio interfaces. 
Another way to solve this is to use RSS and redirect the packets in software but we focus on real physical nics 

thanks
Hanoh


For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages