Carlos E. R. wrote:
> 
> 
> The Friday 2007-12-14 at 19:12 -0000, David wrote:
> 
>> On Fri, 14 Dec 2007 18:28:19 -0000, Jason Craig <[EMAIL PROTECTED]>
>> wrote:
>>> I looked into the topic for a bit, what I was "needing" the RT kernel
>>> for was audio recording/processing.  Normal users can't run threads
>>> in "realtime" priority, the super user can, but then running general
>>> applications as the superuser is not really the best idea.
> 
>> Just an idea... would it be possible to re-nice the program you are
>> using?
> 
> There is a problem.
> 
> First, it is not renice what you are looking at, but ionice - from the
> manual:

Actually there is a renice program that sets the nice value of a program
within the SCHED_OTHER scheduling policy / priority 0. You do have to be
root though to decrease (increase priority) the nice value of a process,
as it should be.

> 
>        This program sets the io scheduling class and pri
>        ority  for  a  program.  As of this writing, Linux
>        supports 3 scheduling classes:
> 
>        Idle.  A program running  with  idle  io  priority
>        will  only get disk time when no other program has
>        asked for disk io for a defined grace period.  The
>        impact  of  idle  io  processes  on  normal system
>        activity should be  zero.  This  scheduling  class
>        does not take a priority argument.
> 
>        Best effort.  This is the default scheduling class
>        for any process that hasn't asked for  a  specific
>        io priority. Programs inherit the CPU nice setting
>        for io priorities. This  class  takes  a  priority
>        argument  from 0-7, with lower number being higher
>        priority. Programs running at the same best effort
>        priority are served in a round-robin fashion.
> 
>        Real time.  The RT scheduling class is given first
>        access to the disk, regardless  of  what  else  is
>        going on in the system. Thus the RT class needs to
>        be used with some care, as  it  can  starve  other
>        processes. As with the best effort class, 8 prior
>        ity levels are defined denoting  how  big  a  time
>        slice   a  given  process  will  receive  on  each
>        scheduling window.
> 
> Now, you can call a program like this:
> 
> ionice -c1 program args
> 
> to give it realtime priority. However... ionice has to be run as root.
> If you call it being user, through sudo, the effective user of the child
> program is still root - and this is not what we want and need.
> 
> The alternative method is to use "ionice -c1 -p PROGRAM_PID" instead,
> which can be set to be used through sudo, but you need to know the PID
> of the process you want to modify the priority. And if it has children,
> them too.
> 
> But! Some programs try to detect at start if they have realtime
> priorities... if they are given them later by the method described, it
> is already to late for them, they will not use the alternative
> algorithms designed for that case. I believe Xine does this.
> 
> 
> So, yes, a method to give a group of programs realtime priority from the
> start would be interesting.
> 
There is but it typically requires superuser privileges.

> 
> -- Cheers,
>        Carlos E. R.
> 

-- 
   kr
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to