JackLab/Assigning real-time priorities with PAM
From openSUSE
In order for your sound synthesis programs to work smoothly without overloading the processor and causing dropouts and other undesirable effects, they must be run with what is called "real-time" priority. What this actually means is that the user who starts the applications must be allowed by the system to run real-time applications. There have been several ways to do this: run the applications as the "root" user, apply the rt-lsm patch to your kernel sources and recompile them to produce a kernel able to load a real-time permission module, or install a pre-patched and compiled kernel.
Under SuSE 10.2 there is a much better and easier way to do this using the PAM (Pluggable Authentication Modules) system configuration interface. To use it, you don't have to run your applications as root, compile your own kernel or install a new one.
This approach involves giving the authorization to run applications with real-time priority to a group of users (for example the group "audio"), and then putting the users who need to use audio synthesis apps into that group.
To grant real-time privileges to the group audio, you must edit the file /etc/security/limits.conf . This file must be edited as root, for example by starting "Applications / System / File Manager / File Manager - Super user mode". Navigate to /etc/security, right-click on the file limits.conf and select "Open with / Kate". Add the following lines to the bottom of the file:
@audio - rtprio 100 @audio - nice -10 @audio - memlock 400000
then save it.
Now add your users to the audio group on this machine. Start YaST (Computer / Administrator settings), start the group manager (Security and Users / Group Management). Set the group filter to "System" and double-click on the "audio" group. Check the desired users in the right-hand list, then "Accept" and "Finish." I'm not sure if the computer needs to be rebooted for the PAM configuration changes to be taken into account.
NOTE: The values shown are examples only. They are taken from the German computer magazine c't (c't special 05/06 p. 123), and they work for me. Others here have recommended a value of -15 for "nice" which gives the audio group a higher priority. Some people recommend that memlock should be set to about 1/2 of your physical RAM size. You can experiment with this if necessary.
See this ALSA WIKI page or Florian Schmidt's webpage for more detailed information.

