Hi.
Starting from a vanilla current Tomcat 7 download (*), on a Linux server
I have looked at the on-line Configuration documentation of Tomcat 7, but that kind of
information is not really provided there.
We would like to configure this tomcat to be as lean and mean as possible, within the
following parameters :
- it only needs one default "Host"
- we do not use the Manager
- it is running a single webapp, which has only a few servlets and no JSP pages
at all.
- the application is never deployed/undeployed "live"; when we make a change, we always
restart Tomcat
- all accesses to Tomcat happen through an Apache httpd front-end on the same host, via
mod_jk and Tomcat's AJP Connector
- there is no authentication done at the Tomcat level; if AAA is done, it is done at the
httpd level and passed on via mod_jk
- there is no need for an Access log (we have one at the Apache httpd front-end
level)
- the running webapp does not leak memory, does not start "ThreadLocal"'s
(whatever that is)
- we do not need SSL (so do we need APR ? does it bring anything in this case ?)
- the request volume is low, in relation to what I see sometimes being mentioned on this
Users List (say peak may be 10 per second, and it does not happen often)
- we would like only one logfile, for everything which Tomcat itself produces (currently,
it seems to produce half a dozen, most of them empty but nevertheless rotated on a daily base)
- we would like a separate logfile for the one webapp, because it unfortunately produces a
bunch of junk output to sysout and/or syserr, and there is no way to turn that off at the
webapp level, and we do not have the source code of that webapp.
(Basically, I would like to "junk" this output to /dev/null, but how do I do that with the
standard Tomcat JULI logging ?)
So basically, what can we remove from the standard "server.xml" and the standard
"logging.properties", and which may be meaningful to remove ?
I am starting from the premise that whatever ones adds, uses some resources in some way.
But I also do not want to spend hours wringing the last 1 KB out of memory; 1 MB might be
worthwhile though, specially if it is there for each running webapp instance.
For example, in the standard server.xml, there are the following Listeners listed at the
beginning :
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"
/>
Do they use resources ? are they useful/used in the above scenario ? would removing them
create a problem ? would removing them save 1 MB or more (or 1 M CPU cycles per request ) ?
Thanks for any tips.
(*) Ok, that is not really true, it is a Linux Debian packaged Tomcat. But I don't think
that the server.xml and logging.properties are different from the official Tomcat.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org