Fix: systemd Resource Limits #246
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove limits on RTPrio and MEMLock in systemd services.
Services are by default resource locked, however, if ran as root, these services have unrestricted access to resources such as scheduling priority and locking memory in place.
When running services as a non root user, the default resource locks apply unless explicitly overwritten. These default resource limits can be defined system wide using the
/etc/systemd/system.conf
, but by default this file is empty and all limits are unset. This does not mean that by default these resources are unrestricted, instead these limits fall to the kernel and operating system.Therefore, every service that might run processes that require real-time scheduling or locked-in-memory, such as the
ros2_control
controller or manipulator communication, needs to have these resources unrestricted.