You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adam Heath <do...@brainfood.com> on 2010/02/24 17:33:16 UTC

slow ofbiz startup time

Long time ago, in a revision far away(595296 era), ofbiz used to start
up very fast, on the order of 10-15 seconds.

Nowadays, it takes over 40.  And this is on identical hardware.

Has anyone else noticed this?  And, more importantly, does anyone have
a clue why?

Re: slow ofbiz startup time

Posted by Adam Heath <do...@brainfood.com>.
Christopher Snow wrote:
> Adam Heath wrote:
>> Erwan de FERRIERES wrote:
>>  
>>> Le 24/02/2010 17:33, Adam Heath a écrit :
>>>    
>>>> Long time ago, in a revision far away(595296 era), ofbiz used to start
>>>> up very fast, on the order of 10-15 seconds.
>>>>
>>>> Nowadays, it takes over 40.  And this is on identical hardware.
>>>>
>>>> Has anyone else noticed this?  And, more importantly, does anyone have
>>>> a clue why?
>>>>
>>>>       
>>> lot of new apps, and birt, etc...
>>>     
>>
>> It's been slower long before birt came into play.
>>
>> Looking at the log, I see CmsSite taking .5s to load.  That's way to
>> long.
>>
>> Google is telling me that tomcat6 tries to find *all* tlds in the
>> classloader.  595296 had 143 jars(39.6M), while currently we have
>> around 443(95.5M).    I'm guessing that this information is not cached
>> anywhere.  So, when each webapp loads, and it creates a new
>> classloader, the parent classloader ends up walking all the jars each
>> and every time.
>>   
> A compelling argument for OSGi, and a more configurable modular
> component architecture?

I've added some debug to CachedClassLoader, and to the URLClassLoader
created by start.Classpath.  getURLs() is being called by catalina,
which, I'm assuming, it uses to convert to file(s), and do a directory
walk of everything in WEB-INF/tld.  I don't immediately see a way to
speed this up.


Re: slow ofbiz startup time

Posted by Christopher Snow <sn...@snowconsulting.co.uk>.
Adam Heath wrote:
> Erwan de FERRIERES wrote:
>   
>> Le 24/02/2010 17:33, Adam Heath a écrit :
>>     
>>> Long time ago, in a revision far away(595296 era), ofbiz used to start
>>> up very fast, on the order of 10-15 seconds.
>>>
>>> Nowadays, it takes over 40.  And this is on identical hardware.
>>>
>>> Has anyone else noticed this?  And, more importantly, does anyone have
>>> a clue why?
>>>
>>>       
>> lot of new apps, and birt, etc...
>>     
>
> It's been slower long before birt came into play.
>
> Looking at the log, I see CmsSite taking .5s to load.  That's way to long.
>
> Google is telling me that tomcat6 tries to find *all* tlds in the
> classloader.  595296 had 143 jars(39.6M), while currently we have
> around 443(95.5M).    I'm guessing that this information is not cached
> anywhere.  So, when each webapp loads, and it creates a new
> classloader, the parent classloader ends up walking all the jars each
> and every time.
>   
A compelling argument for OSGi, and a more configurable modular 
component architecture?

Re: slow ofbiz startup time

Posted by Joe Eckard <jo...@redrocketcorp.com>.
On Feb 24, 2010, at 11:47 AM, Adam Heath wrote:

> Erwan de FERRIERES wrote:
>> Le 24/02/2010 17:33, Adam Heath a écrit :
>>> Long time ago, in a revision far away(595296 era), ofbiz used to  
>>> start
>>> up very fast, on the order of 10-15 seconds.
>>>
>>> Nowadays, it takes over 40.  And this is on identical hardware.
>>>
>>> Has anyone else noticed this?  And, more importantly, does anyone  
>>> have
>>> a clue why?
>>>
>> lot of new apps, and birt, etc...
>
> It's been slower long before birt came into play.
>
> Looking at the log, I see CmsSite taking .5s to load.  That's way to  
> long.
>
> Google is telling me that tomcat6 tries to find *all* tlds in the
> classloader.  595296 had 143 jars(39.6M), while currently we have
> around 443(95.5M).    I'm guessing that this information is not cached
> anywhere.  So, when each webapp loads, and it creates a new
> classloader, the parent classloader ends up walking all the jars each
> and every time.


Out of curiosity I ran q few quick tests... on my local machine,  
startup takes about 45 seconds using catalina and 35 seconds using  
jetty.

These times are pretty consistent, with everything up to the  
catalina / jetty container load taking about 20 seconds.


Re: slow ofbiz startup time

Posted by Adam Heath <do...@brainfood.com>.
Erwan de FERRIERES wrote:
> Le 24/02/2010 17:33, Adam Heath a écrit :
>> Long time ago, in a revision far away(595296 era), ofbiz used to start
>> up very fast, on the order of 10-15 seconds.
>>
>> Nowadays, it takes over 40.  And this is on identical hardware.
>>
>> Has anyone else noticed this?  And, more importantly, does anyone have
>> a clue why?
>>
> lot of new apps, and birt, etc...

It's been slower long before birt came into play.

Looking at the log, I see CmsSite taking .5s to load.  That's way to long.

Google is telling me that tomcat6 tries to find *all* tlds in the
classloader.  595296 had 143 jars(39.6M), while currently we have
around 443(95.5M).    I'm guessing that this information is not cached
anywhere.  So, when each webapp loads, and it creates a new
classloader, the parent classloader ends up walking all the jars each
and every time.


Re: slow ofbiz startup time

Posted by Erwan de FERRIERES <er...@nereide.fr>.
Le 24/02/2010 17:33, Adam Heath a écrit :
> Long time ago, in a revision far away(595296 era), ofbiz used to start
> up very fast, on the order of 10-15 seconds.
>
> Nowadays, it takes over 40.  And this is on identical hardware.
>
> Has anyone else noticed this?  And, more importantly, does anyone have
> a clue why?
>
lot of new apps, and birt, etc...

-- 
Erwan de FERRIERES
www.nereide.biz