Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tomcat performance 1

Status
Not open for further replies.

MrTom

Programmer
Mar 13, 2001
383
GB
i've just started using java and tomcat and am a little confused over the performance i am getting.

i'm using v3.2.2 and just have one servlet which does a real simple xsl transform.

the trouble is that if i use lynx on localhost to access the page i get massive differences in reload times. the box is not running anything else and has a 0.00 load average.
sometimes it will load the page in <100ms but other times it can take 5 seconds or more. to do the reloads i just hit ctrl-R in lynx.

is there any explanation for this? would i notice a big difference if i upgraded to tomcat 4?
also if anyone has had experience of tomcat running under a heavy load (in production) i'd be interested to hear how it performs.

thanks.
 
I was doing development in 3.2.1 and switched to 4.0.1 and seemed to see a performance improvement while testing, albeit I don't have any production or heavy load experience.

You should consider going to the 4.0 version 1) 4.0 implements the latest servlet and JSP specifications (2.3 and 1.2 respectively)--there are a lot of nice features like life-cycle events for application level attribute management, etc. And 2) if you ever decide to get Sun Web Component Developer certification then you are familiarizing yourself with the pertinent specifications.

I understand you to mean by loading as a request from a &quot;Lynx&quot; web browser with the URL pointing to a servlet--NOT a JSP page. I would think there could be a delay the first time a servlet is called; maybe you are doing something in init() that is expensive? If it is random for repeated calls to same servlet in same runtime then maybe a lot of objects are involved with &quot;xsl transform&quot; and the garbage collector is kicking in to clear out garbage objects from pervious requests?

Sorry, I am from Java backgound and I am not familiar with xsl.

pfist
 
thanks for the info.

i'm new to java as well as writing servlets so this clears some thing up for me. the servlet i made (no JSP) doesn't really do anything time consuming and only performs a very basic operation. i was expecting things to be pretty much instant but i guess i'll have to see how things scale as my servlet gets more complex :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top