-
Notifications
You must be signed in to change notification settings - Fork 56
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
Change the default number of spinner threads #104
Comments
I agree that the number of spinner threads has a significant effect on the overall behavior of a ROS application, including ROS-enabled Orocos processes. This is especially true if the process provides services, where a long-running callback actually blocks all subscriptions. Increasing the number of default spinner threads would be one option to mitigate the problem, and unless someone would use ROS primitives with callbacks directly within the same process or We had a similar problem in the past few weeks and I was thinking about the following alternative solutions, which eventually would scale better:
|
I could imagine option 1. would create many more activities/threads. Maybe that would be a bit too much in smaller systems. But one advantage could be to set the frequency on a particular topic (ex output state at 30Hz, incoming at 500Hz), rather than publishing/advertising at the component's frequency. To me ,option 2. seems like the best alternative, although I honestly don't really get the implications of 3 on the data flow. Annexe question about 2 : Could this mean that the |
Did you ever get the chance to work on this ? |
No, not yet, and it is not a priority. Setting the default value of |
I created a separate issue #117 for #104 (comment). The original request has been addressed in #116. Thanks, @ahoarau! |
Thanks for the merge. I'm still facing high cpu load when a few components are publishing at high frequency. I'm hoping the 'per component' callback would solve this. |
The default spinner thread count for
rtt_rosnode
is set to 1 .In roscpp code I see that setting it to zero gets us ths number of CPUs
https://github.com/ros/ros_comm/blob/kinetic-devel/clients/roscpp/src/libros/spinner.cpp#L207:L209
Is there any reason why this is set to 1 and not 0 ?
I had an issue on xenomai not allowing the ROS spinner thread to send anything (xeno task was taking too much ressources), which was solved setting more threads.
The text was updated successfully, but these errors were encountered: