Configuring a scheduler with the deployer

Hello,
I have the following XML code to configure my component activity :


0.01
0
type="string">ORO_SCHED_RT

When I start the application as a normal user I get the following message :

0.219 [ Warning][DeploymentComponent::loadComponents] Lowering
scheduler type to SCHED_OTHER for non-privileged users..

which is I guess is very normal. However, when I start the same
application as root I get the following message :

0.323 [ Warning][DeploymentComponent::loadComponents] Forcing
priority (0) of thread with !SCHED_OTHER policy to 1.
0.323 [ Warning][DeploymentComponent::loadComponents] Forcing
priority (1) of thread with !SCHED_OTHER policy to the pam_limit of 0
0.323 [ Warning][PeriodicThread] Forcing priority (0) of
thread with !SCHED_OTHER policy to 1.
0.323 [ Warning][PeriodicThread] Forcing priority (1) of
thread with !SCHED_OTHER policy to the pam_limit of 0

There's nothing about priorities in my /etc/security/limits.conf
file. Anyway, i'm root so I don't know why i'm getting this warning?

Thank you for your help,

Philippe

Configuring a scheduler with the deployer

On Monday 05 January 2009 21:58:30 Philippe Hamelin wrote:
> Hello,
> I have the following XML code to configure my component activity :
>
>
> > type="double">0.01 > type="short">0 > type="string">ORO_SCHED_RT
>

As Stephan pointed out, ORO_SCHED_RT goes from 1 to 99 while priority 0 is
reserved for ORO_SCHED_OTHER under Linux.

>
> When I start the application as a normal user I get the following message :
>
> 0.219 [ Warning][DeploymentComponent::loadComponents] Lowering
> scheduler type to SCHED_OTHER for non-privileged users..
>
> which is I guess is very normal. However, when I start the same
> application as root I get the following message :
>
> 0.323 [ Warning][DeploymentComponent::loadComponents] Forcing
> priority (0) of thread with !SCHED_OTHER policy to 1.
> 0.323 [ Warning][DeploymentComponent::loadComponents] Forcing
> priority (1) of thread with !SCHED_OTHER policy to the pam_limit of 0
> 0.323 [ Warning][PeriodicThread] Forcing priority (0) of
> thread with !SCHED_OTHER policy to 1.
> 0.323 [ Warning][PeriodicThread] Forcing priority (1) of
> thread with !SCHED_OTHER policy to the pam_limit of 0

This is a bug in the code. If the pam limit is not set (in the gnulinux
target), the code freaks out.

I'll release a 1.6.1 asap.

Peter

Configuring a scheduler with the deployer

On Jan 5, 2009, at 15:58 , Philippe Hamelin wrote:

> Hello,
> I have the following XML code to configure my component activity :
>
>
> 0.01 > simple>
> 0 > simple>
> > type="string">ORO_SCHED_RT
>

>
> When I start the application as a normal user I get the following
> message :
>
> 0.219 [ Warning][DeploymentComponent::loadComponents] Lowering
> scheduler type to SCHED_OTHER for non-privileged users..

Also, off the top of my head, real-time priorities (ie ORO_SCHED_RT)
are 1-99, while 0 is for non-realtime.
S

Configuring a scheduler with the deployer

On Jan 5, 2009, at 15:58 , Philippe Hamelin wrote:

> Hello,
> I have the following XML code to configure my component activity :
>
>
> 0.01 > simple>
> 0 > simple>
> > type="string">ORO_SCHED_RT
>

>
> When I start the application as a normal user I get the following
> message :
>
> 0.219 [ Warning][DeploymentComponent::loadComponents] Lowering
> scheduler type to SCHED_OTHER for non-privileged users..
>
> which is I guess is very normal. However, when I start the same
> application as root I get the following message :
>
> 0.323 [ Warning][DeploymentComponent::loadComponents] Forcing
> priority (0) of thread with !SCHED_OTHER policy to 1.
> 0.323 [ Warning][DeploymentComponent::loadComponents] Forcing
> priority (1) of thread with !SCHED_OTHER policy to the pam_limit of 0
> 0.323 [ Warning][PeriodicThread] Forcing priority (0) of
> thread with !SCHED_OTHER policy to 1.
> 0.323 [ Warning][PeriodicThread] Forcing priority (1) of
> thread with !SCHED_OTHER policy to the pam_limit of 0
>
> There's nothing about priorities in my /etc/security/limits.conf
> file. Anyway, i'm root so I don't know why i'm getting this warning?

We steer away from using root for real-time, as it causes all manner
of problems with permissions on log files, etc. If you want to do this
as a normal user and have the ability to run real-time processes, then
check out the documentation in /etc/security/limits.conf. Basically,
add a line like

myname rtprio hard 99

which will allow user 'myname' to set real-time priorities up to 99
(ie all RT priorities). Then you *must* either logout or reboot for
this to have affect. This should avoid the above problem for any
modern 2.6 kernel. There's plenty of other doc's online about this
approach.

HTH
S