From: Joseph <syscon@interbaun.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] real-time priority
Date: Thu, 11 Aug 2005 18:08:18 -0600 [thread overview]
Message-ID: <1123805298.11201.21.camel@sysconcept.ca> (raw)
In-Reply-To: <42FB698B.5010506@yahoo.ca>
On Thu, 2005-08-11 at 15:06 +0000, Ian K wrote:
> Joseph wrote:
>
> >How to list real-time priority in Linux for an application (example
> >asterisk)?
> >
> >
> >
> Do you mean processor scheduling? "This program deserves more processor
> time/power than others?"
>
> If so, find out the process ID of the app you want to 'promote' or 'demote'
> and take it with you into a konsole/terminal and type this:
>
> renice <process ID> <priority>
>
> The priority is on a scale. -21---0--+21
> The negative priorities are promotions. Giving it a -21 would bring down
> many
> other applications the second they tried to use the processor. I never
> really go
> above ten, either way.
>
> HTH,
> Ian
I'm not sure if that what they mean with "real-time priority".
All I was able to find out that some of them are running Asterisk with
switch -p;
so they start asterisk with:
asterisk -p
This is an explanation what -p switch does (from asterisk man):
If supported by the operating system (and executing as root), attempt to
run with realtime priority for increased performance and
responsiveness within the Asterisk process, at the expense of other
programs running on the same machine.
I now that I could start asterisk with higher priority level; so I
modified the startup script to start asterisk with "nice -15".
But some of the members in asterisk forum insisting that "nice" is not
the same as "real-time priority".
Here are two replies I received form Asterisk forum:
------ reply 1 ------------------
What do you mean with listing real-time priority? You can list process
priorities with commands like top or "ps -eo pri,nice,%cpu,pid,args
--sort pri" (for example).
If you're interrested in asterisk's real-time responsiveness, the
following might be of interrest.
Real-time priority actually doesn't exist in Linux (you'll need to use
a
real RTOS for that). Still, Linux makes a destinction between processes
that need sort of real-time response times and processes that don't.
Controlling this in a direct way is a difficult, if possible at all.
Prioritizing processes is done on the fly (in real time) by the
scheduling process in the Linux core.
However, there is a way to manipulate the prioritizing of processes
with
a command called 'nice'. Normally you use this command (with a positive
adjustment value) to make a process to behave 'nice' to other
processes.
That is, it gives the process a lower priority that it would normally
get, thus making it a relative low priority process. By using nice with
a negative adjustment (you'll need to be root for that), you're able to
give a certain process a higher priority than it would normally get,
thus giving the process more of a 'real-time' priority.
In my experience it proved to be more usefull to give all the
processes,
that stood in the way of asterisk performance, a positive nice
adjustment, rather than giving asterisk a negative nice adjustment. I
haven't tested this thoroughly, so I'm not sure about the reasons for
this. It could have something to with asterisk getting in the way of
Linux's core processes when incresing it's priority. Still, it's
nothing
more than a guess.
--------- end replay 1 ---------------
-------- reply 2 -------------
> Real-time priority actually doesn't exist in Linux
Sure it does.
> you'll need to use a real RTOS for that
Thanks to Ingo Molnars' realtime patches, the gnu/linux audio
community runs with latencies sub 1ms.
> Controlling this in a direct way is a difficult, if possible at all
chrt(1)
------- end reply 2 ---------
--
#Joseph
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2005-08-12 0:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-10 23:53 [gentoo-user] real-time priority Joseph
2005-08-11 15:06 ` Ian K
2005-08-12 0:08 ` Joseph [this message]
2005-08-12 7:56 ` Peter Karlsson
2005-08-12 0:19 ` Mark Knecht
2005-08-12 0:53 ` Joseph
2005-08-11 23:53 ` Ian K
2005-08-12 2:12 ` Mark Knecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1123805298.11201.21.camel@sysconcept.ca \
--to=syscon@interbaun.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox