Re: Startup timing Windows vs. Mac

2018-12-09 Thread James Carman
Silly question, but are we talking about comparable hardware (or identical)
between the two?

On Tue, Nov 20, 2018 at 10:36 PM Oleg Cohen 
wrote:

> Hi JB,
>
> I don’t think the antivirus is an issue in my case.
>
> I did disable Windows Defender. My test case is with a single bundle that
> is installed via this command:
>
> install reference:file://$eclipse_projects/sample.bundle.a
>
> The location $eclipse_projects points to the local file system where
> Eclipse projects for bundles reside.
>
> From Active state I run command *update sample.bundle.a*
>
> I see that the entire bundle start part of the update consists of two
> parts. Right after the activation process starts I see a delay. No logging
> occurs, even with the log level set to TRACE. Then log output starts
> showing initialization of my bundle’s components/services.
>
> The latter part runs quick on both Windows and Mac and take about 1 sec.
> However, the former part that is silent and takes about 5 sec on Mac and 20
> sec on Windows. So, 4 times slower on Windows.
>
> What happens with the bundle at the start? Are files copied? I do suspect
> it has something to do with the file IO.
>
> Thank you,
> Oleg
>
>
> On Nov 20, 2018, at 10:57 AM, Jean-Baptiste Onofré 
> wrote:
>
> Yes, first, please try with the antivirus disabled.
>
> Regards
> JB
>
> On 20/11/2018 16:26, Oleg Cohen wrote:
>
> Hi JB,
>
> Yes, it is Windows. It is exactly the same set of bundles and the same
> Maven repository. Yes, there is Antivirus. I can try testing with disabling
> it temporarily.
>
> How can I see what is being resolved/checked/updated/downloaded? I do
> notice that Karaf has these long pauses. I am sure I can run pretty much
> against the local repo.
>
> I would appreciate any pointers on how to speed up the startup!
>
> Best regards,
> Oleg
>
> On Nov 20, 2018, at 12:12 AM, Jean-Baptiste Onofré 
> wrote:
>
> Hi Oleg,
>
> So Windows is longer than Mac (not surprising ;)).
>
> Did you check in term of bundles resolution ? Do the two systems use the
> same Maven repository and network to resolve the artifacts.
>
> I already saw such issue due to the Windows antivirus: it verified any
> artifacts downloaded by Karaf and it takes time.
>
> Do you have antivirus on the Windows system ?
>
> Regards
> JB
>
> On 19/11/2018 21:12, Oleg Cohen wrote:
>
> Greetings,
>
> I have two systems: one Mac and one Windows. I have noticed that exactly
> the same application with a number of bundles, both 3rd party and my own,
> take significantly longer (1.5 vs 6 mins) on Windows compared to Mac. Both
> systems are pretty powerful and have similar resources. I was wondering if
> anybody has noticed the same. What would be the best way to analyze the
> startup performance and identify bottlenecks?
>
> Thank you,
> Oleg
>
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>


Re: Startup timing Windows vs. Mac

2018-12-09 Thread chris . gray
Seconded.

When working in a mixed windows/linux environment, I've seen refactorings
which meant moving files between directories (e.g. move a package into a
different bundle under bndtools) take seconds on linux vs. *minutes* on
windows. If you have a lot of bundles, even the creation and population of
the fwdir could take significantly longer.

> Honestly, despite being a windows user, file fileio on linux/unix based
> machines is always MUCH faster than windows.
>
> Ryan
>
> On Wed, Nov 21, 2018, 11:56 AM David Jencks  wrote:
>
>> A possible reason could be lots of DS services with greedy optional
>> static
>> dependencies started in different orders on the two OSs. If a service
>> with
>> such a reference is started first, it will get restarted every time a
>> target service for the reference is started.
>>
>> David Jencks
>>
>> Sent from my iPhone
>>
>> On Nov 21, 2018, at 6:59 AM, Leschke, Scott 
>> wrote:
>>
>> It still begs the question as to why you saw such a difference in times
>> between Windows and Mac.
>>
>>
>>
>> *From:* Oleg Cohen 
>> *Sent:* Tuesday, November 20, 2018 11:34 PM
>> *To:* user@karaf.apache.org
>> *Subject:* Re: Startup timing Windows vs. Mac
>>
>>
>>
>> Hi JB,
>>
>>
>>
>> Thank you for the clarification. I think the bundle load time on Windows
>> was affected by a large number of services in the component. I don’t
>> know
>> exactly the reason, but how the OSGi container processes the bundle on
>> startup was much slower on Windows because I had a large number of
>> services. I reworked my architecture to reduce the number of service
>> components and the startup time went down quite a bit.
>>
>>
>>
>> Thank you,
>>
>> Oleg
>>
>>
>>
>> On Nov 20, 2018, at 11:55 PM, Jean-Baptiste Onofré 
>> wrote:
>>
>>
>>
>> Hi Oleg,
>>
>> bundle:update is roughly equivalent to bundle:stop, bundle:uninstall,
>> bundle:install, bundle:start. It gets the "new" bundle version from the
>> bundle location (that you can see with bundle:list -l).
>>
>> Nothing suspicious in the bundle activator that could explain it takes
>> time to stop/start on windows ?
>>
>> Regards
>> JB
>>
>> On 21/11/2018 04:36, Oleg Cohen wrote:
>>
>> Hi JB,
>>
>> I don’t think the antivirus is an issue in my case.
>>
>> I did disable Windows Defender. My test case is with a single bundle
>> that is installed via this command:
>>
>> install reference:file://$eclipse_projects/sample.bundle.a
>> 
>>
>> The location $eclipse_projects points to the local file system where
>> Eclipse projects for bundles reside.
>>
>> From Active state I run command *update sample.bundle.a*
>>
>> I see that the entire bundle start part of the update consists of two
>> parts. Right after the activation process starts I see a delay. No
>> logging occurs, even with the log level set to TRACE. Then log output
>> starts showing initialization of my bundle’s components/services.
>>
>> The latter part runs quick on both Windows and Mac and take about 1 sec.
>> However, the former part that is silent and takes about 5 sec on Mac and
>> 20 sec on Windows. So, 4 times slower on Windows.
>>
>> What happens with the bundle at the start? Are files copied? I do
>> suspect it has something to do with the file IO.
>>
>> Thank you,
>> Oleg
>>
>>
>>
>> On Nov 20, 2018, at 10:57 AM, Jean-Baptiste Onofré > > wrote:
>>
>> Yes, first, please try with the antivirus disabled.
>>
>> Regards
>> JB
>>
>> On 20/11/2018 16:26, Oleg Cohen wrote:
>>
>> Hi JB,
>>
>> Yes, it is Windows. It is exactly the same set of bundles and the
>> same Maven repository. Yes, there is Antivirus. I can try testing
>> with disabling it temporarily.
>>
>> How can I see what is being resolved/checked/updated/downloaded? I do
>> notice that Karaf has these long pauses. I am sure I can run pretty
>> much against the local repo.
>>
>> I would appreciate any pointers on how to speed up the startup!
>>
>> Best regards,
>> Oleg
>>
>>
>> On Nov 20, 2018, at 12:12 AM, Jean-Baptiste Onofré > > wrote:
>>
>> Hi Oleg,
>>
>> So Windows is longer than Mac (not surprising ;)).
>>
>> Did you check in term of bundles resolution ? Do the two systems use the
>> same Maven repository and network to resolve the artifacts.
>>
>> I already saw such issue due to the Windows antivirus: it verified any
>> artifacts downloaded by Karaf and it takes time.
>>
>> Do you have antivirus on the Windows system ?
>>
>> Regards
>> JB
>>
>> On 19/11/2018 21:12, Oleg Cohen wrote:
>>
>> Greetings,
>>
>> I have two systems: one Mac and one Windows. I have noticed that
>> exactly the same application with a number of bundles, both 3rd
>> party and my own, take significantly longer (1.5 vs 6 mins) on
>> Windows compared to Mac. Both systems are pretty powerful and have
>> similar resources. I was wondering if anybody has noticed the same.
>> What would be the best way to analyze the startup performance and
>> identify bottlenecks?
>>
>> Thank you,
>> Oleg
>>
>>
>> --
>> Jean-