Multicast of large topic blocks the network

3 posts / 0 new
Last post
Offline
Last seen: 8 years 5 months ago
Joined: 11/18/2015
Posts: 9
Multicast of large topic blocks the network

I'm trying to multicast a topic containing a large byte array (I'm sending messages with a size between 200kb and 900kb).

As far as I'm concert I have to make a custom flow controller for the DomainParticipant as well as setting some UDP properties like message_size_max and socket_buffer_size.

I've also changed the QoS policy on the dataWriter.

Whenever i start the application and starts publishing, the entire network is blocked like a ddos attack. 

I've followed some instructions provided here  https://community.rti.com/examples/custom-flow-controllers
and here: https://community.rti.com/content/forum-topic/transport-file-size-message

As well as here: https://community.rti.com/static/documentation/connext-dds/5.2.0/doc/manuals/connext_dds/html_files/RTI_ConnextDDS_CoreLibraries_UsersManual/Content/UsersManual/Setting_Builtin_Transport_Properties_of_.htm

I'm running RTI Connext 5.2 but is using the traditional coding style in a c++11 project.

I've attached the to classes dealing with setting up a participant and setting up publishers (publisher.cpp is usually a header file but is renamed due to file extension restrictions).

thanks

Sune

AttachmentSize
File participantwrapper.cpp3.36 KB
File publisher.cpp3.08 KB
Fernando Garcia's picture
Offline
Last seen: 5 months 3 days ago
Joined: 05/18/2011
Posts: 199

Hi Sune,

We took a look at the configuration of your flow controller and I think that it is the cause of that flood of messages that blocks your entire network. 

	customFlowController.scheduling_policy =
			DDS_RR_FLOW_CONTROLLER_SCHED_POLICY;
	customFlowController.token_bucket.period.sec = 0;
	customFlowController.token_bucket.period.nanosec = 10000000;
	customFlowController.token_bucket.max_tokens = 100;
	customFlowController.token_bucket.tokens_added_per_period = 40;
	customFlowController.token_bucket.tokens_leaked_per_period = 0;
	customFlowController.token_bucket.bytes_per_token = 66000;

66KB per token x 40 tokens per period x 100 periods per second adds up to ~240 MB/s or ~1920 Mbits/s, which is probably more than what your network can handle.

How are you sending those messages? Are they in a loop that sends a message every few seconds or you are writing as fast as you can? Reconfiguring your flow controller to send less bytes per period should fix your issue, but it would be interesting to know how you are writing these messages.

Thanks,
Fernando. 

Offline
Last seen: 8 years 5 months ago
Joined: 11/18/2015
Posts: 9

Hi Fernando.

Thanks a lot. 
I'm sending as fast as my camera source allows, which is close to 90fps.
I guess a reconfiguration to about 4tokens pr period and 24 periods pr second will do, so I'm gonna try that.

Thank you for your time.

Sune