You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mario Felarca <ge...@yahoo.com> on 2002/07/17 22:59:02 UTC
Xalan performance within Tomcat
Hello all,
I have a small thread going on the xalan-j-users list, but I thought I
would ask a similar question here since the performance issue involved has
tomcat as one of its major components.
My original email:
"I am running Tomcat 3.3.1 with the JRE 1.3.1_03 server vm, and Xalan-J 2.4D1.
I wrote a small test program that performs a couple of transforms on some
data that I have that happens to be a decent size. This transforms it in
about 40 seconds each for the first pass, and usually 16 and 26 seconds
each for the subsequent iterations.
When I run the same two transforms from within a servlet running under
Tomcat, it takes an unbelievably long time. We are talking on the order of
6-8 min. for the first transform, and 2-3 min for the second one.
For further clarification, the transformers are always derived from a
Templates object. The system is a P3-800 with 256 MB of memory. When I run
my test program, it sucks nerely 100% CPU for the whole time, and chews a
healthy amount of memory. When I run from tomcat, it spikes the CPU to
varying levels but never chews it consistently, while at the same time
consuming apparently a bit less memory (or quickly gc'ing the memory).
In both cases, the Java heap is set to minimum 128 and maximum 512.
I would expect the time under the servlet to be a bit slower, primarily
because there are other things that I am doing there that I am not doing in
my test program, but these numbers are downright painful."
Some further information from discussions:
Stylesheet optimization is something to look at, but regarding the current
case the stylesheets are the same for bothe the test program and the
servlet case.
I am more convinced that this has to do with the CPU usage. When I run my
test program, it uses almost all of the CPU for the entire run, and
consequently things get done quickly.
When run from within the servlet, the CPU varies from around 3% to about
30-45%, and only rarely spikes above that.
Does anyone know what would cause this, or a way to tell it to go ahead and
chew the CPU so as to get done with processing as fast as possible?
As for the heap size issue, I tried setting it to -Xms128m and -Xmx128m and
ended up blowing the heap under both my test program and tomcat. I don't
really think it is a heap issue because this performance is similar on
other machines we have tested on that have 1GB of memory.
Any thoughts, ideas, or experiences to share?
Thanks in advance,
Mario-
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: webapp
Posted by peter lin <pe...@labs.gte.com>.
I figured out why I was getting null back from
SERVLETCONTEXT.getServletContextName(), my web.xml file didn't have the
<display-name>name</display-name> defined. Now that I have it in there,
I see the event fired twice for my webapp.
Is that a bug? From what I can tell, it is creating the webapp twice.
If I print out event.getSource() the objects are different. Can someone
verify if this is a bug?
peter lin
peter lin wrote:
>
> Does anyone know how to get the webapp name from ServletContext? Here
> is a quick description of what i am trying to do.
>
> I have a webapp that i want to load when tomcat starts. I want to make
> sure the webapp only starts for one webapp and not the others.
>
> I wrote a test class that implements
> javax.servlet.ServletContextListener. What I'm seeing is the event is
> fired twice and therefore loading the app twice. It seems a bit weird
> to have the event fire twice. My test Listener checks to make sure the
> app isn't already in the ServletContext before creating it. I have the
> root path set to specific path in server.xml.
>
> thanks in advance.
>
> peter lin
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
webapp
Posted by peter lin <pe...@labs.gte.com>.
Does anyone know how to get the webapp name from ServletContext? Here
is a quick description of what i am trying to do.
I have a webapp that i want to load when tomcat starts. I want to make
sure the webapp only starts for one webapp and not the others.
I wrote a test class that implements
javax.servlet.ServletContextListener. What I'm seeing is the event is
fired twice and therefore loading the app twice. It seems a bit weird
to have the event fire twice. My test Listener checks to make sure the
app isn't already in the ServletContext before creating it. I have the
root path set to specific path in server.xml.
thanks in advance.
peter lin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
webapp
Posted by peter lin <pe...@labs.gte.com>.
Does anyone know how to get the webapp name from ServletContext? Here
is a quick description of what i am trying to do.
I have a webapp that i want to load when tomcat starts. I want to make
sure the webapp only starts for one webapp and not the others.
I wrote a test class that implements
javax.servlet.ServletContextListener. What I'm seeing is the event is
fired twice and therefore loading the app twice. It seems a bit weird
to have the event fire twice. My test Listener checks to make sure the
app isn't already in the ServletContext before creating it. I have the
root path set to specific path in server.xml.
thanks in advance.
peter lin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
tomcat 4.0.3 Http header referer
Posted by peter lin <pe...@labs.gte.com>.
I think I may have found a bug affecting the referer when an error page
is specified.
I've tried using both request.getRequestDispatcher() and setting the
error page. when I use
<%@ page
errorPage="/exception.jsp"
%>
it returns the hostname without the path.
when I use requestdispatcher "referer" isn't even in the http header.
Is this the correct behavior.
peter lin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>