* [gentoo-user] real-time priority
@ 2005-08-10 23:53 Joseph
2005-08-11 15:06 ` Ian K
2005-08-12 0:19 ` Mark Knecht
0 siblings, 2 replies; 8+ messages in thread
From: Joseph @ 2005-08-10 23:53 UTC (permalink / raw
To: gentoo
How to list real-time priority in Linux for an application (example
asterisk)?
--
#Joseph
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] real-time priority
2005-08-10 23:53 [gentoo-user] real-time priority Joseph
@ 2005-08-11 15:06 ` Ian K
2005-08-12 0:08 ` Joseph
2005-08-12 0:19 ` Mark Knecht
1 sibling, 1 reply; 8+ messages in thread
From: Ian K @ 2005-08-11 15:06 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
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
[-- Attachment #2: omega_2_1.vcf --]
[-- Type: text/x-vcard, Size: 275 bytes --]
begin:vcard
fn:Ian K
n:K;Ian
email;internet:omega_2_1@yahoo.ca
note;quoted-printable:Pentium 3=0D=0A=
500mHz=0D=0A=
256MB RAM=0D=0A=
80.0GB HDD=0D=0A=
ATI Radeon 7000 Evil Wizard 64MB=0D=0A=
Computer name: "PentaQuad"=0D=0A=
x-mozilla-html:TRUE
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] real-time priority
2005-08-12 0:53 ` Joseph
@ 2005-08-11 23:53 ` Ian K
2005-08-12 2:12 ` Mark Knecht
1 sibling, 0 replies; 8+ messages in thread
From: Ian K @ 2005-08-11 23:53 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
Joseph wrote:
>On Thu, 2005-08-11 at 17:19 -0700, Mark Knecht wrote:
>
>
>>On 8/10/05, Joseph <syscon@interbaun.com> wrote:
>>
>>
>>>How to list real-time priority in Linux for an application (example
>>>asterisk)?
>>>
>>>
>>>
>>man schedtoot
>>man chrt
>>
>>Have fun,
>>Mark
>>
>>
>
>Thanks Mark,
>
>But they must be part of some other package.
>I can not find schedtoot or chrt on my system nor they are in portage.
>
>
>
Sorry, Joseph, I clearly have no idea what I am talking about. :)
Ian
[-- Attachment #2: omega_2_1.vcf --]
[-- Type: text/x-vcard, Size: 275 bytes --]
begin:vcard
fn:Ian K
n:K;Ian
email;internet:omega_2_1@yahoo.ca
note;quoted-printable:Pentium 3=0D=0A=
500mHz=0D=0A=
256MB RAM=0D=0A=
80.0GB HDD=0D=0A=
ATI Radeon 7000 Evil Wizard 64MB=0D=0A=
Computer name: "PentaQuad"=0D=0A=
x-mozilla-html:TRUE
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] real-time priority
2005-08-11 15:06 ` Ian K
@ 2005-08-12 0:08 ` Joseph
2005-08-12 7:56 ` Peter Karlsson
0 siblings, 1 reply; 8+ messages in thread
From: Joseph @ 2005-08-12 0:08 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] real-time priority
2005-08-10 23:53 [gentoo-user] real-time priority Joseph
2005-08-11 15:06 ` Ian K
@ 2005-08-12 0:19 ` Mark Knecht
2005-08-12 0:53 ` Joseph
1 sibling, 1 reply; 8+ messages in thread
From: Mark Knecht @ 2005-08-12 0:19 UTC (permalink / raw
To: gentoo-user
On 8/10/05, Joseph <syscon@interbaun.com> wrote:
> How to list real-time priority in Linux for an application (example
> asterisk)?
>
man schedtoot
man chrt
Have fun,
Mark
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] real-time priority
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
0 siblings, 2 replies; 8+ messages in thread
From: Joseph @ 2005-08-12 0:53 UTC (permalink / raw
To: gentoo-user; +Cc: markknecht
On Thu, 2005-08-11 at 17:19 -0700, Mark Knecht wrote:
> On 8/10/05, Joseph <syscon@interbaun.com> wrote:
> > How to list real-time priority in Linux for an application (example
> > asterisk)?
> >
>
> man schedtoot
> man chrt
>
> Have fun,
> Mark
Thanks Mark,
But they must be part of some other package.
I can not find schedtoot or chrt on my system nor they are in portage.
--
#Joseph
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] real-time priority
2005-08-12 0:53 ` Joseph
2005-08-11 23:53 ` Ian K
@ 2005-08-12 2:12 ` Mark Knecht
1 sibling, 0 replies; 8+ messages in thread
From: Mark Knecht @ 2005-08-12 2:12 UTC (permalink / raw
To: Joseph; +Cc: gentoo-user
On 8/11/05, Joseph <syscon@interbaun.com> wrote:
> On Thu, 2005-08-11 at 17:19 -0700, Mark Knecht wrote:
> > On 8/10/05, Joseph <syscon@interbaun.com> wrote:
> > > How to list real-time priority in Linux for an application (example
> > > asterisk)?
> > >
> >
> > man schedtoot
> > man chrt
> >
> > Have fun,
> > Mark
>
> Thanks Mark,
>
> But they must be part of some other package.
> I can not find schedtoot or chrt on my system nor they are in portage.
>
> --
> #Joseph
>
My bad typing. schedtool, not schedtoot
flash ~ # equery belongs schedtool
[ Searching for file(s) schedtool in *... ]
sys-process/schedtool-1.2.3 (/usr/share/doc/schedtool)
sys-process/schedtool-1.2.3 (/usr/bin/schedtool)
flash ~ #
flash ~ # emerge -pv schedtool
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] sys-process/schedtool-1.2.3 24 kB
Total size of downloads: 24 kB
flash ~ #
flash ~ # equery belongs chrt
[ Searching for file(s) chrt in *... ]
sys-process/schedutils-1.3.5 (/usr/bin/chrt)
flash ~ # emerge -pv schedutils
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] sys-process/schedutils-1.3.5 0 kB
Total size of downloads: 0 kB
flash ~ #
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] real-time priority
2005-08-12 0:08 ` Joseph
@ 2005-08-12 7:56 ` Peter Karlsson
0 siblings, 0 replies; 8+ messages in thread
From: Peter Karlsson @ 2005-08-12 7:56 UTC (permalink / raw
To: gentoo-user
On Thu, 11 Aug 2005, Joseph wrote:
> I'm not sure if that what they mean with "real-time priority".
Realtime has nothing to do with 'nice'. With 'nice' you set the process'
time-slice so that it gets more (or less) processor-time. With realtime
("soft" or "hard" realtime - there's a difference) the process is
"guaranteed" to have processor-time within certain time-limits, something
which "normal" schedulers don't do. See
'http://en.wikipedia.org/wiki/Real-time_computing'.
HTH
Best regards
Peter K
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-08-12 8:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-10 23:53 [gentoo-user] real-time priority Joseph
2005-08-11 15:06 ` Ian K
2005-08-12 0:08 ` Joseph
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox