Monday, November 30, 2009

ulimit



Do you want to enable realtime priority or change maximum memory locking with non root user?, the /etc/security/limits.conf store this limitation, for list of limitation issue a uname -a command, the name of limitation is described in limits.conf file. This is a example to enable realtime priority and change maximum locked memory to user ajhwb:

ajhwb    -    rtprio     60
ajhwb    -    memlock    512


Now save the file, if the affected user is currently login, logout first and re-login. Changes are made after next login. You may want to test by write a simple code that switch to a realtime scheduler and priority or you can use chrt utility, also test maximum locked memory more than 64Kb as standard definition. There are many you can change in the limits.conf, have fun!