All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] application start is slower with xenomai 2.6.4 than 2.4.10
@ 2015-02-12 13:23 JK.Behnke
  2015-02-12 18:43 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: JK.Behnke @ 2015-02-12 13:23 UTC (permalink / raw)
  To: xenomai

Hello,

I noticed that running the same xenomai application against xenomai 2.6.4
is significantly slower on start up, than it was with xenomai 2.4.10.
Calling my xenomai application 100 times by a bash script takes about 
1 sec on xenomai 2.4.10. On xenomai 2.6.4 however it takes about 20 secs.
Even if I strip down my application to the absolut minimum of xenomai 
calls like this

main()
{
  mlockall(...);
  rt_task_shadow(...);
}

I get the same behaviour.

I have tested this on the same hardware (x86, atom). The only difference 
is the Linux kernel (2.6.30.8 vs 3.14.17) version and the xenomai version
(2.4.10 vs 2.6.4).

I once mistakenly linked my xenomai 2.4.10 application against libxenomai
and also got the same behaviour (slower startup).
So I suspect this has something to do with libxenomai I need to link 
against, when building xenomai applications using xenomai 2.6.4.

Is there a kind of additional setup behind the scenes in xenomai 2.6.4?
Is there a way to speed up the application start?
Any hint is appreciated.

Regards
Jochen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] application start is slower with xenomai 2.6.4 than 2.4.10
  2015-02-12 13:23 [Xenomai] application start is slower with xenomai 2.6.4 than 2.4.10 JK.Behnke
@ 2015-02-12 18:43 ` Gilles Chanteperdrix
  2015-02-13  7:46   ` JK.Behnke
  0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2015-02-12 18:43 UTC (permalink / raw)
  To: JK.Behnke; +Cc: xenomai

On Thu, Feb 12, 2015 at 02:23:11PM +0100, JK.Behnke@web.de wrote:
> Hello,
> 
> I noticed that running the same xenomai application against xenomai 2.6.4
> is significantly slower on start up, than it was with xenomai 2.4.10.
> Calling my xenomai application 100 times by a bash script takes about 
> 1 sec on xenomai 2.4.10. On xenomai 2.6.4 however it takes about
> 20 secs.

On what hardware? What architecture?

> Even if I strip down my application to the absolut minimum of xenomai 
> calls like this

As you may know, everything is loaded on demand, so the application
start time does not depend on the application size.

> 
> main()
> {
>   mlockall(...);
>   rt_task_shadow(...);
> }
> 
> I get the same behaviour.
> 
> I have tested this on the same hardware (x86, atom). The only difference 
> is the Linux kernel (2.6.30.8 vs 3.14.17) version and the xenomai version
> (2.4.10 vs 2.6.4).
> 
> I once mistakenly linked my xenomai 2.4.10 application against libxenomai
> and also got the same behaviour (slower startup).
> So I suspect this has something to do with libxenomai I need to link 
> against, when building xenomai applications using xenomai 2.6.4.
> 
> Is there a kind of additional setup behind the scenes in xenomai 2.6.4?

The code source is available, so you can check what happens at
startup and even time it. I am afraid people who care about start
time with Xenomai are not numerous.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] application start is slower with xenomai 2.6.4 than 2.4.10
  2015-02-12 18:43 ` Gilles Chanteperdrix
@ 2015-02-13  7:46   ` JK.Behnke
  2015-02-13 18:57     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: JK.Behnke @ 2015-02-13  7:46 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

Hello Gilles,

thanks for your quick response.

>> Hello,
>>
>> I noticed that running the same xenomai application against xenomai 2.6.4
>> is significantly slower on start up, than it was with xenomai 2.4.10.
>> Calling my xenomai application 100 times by a bash script takes about
>> 1 sec on xenomai 2.4.10. On xenomai 2.6.4 however it takes about
>> 20 secs.
>
>On what hardware? What architecture?
It's a Kontron nano-ETX module with an Intel Atom Z510 1,1 GHz.
Mass storage is a 16 GB SSD attached via SATA.


>> Even if I strip down my application to the absolut minimum of xenomai
>> calls like this
>
>As you may know, everything is loaded on demand, so the application
>start time does not depend on the application size.

I didn't mean the application size. I just wanted to rule out other
xenomai calls like rt_dev_open, rt_dev_read, etc. to be responsible for
the additional delay.

>>
>> main()
>> {
>>   mlockall(...);
>>   rt_task_shadow(...);
>> }
>>
>> I get the same behaviour.
>>
>> I have tested this on the same hardware (x86, atom). The only difference
>> is the Linux kernel (2.6.30.8 vs 3.14.17) version and the xenomai version
>> (2.4.10 vs 2.6.4).
>>
>> I once mistakenly linked my xenomai 2.4.10 application against libxenomai
>> and also got the same behaviour (slower startup).
>> So I suspect this has something to do with libxenomai I need to link
>> against, when building xenomai applications using xenomai 2.6.4.
>>
>> Is there a kind of additional setup behind the scenes in xenomai 2.6.4?
>
>The code source is available, so you can check what happens at
>startup and even time it. I am afraid people who care about start
>time with Xenomai are not numerous.
>--
>Gilles.

I have no experience with xenomai sources.
Can you please point me out at which source file(s) to look at.
How can I debug the startup timing?

Thanks in advance.

Regards
Jochen




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] application start is slower with xenomai 2.6.4 than 2.4.10
  2015-02-13  7:46   ` JK.Behnke
@ 2015-02-13 18:57     ` Gilles Chanteperdrix
  2015-02-14 13:59       ` Jochen Behnke
  0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2015-02-13 18:57 UTC (permalink / raw)
  To: JK.Behnke; +Cc: xenomai

On Fri, Feb 13, 2015 at 08:46:48AM +0100, JK.Behnke@web.de wrote:
> Hello Gilles,
> 
> thanks for your quick response.
> 
> >> Hello,
> >>
> >> I noticed that running the same xenomai application against xenomai 2.6.4
> >> is significantly slower on start up, than it was with xenomai 2.4.10.
> >> Calling my xenomai application 100 times by a bash script takes about
> >> 1 sec on xenomai 2.4.10. On xenomai 2.6.4 however it takes about
> >> 20 secs.
> >
> >On what hardware? What architecture?
> It's a Kontron nano-ETX module with an Intel Atom Z510 1,1 GHz.
> Mass storage is a 16 GB SSD attached via SATA.
> 
> 
> >> Even if I strip down my application to the absolut minimum of xenomai
> >> calls like this
> >
> >As you may know, everything is loaded on demand, so the application
> >start time does not depend on the application size.
> 
> I didn't mean the application size. I just wanted to rule out other
> xenomai calls like rt_dev_open, rt_dev_read, etc. to be responsible for
> the additional delay.
> 
> >>
> >> main()
> >> {
> >>   mlockall(...);
> >>   rt_task_shadow(...);
> >> }
> >>
> >> I get the same behaviour.
> >>
> >> I have tested this on the same hardware (x86, atom). The only difference
> >> is the Linux kernel (2.6.30.8 vs 3.14.17) version and the xenomai version
> >> (2.4.10 vs 2.6.4).
> >>
> >> I once mistakenly linked my xenomai 2.4.10 application against libxenomai
> >> and also got the same behaviour (slower startup).
> >> So I suspect this has something to do with libxenomai I need to link
> >> against, when building xenomai applications using xenomai 2.6.4.
> >>
> >> Is there a kind of additional setup behind the scenes in xenomai 2.6.4?
> >
> >The code source is available, so you can check what happens at
> >startup and even time it. I am afraid people who care about start
> >time with Xenomai are not numerous.
> >--
> >Gilles.
> 
> I have no experience with xenomai sources.
> Can you please point me out at which source file(s) to look at.
> How can I debug the startup timing?

First note that by running application in a loop you test not only
the startup time, but also the shutdown type, and this one contains
at least a nanosleep to flush the per-thread stdio buffers.

To find everything which is executed before main, you can grep the
sources for __attribute__((constructor))

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai] application start is slower with xenomai 2.6.4 than 2.4.10
  2015-02-13 18:57     ` Gilles Chanteperdrix
@ 2015-02-14 13:59       ` Jochen Behnke
  0 siblings, 0 replies; 5+ messages in thread
From: Jochen Behnke @ 2015-02-14 13:59 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

> On Fri, Feb 13, 2015 at 08:46:48AM +0100, JK.Behnke@web.de wrote:
>> Hello Gilles,
>>
>> thanks for your quick response.
>>
>>>> Hello,
>>>>
>>>> I noticed that running the same xenomai application against xenomai 2.6.4
>>>> is significantly slower on start up, than it was with xenomai 2.4.10.
>>>> Calling my xenomai application 100 times by a bash script takes about
>>>> 1 sec on xenomai 2.4.10. On xenomai 2.6.4 however it takes about
>>>> 20 secs.
>>>
>>> On what hardware? What architecture?
>> It's a Kontron nano-ETX module with an Intel Atom Z510 1,1 GHz.
>> Mass storage is a 16 GB SSD attached via SATA.
>>
>>
>>>> Even if I strip down my application to the absolut minimum of xenomai
>>>> calls like this
>>>
>>> As you may know, everything is loaded on demand, so the application
>>> start time does not depend on the application size.
>>
>> I didn't mean the application size. I just wanted to rule out other
>> xenomai calls like rt_dev_open, rt_dev_read, etc. to be responsible for
>> the additional delay.
>>
>>>>
>>>> main()
>>>> {
>>>>    mlockall(...);
>>>>    rt_task_shadow(...);
>>>> }
>>>>
>>>> I get the same behaviour.
>>>>
>>>> I have tested this on the same hardware (x86, atom). The only difference
>>>> is the Linux kernel (2.6.30.8 vs 3.14.17) version and the xenomai version
>>>> (2.4.10 vs 2.6.4).
>>>>
>>>> I once mistakenly linked my xenomai 2.4.10 application against libxenomai
>>>> and also got the same behaviour (slower startup).
>>>> So I suspect this has something to do with libxenomai I need to link
>>>> against, when building xenomai applications using xenomai 2.6.4.
>>>>
>>>> Is there a kind of additional setup behind the scenes in xenomai 2.6.4?
>>>
>>> The code source is available, so you can check what happens at
>>> startup and even time it. I am afraid people who care about start
>>> time with Xenomai are not numerous.
>>> --
>>> Gilles.
>>
>> I have no experience with xenomai sources.
>> Can you please point me out at which source file(s) to look at.
>> How can I debug the startup timing?
>
> First note that by running application in a loop you test not only
> the startup time, but also the shutdown type, and this one contains
> at least a nanosleep to flush the per-thread stdio buffers.
>
> To find everything which is executed before main, you can grep the
> sources for __attribute__((constructor))
>

Thank you for the hints.
I' ll have a look at it.

Regards
Jochen


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-14 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12 13:23 [Xenomai] application start is slower with xenomai 2.6.4 than 2.4.10 JK.Behnke
2015-02-12 18:43 ` Gilles Chanteperdrix
2015-02-13  7:46   ` JK.Behnke
2015-02-13 18:57     ` Gilles Chanteperdrix
2015-02-14 13:59       ` Jochen Behnke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.