Re: 7.0.54 Startup Times - Going from 700 seconds to 39 seconds

2014-07-27 Thread Konstantin Kolinko
2014-07-19 21:26 GMT+04:00 George Sexton :
>
> On 7/18/2014 11:02 PM, Violeta Georgieva wrote:
>>
>> Hi,
>>
>> I suppose I'm trying to understand how the impact of this so dramatically
>> outweighs my app's startup, which includes loading the jar, initializing a
>> lot of classes, connecting to the database, starting background threads,
>> etc. It just seems really odd.
>>>
>>> Can anyone help me understand this?
>>
>> Read this http://wiki.apache.org/tomcat/HowTo/FasterStartUp
>
>
>
> I read that, and it told me how to make it go faster, which I did. What I'm
> trying to understand is what it is that makes that single thing add so much
> overhead. As I mentioned in my original post, it just seems
> counter-intuitive that the work required would exceed loading my app,
> initializing the classes, connecting to the database, starting threads, etc.

Starting the webapp loads only those classes that are actually used.
Scanning for annotations has to unzip and parse every *.class file in
all of your libraries.

To get what actually happens, take several thread dumps while the
application is being deployed.

I improved some wording on that Wiki page a bit.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: 7.0.54 Startup Times - Going from 700 seconds to 39 seconds

2014-07-19 Thread Violeta Georgieva
2014-07-19 20:26 GMT+03:00 George Sexton :
>
>
> On 7/18/2014 11:02 PM, Violeta Georgieva wrote:
>>
>> Hi,
>>
>> I suppose I'm trying to understand how the impact of this so dramatically
>> outweighs my app's startup, which includes loading the jar, initializing
a
>> lot of classes, connecting to the database, starting background threads,
>> etc. It just seems really odd.
>>>
>>> Can anyone help me understand this?
>>
>> Read this http://wiki.apache.org/tomcat/HowTo/FasterStartUp
>
>
>
> I read that, and it told me how to make it go faster, which I did. What
I'm trying to understand is what it is that makes that single thing add so
much overhead. As I mentioned in my original post, it just seems
counter-intuitive that the work required would exceed loading my app,
initializing the classes, connecting to the database, starting threads, etc.
>

"The  element specifies which web fragment JARs
(according to the names in their WEB-INF/web-fragment.xml files) have to be
scanned for SCIs, fragments and annotations. An empty 
element configures that none are to be scanned."

If you have jar files in WEB-INF/lib they will be scanned for SCIs,
fragments and annotations. With  you instructs Tomcat
to skip the scanning.

>
>
>>
>> Regards,
>> Violeta
>>
>
>
> --
> George Sexton
> *MH Software, Inc.*
> Voice: 303 438 9585
> http://www.mhsoftware.com


Re: 7.0.54 Startup Times - Going from 700 seconds to 39 seconds

2014-07-19 Thread George Sexton


On 7/18/2014 11:02 PM, Violeta Georgieva wrote:

Hi,
I suppose I'm trying to understand how the impact of this so dramatically
outweighs my app's startup, which includes loading the jar, initializing a
lot of classes, connecting to the database, starting background threads,
etc. It just seems really odd.

Can anyone help me understand this?

Read this http://wiki.apache.org/tomcat/HowTo/FasterStartUp



I read that, and it told me how to make it go faster, which I did. What 
I'm trying to understand is what it is that makes that single thing add 
so much overhead. As I mentioned in my original post, it just seems 
counter-intuitive that the work required would exceed loading my app, 
initializing the classes, connecting to the database, starting threads, etc.





Regards,
Violeta




--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


Re: 7.0.54 Startup Times - Going from 700 seconds to 39 seconds

2014-07-18 Thread Violeta Georgieva
Hi,


2014-07-18 2:05 GMT+03:00 George Sexton :
>
> So I was working on getting tomcat 7.0.54 to run my app. I setup  a
configuration with 725 virtual hosts. Startup time was around 700+ seconds.
For this app, there's maybe two dozen jars in $CATALINA_BASE/lib, and one
1.2MB jar in context/WEB-INF/lib. It is running under the security manager.
>
> Setting startStopThreads="4" at the Engine level cut that down to around
300 seconds. startStopThreads higher than 4 actually performed worse.
>
> Adding meta-complete to web.xml took it down to around 260 seconds.
>
> Adding  to web.xml with startStopThreads="0" took it
down to 39 seconds. I admit, I'm kind of curious as to what it is that has
to be done by this absolute-ordering thing that is so resource intensive it
has such a massive impact on start times. I've read through the docs on
optimizing startup, and I'm still not seeing it.
>
> I suppose I'm trying to understand how the impact of this so dramatically
outweighs my app's startup, which includes loading the jar, initializing a
lot of classes, connecting to the database, starting background threads,
etc. It just seems really odd.
>
> Can anyone help me understand this?

Read this http://wiki.apache.org/tomcat/HowTo/FasterStartUp

Regards,
Violeta

>
> --
> George Sexton
> *MH Software, Inc.*
> Voice: 303 438 9585
> http://www.mhsoftware.com


7.0.54 Startup Times - Going from 700 seconds to 39 seconds

2014-07-17 Thread George Sexton
So I was working on getting tomcat 7.0.54 to run my app. I setup  a 
configuration with 725 virtual hosts. Startup time was around 700+ 
seconds. For this app, there's maybe two dozen jars in 
$CATALINA_BASE/lib, and one 1.2MB jar in context/WEB-INF/lib. It is 
running under the security manager.


Setting startStopThreads="4" at the Engine level cut that down to around 
300 seconds. startStopThreads higher than 4 actually performed worse.


Adding meta-complete to web.xml took it down to around 260 seconds.

Adding  to web.xml with startStopThreads="0" took 
it down to 39 seconds. I admit, I'm kind of curious as to what it is 
that has to be done by this absolute-ordering thing that is so resource 
intensive it has such a massive impact on start times. I've read through 
the docs on optimizing startup, and I'm still not seeing it.


I suppose I'm trying to understand how the impact of this so 
dramatically outweighs my app's startup, which includes loading the jar, 
initializing a lot of classes, connecting to the database, starting 
background threads, etc. It just seems really odd.


Can anyone help me understand this?

--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com