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

Improved discovery time [4661] #411

Merged
merged 5 commits into from
Feb 14, 2019

Conversation

richiware
Copy link
Member

Improved the time needed for discovering remote participants and theirs entities.

  • Reconfigured the attributes of EDP endpoints.
  • Using shrinked locators in several places not used yet.

@richiware richiware changed the title Improved discovery time Improved discovery time [4661] Feb 12, 2019
@richiware
Copy link
Member Author

Build status:

  • Linux Build Status
  • Mac Build Status
  • Windows Build Status

initialAcknackDelay.fraction = 200*1000*1000;
heartbeatResponseDelay.fraction = 20*1000*1000;
initialAcknackDelay.fraction = 300*1000*1000;
heartbeatResponseDelay.fraction = 50*1000*1000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was reduced from 500 to 20 in commit 201a393 to improve performance on some video tests. How will this affect this kind of cases?. Perhaps we should leave the defaults as they were and use specific values for discovery builtin readers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Changes only applied to SEDP endpoints.

heartbeatPeriod.seconds = 3;
nackResponseDelay.fraction = 20*1000*1000;
nackResponseDelay.fraction = 400*1000*1000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was reduced from 200 to 20 in commit 201a393 to improve performance on some video tests. How will this affect this kind of cases? I think this may produce a lot of bursts. Perhaps we should leave the defaults as they were and use specific values for discovery builtin writers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Changes only applied to SEDP endpoints.

* @param[in] writer Writer which creates this event.
* @param[in] interval_millisec Interval of the event in milliseconds.
*/
NackResponseDelay(StatefulWriter* writer, double interval_millisec);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New styling requires parameters on different lines

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* @param code Code representing the status of the event
* @param msg Message associated to the event
*/
void event(EventCode code, const char* msg= nullptr);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New styling requires parameters on different lines

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

src/cpp/rtps/writer/StatefulWriter.cpp Show resolved Hide resolved
src/cpp/rtps/writer/StatefulWriter.cpp Show resolved Hide resolved
src/cpp/rtps/writer/StatefulWriter.cpp Show resolved Hide resolved
src/cpp/rtps/writer/StatefulWriter.cpp Show resolved Hide resolved
src/cpp/rtps/writer/StatefulWriter.cpp Show resolved Hide resolved
@richiware
Copy link
Member Author

Build status:

  • Linux Build Status
  • Mac Build Status
  • Windows Build Status

@richiware
Copy link
Member Author

Build status:

  • Linux Build Status
  • Mac Build Status
  • Windows Build Status

@MiguelCompany MiguelCompany merged commit cb0a6e2 into release/1.7.1 Feb 14, 2019
@MiguelCompany MiguelCompany deleted the feature/improve_disc_perf branch February 14, 2019 06:12
@clalancette
Copy link
Contributor

I did some additional testing with this PR yesterday, and it certainly seems to improve the situation. In the ROS2 application I'm working on, there about 2 dozen topics publishing at around 20Hz. Before this patch, it could take up to 30 seconds to do discovery. Afterwards, the worst case I saw was about 2 seconds, though the mean time for discovery was in the 10s-of-milliseconds range.

We may still have to do some debugging on those long outliers (particularly since everything is localhost), but this is a huge improvement. Thanks!

@sloretz
Copy link
Contributor

sloretz commented Feb 21, 2019

@clalancette, @richiware, @MiguelCompany It looks like a couple ROS 2 tests are failing after this PR was merged (See ros2/build_farmer#166, Tests pass in bc61fa3 but fail in cb0a6e2 ). Specifically the tests are timing out. What information should I gather to help debug?

Failing tests
https://github.com/ros2/rclcpp/blob/8743bcb0a1ef06d6eea5ebbd247e019f9dbb1e10/rclcpp_action/test/test_client.cpp#L269-L288
https://github.com/ros2/system_tests/blob/master/test_cli/test/test_params_yaml.py

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.

4 participants