I want to run
mplayer with higher priority than any other processes, including the IO-processes. How can I do that?
ionice -c 2 -n 0 nice -n -20 mplayer
Note: the lowest level of niceness (lower means more favorable) you can define is determined by
limits.conf. On my computer the file is located at
In general, as a non-root user, you can only decrease the priority of your tasks, not increase them. So, one approach would be to lower the priority of everything else. Or, you can set up something at the system level which handles your priorities.
If you're using a relatively modern Linux distribution, the most powerful way would be with control groups. This is in its infancy so basically you'd have to configure everything by hand, but in short what you want is to configure the categorizer to put different processes into different CPU control groups, and then to give the mplayer process more CPU shares.