You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dan Barron <db...@ddive.com> on 2004/04/07 08:09:19 UTC
Can AccessLogValve Cause Tomcat Performance Hit?
Hello,
We are seeing a performance hit to our server whenever we turn on
AccessLogValve for a virtual host in tomcat. Is this common or has anyone
else experienced this? Any suggestions on how to configure for optimal
performance?
Below is the virtual host entry in server.xml - tomcat is running stand
alone on a Red Hat 9 Linux box - the box is dedicated to running tomcat -
there are two virtual hosts configured for the server, and only one has any
real traffic.
<Host name="www.mysite.net" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- <Alias>www.mysite.net</Alias> -->
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="mysite.net." suffix=".txt"
timestamp="true"/>
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs/mysite.net-acesslogs"
pattern="%t %a %A %h %m %p %U"
prefix="access_log." suffix=".txt"
timestamp="true"/>
<Context path="" docBase="mysite.net/production" debug="0"/>
</Host>
Thanks in advance!
Dan Barron
dbarron@dswllc.com
Re: Can AccessLogValve Cause Tomcat Performance Hit?
Posted by Remy Maucherat <re...@jboss.org>.
Tim Funk wrote:
> Yes I can believe there is a performance hit. The valve reparses the
> string on every request. Since the Valve also uses a
> SimpleDateFormtatter - I think it is also restricted by the sync block
> imposed by that class.
Another thing: If you enabled host lookup on the connector, it can also
cause big problems with the access log.
--
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Can AccessLogValve Cause Tomcat Performance Hit?
Posted by Tim Funk <fu...@joedog.org>.
Yes I can believe there is a performance hit. The valve reparses the string
on every request. Since the Valve also uses a SimpleDateFormtatter - I think
it is also restricted by the sync block imposed by that class.
-Tim
Dan Barron wrote:
> Hello,
>
> We are seeing a performance hit to our server whenever we turn on
> AccessLogValve for a virtual host in tomcat. Is this common or has
> anyone else experienced this? Any suggestions on how to configure for
> optimal performance?
>
> Below is the virtual host entry in server.xml - tomcat is running stand
> alone on a Red Hat 9 Linux box - the box is dedicated to running tomcat
> - there are two virtual hosts configured for the server, and only one
> has any real traffic.
>
> <Host name="www.mysite.net" debug="0" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
> <!-- <Alias>www.mysite.net</Alias> -->
> <Logger className="org.apache.catalina.logger.FileLogger"
> directory="logs" prefix="mysite.net." suffix=".txt"
> timestamp="true"/>
> <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs/mysite.net-acesslogs"
> pattern="%t %a %A %h %m %p %U"
> prefix="access_log." suffix=".txt"
> timestamp="true"/>
> <Context path="" docBase="mysite.net/production" debug="0"/>
> </Host>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org