Monday, November 7, 2011

User authority for operating system real-time capabilities

Low-latency-sensitive applications will try to pin all their memory and use (through chrt or
sched_setscheduler()) real-time priorities for application threads.

To enable this capability, create a group with these special privileges and add the required users to this
group. Typical values for this privileged group can be set in a configuration file as follows:

TIMEOUT=unlimited # in minutes
cat >>/etc/security/limits.conf <<EOF
@realtime soft cpu $TIMEOUT
@realtime - rtprio $RT_PRIORITY
@realtime - nice $NICE
@realtime - memlock $MEMLOCK

User profiles can then be added to the realtime group with usermod:
usermod -g realtime <userid>

Users must sign out and then sign back into the system for these changes to take effect.

For more information about the limits.conf file, see the limits.conf man page.

No comments:

Post a Comment