Hi, 

Is it safe to assume this is vpp master?

More inline. 

> On Mar 9, 2021, at 5:16 AM, sokolov.3v...@gmail.com wrote:
> 
> Hello!
> 
> I am learning VPP and I need to transfer more than 10G using UDP protocol in 
> both directions (tx and rx).
> I tried to write an UDP server. There are three threads in the server 
> application. The first thread prints the transmission and reception 
> statistics. The second thread receives packets in a loop. The third thread 
> activates after the first received packet and starts transmitting UDP 
> datagrams back in a loop.

Took a quick look at the code. Do you expect packets from multiple clients or 
just one? If just one, you should consider using connected udp (see 
VPPCOM_ATTR_SET_CONNECTED). These sessions are pinned to a worker and don’t use 
locks but they can only rx and tx dgrams for a given flow (5-tuple). You’ll 
probably have to use only one thread for io as the 5 tuple for the 2 
connections will be the same. 

> If I am using vpp in single threaded mode, I can only transfer 2Gbps per 
> second and recieve about 8Gbps since the performance of one CPU core is not 
> enough.

These do seem a bit low, but it will depend a lot on the speed of your cpu. I’m 
assuming this is a release (not a debug) image. 

> If I set the number of workers in the /etc/vpp/startup.conf configuration 
> file in the cpu section, I get a speed of about 10G for reception and about 
> 100 kilobits per second for transmission (only 55 datagram per second).

Ah, that’s because non-connected udp binds end up with listeners on main thread 
and by default main thread is not polled. This should somewhat improve if you 
add “poll-main” to the session stanza in startup.conf.

Having said that, for max throughput you should probably use connected udp 
sessions, if possible. Otherwise, writes are only done from main thread and rx 
happens on all workers but with a lock. So tx is still limited as main thread 
is busy with non-forwarding processes and rx is not ideal. 

Regards,
Florin

> Please see my sources and vpp configuration. What should I change to improve 
> the performance of transmission?
> Also, please see the output of my application:
> 
> [root@5G-Infra-DU1 vpp_udp_ser_async_example2]# VCL_CONFIG=/etc/vpp/vcl1.conf 
> ./vcl_udp_server
> Packets sent PPS 0 (0 bits per second)
> Packets recv PPS 0 (0 bits per second)
> Packets sent PPS 13344 (27328512 bits per second)
> Packets recv PPS 4668681 (9412060896 bits per second)
> Packets sent PPS 55 (112640 bits per second)
> Packets recv PPS 4916520 (9911704320 bits per second)
> Packets sent PPS 55 (112640 bits per second)
> Packets recv PPS 5046687 (10174123008 bits per second)
> Packets sent PPS 55 (112640 bits per second)
> Packets recv PPS 5040438 (10161520992 bits per second)
>
> Thank, you
> <Makefile><main.cpp><startup1.conf>
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18892): https://lists.fd.io/g/vpp-dev/message/18892
Mute This Topic: https://lists.fd.io/mt/81200436/21656
Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to