The socket buffer of the receiving and sending end is set to "8MB, 8MB", and the receiver is in the DIRECTRECV mode of while Loop recv, 8 Ros processes, each ROS processing a socket, sending and receiving packet length of 2KB, The bandwidth curve that ran for approximately 12 hours is as follows:
The average bandwidth of each receiving process is computed, and the average bandwidth of 8 processes is as follows:
2.61563 3.5609 3.50985 3.12713 3.22121 3.13252 3.00344 3.99146 26.16214
The total average bandwidth is 26gb/s, and the CPU idle at the receiving end is 0, and the CPU idle at the sending end is 80%. The bottleneck at this point is the CPU at the receiving end.
The top-h-P PID command allows you to see the number of threads in a process, and the Gstack PID allows you to see the thread's function call stack. With the previous two commands you can see that each ROS process has three threads executing: one is ros::udpchannels, the other is ros::requesthandler; One is recv. Where as long as recv is the currently receiving data thread. You can disable another two threads, release some CPU resources, increase the number of threads, and see if the bandwidth will continue to increase.
The question is: How to disable off udpchannels?
Ros:8 the bandwidth of a process to receive data