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

RTPS discovery slow #2787

Open
jwillemsen opened this issue Jul 1, 2021 · 11 comments
Open

RTPS discovery slow #2787

jwillemsen opened this issue Jul 1, 2021 · 11 comments

Comments

@jwillemsen
Copy link
Member

When running the `DevGuidExamples/DCPS/Messenger' with RTPS on Windows it takes mostly 4 to 5 seconds to run this example, on Linux it finished almost directly. Looks RTPS discovery is slow on Windows, looking at the logs it takes around 3 seconds to let the publisher/subscriber find each other.

@jwillemsen
Copy link
Member Author

jwillemsen commented Jul 1, 2021

Attached log files.

publisher.log
subscriber.log

@simpsont-oci
Copy link
Contributor

simpsont-oci commented Jul 1, 2021

What's the value of ResendPeriod in the rtps_discovery section? Try setting it to something small?

@jwillemsen
Copy link
Member Author

jwillemsen commented Jul 1, 2021

I am not behind my PC right now but this is the DevGuide messenger example with all defaults, only tcp as data transport

@simpsont-oci
Copy link
Contributor

Yeah, I think the default is 30 seconds or something large like that, and the default "response" time is about 3 seconds, which sounds like it's what you're seeing. If you set it somewhere in the 1-10 seconds range I'm guessing it would feel more reasonable.

@jwillemsen
Copy link
Member Author

I will test a little bit with these settings, but when I have a subscriber running and I start the publisher, I would expect that at the moment the publisher is created the RTPS discovery will run, waiting on a resend period doesn't feel optimal, shouldn't the discovery process be triggered at the moment the publisher is created?

@jwillemsen
Copy link
Member Author

Debugged this a little bit further, it looks on Windows the order in which things are triggered is slightly different than on Linux. I start the subscriber on the console and the publisher in the debugger. At the moment now the datawriter is created in the publisher there is no associated participant at https://github.com/objectcomputing/OpenDDS/blob/045cde5cb9e4a01d8291917ba4a1527feb071e88/dds/DCPS/RTPS/Sedp.cpp#L5126 so the Sedp is not done at that point.

Now, a little bit later the remote participant is discovered and at https://github.com/objectcomputing/OpenDDS/blob/045cde5cb9e4a01d8291917ba4a1527feb071e88/dds/DCPS/RTPS/Spdp.cpp#L701 there is a comment that our announcement is send now so that they have to wait, but this is only a shorten, with the default settings of a ResendPeriod=30 and QuickResendRatio=0.1 this still means that there is a 3 second delay on the first announcement.

On a new participant, shouldn't we directly send out our announcement, the user can tune the settings to a shorter period, but that impacts also the resends, can image that a very short resend is also bad in some scenarios.

jwillemsen added a commit to jwillemsen/OpenDDS that referenced this issue Jul 2, 2021
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
@jwillemsen
Copy link
Member Author

Created #2798 as first step, this improves the startup delay already a lot, looks it still can be more faster, but let us first discuss this solution before spending even more time on this

@jwillemsen
Copy link
Member Author

jwillemsen commented Jul 2, 2021

I also see the same slow discovery on Linux, in our fedora opendds build the DevGuideExamples/DCPS/Messenger/run_test.pl takes 0 secons with InfoRepo discovery and 7 seconds with RTPS

@jwillemsen jwillemsen changed the title RTPS discovery slow on windows RTPS discovery slow Jul 4, 2021
@Saurabh996
Copy link

It's still in similar state, it seems?

@jwillemsen
Copy link
Member Author

Yes, no changes made yet, this needs more time to analyze and test solutions, feel free to open a PR with a more intelligent solution or consider sponsoring someone to work more on this.

@Saurabh996
Copy link

Okay..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants