Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Spdp directly when we have a new discovered participant #2798

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jwillemsen
Copy link
Member

No description provided.

Directly send sedp when we have a new discovered participant, the original shorten resulted in a 3 second delay with the default settings, see OpenDDS#2787
@mitza-oci mitza-oci changed the title Send Sedp directly when we have a new discovered participant Send Spdp directly when we have a new discovered participant Jul 8, 2021
@simpsont-oci
Copy link
Contributor

The small delay is important, since it protects against a flood of outgoing SPDP announcements when a large number of remote participants are discovered sequentially. On a network of 300 participants, all trying to discover each other, we get 300^2 participant announcements if we respond immediately for every incoming SPDP message. This floods the network and causes lots of packet loss / slower discovery times.

Perhaps we can have a special case for "the first SPDP announcement we've seen in X seconds (or since startup)" to respond immediately, but we need a safe fallback for the large deployment case.

@jwillemsen
Copy link
Member Author

I can see your point with 300 participants, but with the small DevGuideExample which writes 100 samples it takes 7 seconds for the test to complete with RTPS, and below 1 second when using the DCPSInfoRepo.

@simpsont-oci Maybe we could have a configurable limit for the amount of domain participants under which we do a direct send, above we do a delayed send? Really would like to see that the use case of a simple system has fast discovery.

@jrw972
Copy link
Contributor

jrw972 commented Jul 9, 2021

I agree with Tim that we need to be smart about sending SPDP to avoid flooding networks. I have an idea on this that I will try to document and circulate.

Beyond that, is the delay from SPDP or from SEDP? If SEDP, you may want to try responsive mode (see the dev guide).

dds/DCPS/RTPS/Spdp.cpp Outdated Show resolved Hide resolved
@jwillemsen
Copy link
Member Author

It is SPDP, I also see the same slow discovery on Linux, not always, but there it also happens.

@jrw972
Copy link
Contributor

jrw972 commented Aug 5, 2021

I agree with Tim that we need to be smart about sending SPDP to avoid flooding networks. I have an idea on this that I will try to document and circulate.

Beyond that, is the delay from SPDP or from SEDP? If SEDP, you may want to try responsive mode (see the dev guide).

When a participant receives an SPDP message from a new participant, it should send its own announcement to the new participant quickly but not too quickly lest the network becomes flooded.

Let D be an arbitrary delay, e.g., 10 ms.

Let N be the number of remote participants discovered by a participant P.

Whenever P receives an SPDP message for new remote Q, it picks a random number r in [0,N) and schedules to send a directed (unicast, INFO_DST) announcement to Q at D * r seconds in the future.

Assuming that D and N are the same for all participants in the network, then the random delay should smooth out discovery while still making it responsive.

@Saurabh996
Copy link

Any update on improving this slow discovery of participants associated with RTPS mode?

@mitza-oci
Copy link
Member

Any update on improving this slow discovery of participants associated with RTPS mode?

How many participants are you supporting? What is ResendPeriod set to?

@Saurabh996
Copy link

Any update on improving this slow discovery of participants associated with RTPS mode?

How many participants are you supporting? What is ResendPeriod set to?

Less than 20 participants. Where do we have the option of setting up the "ResendPeriod"? As of now it should be in default only I suppose..

@simpsont-oci
Copy link
Contributor

simpsont-oci commented Sep 29, 2021

ResendPeriod is in the rtps_discovery section of the config file. You can check the OpenDDS developer's guide for more info on what this looks like, or try to find an example in one of the test configs.

@Saurabh996
Copy link

ResendPeriod is in the rtps_discovery section of the config file. You can check the OpenDDS developer's guide for more info on what this looks like, or try to find an example in one of the test configs.

Yes, got them. Thanks for the guidance.

@mitza-oci mitza-oci marked this pull request as draft October 12, 2021 19:27
@jrw972 jrw972 added this to the 4.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants