my dog learned polymorphism*
The moose likes Servlets and the fly likes load-on-startup in web.xml, Performance issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "load-on-startup in web.xml, Performance issues" Watch "load-on-startup in web.xml, Performance issues" New topic
Author

load-on-startup in web.xml, Performance issues

Aravindan Ramanujam
Greenhorn

Joined: Aug 27, 2004
Posts: 10
I'm having an application which is having 5 servlets and all of them are having negative values for load-on-startup in web.xml.



When i try to deploy this in Websphere, it takes more than 30 mins to deploy(As such the application is very small). Will the "load-on-startup" play a significant role with respect to performance / deployment time?

Which is advisable, negative or positive values for load-on-startup? I dont need a specific sequence in which the servlets has to be loaded.

Thanks for your help

- Aravindan -
Sekhar Kadiyala
Ranch Hand

Joined: Feb 17, 2004
Posts: 170
<load-on-startup> can take 2 type of values

negative - means servelet will be loaded but with no priority
positive - servlet will be loaded with priority (based on the number)

This parameter definitely increses start up time, but i am not sure it would consume 30 minutes for this. Did you observe how much time it is consuming to load if you remove these statements?

Also it depends on the requirement of your application. Is it performance based app? If performance is not a bottleneck, then this parameter can be removed.

Same time, i would assume there might some other reasons, as to why it is taking such a long time to bring up the server. Might not be this parameter.
For example, HEAP size or RAM, did you consider all those parameter?


PMP CSQA SCJP SCWCD SCBCD INS 21 INS 23
Aravindan Ramanujam
Greenhorn

Joined: Aug 27, 2004
Posts: 10
Its only happening in our production environment. Its starting up fine in unit test, integration test, system test environments(less than 5 mins).

There are several other applications also deployed in the production server which are not having this problem. So, When i was trying to debug this issue, i was not too sure whether load-on-startup is the one which casuses the problem.

Regarding all the other parameters, since the other applications are running ok in the same server, i dont think those might be a reason for the delay.

Trying to debug. If you have any other clue let me know.

Thanks again.

- Aravindan -
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30124
    
150

Aravindan,
I would advise to do as much on startup as possible. Otherwise, the first user will have to wait for all this to occur. And the user certainly won't wait 30 minutes, or even 5.

As a separate issue, you need to tackle why it is taking so long to startup. What are the servlets doing on startup? Hitting a database? Loading files?

You could use a performance monitoring tool to see what is taking so long.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: load-on-startup in web.xml, Performance issues
 
Similar Threads
<load-on-startup> in Deployment Descriptor
Loading two servlets at the startup?
What is the use of this servlet?
Doubt in load on startup tag
Load On Startup