tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat threads, II
Date Wed, 12 Nov 2008 17:14:57 GMT
Caldarale, Charles R wrote:
>> From: André Warnier [mailto:aw@ice-sa.com]
>> Subject: Tomcat threads, II
>>
 >> -Djava.security.manager
 >
 > Enabling the security manager slows things down; do you really need it?
 >

Not as far as I know. It was only the default setting on that system, 
from the (non-official) Tomcat5.5 Debian package.  I have turned it off 
now, and restarted Tomcat, but it did not have any noticeable impact on 
the startup time.

>> -classpath :/usr/lib/jvm/java-1.5.0-sun/jre//lib/jcert.jar:
>> /usr/lib/jvm/java-1.5.0-sun/jre//lib/jnet.jar:
>> /usr/lib/jvm/java-1.5.0-sun/jre//lib/jsse.jar:
>> /usr/share/tomcat5.5/bin/bootstrap.jar:
>> /usr/share/tomcat5.5/bin/commons-logging-api.jar
> 
> The classpath above is very wrong: no jars from jre/lib should *ever* be on the classpath.
 Those jars are already on the JVM's bootclasspath and will at best be ignored anywhere else.
 Their presence will at a minimum slow down Tomcat initialization.
> 
> Also, the commons-logging-api.jar should not be on the classpath; Tomcat finds that all
by itself, based on entries in the bootstrap.jar manifest.  If you need commons-logging for
a webapp, it should be in the webapp's WEB-INF/lib directory, not on classpath.
> 
> Finally, the leading colon on the classpath shouldn't be there, but it appears to do
little harm.
> 

Now that is another story.
As far as I can tell, these settings come from the "catalina.sh" script.
I have no idea if this script is modified, compared to the Official version.
It looks like it covers several platforms though, so I doubt that it is 
specifically from the Debian packager.
I attach it for inspection.

Now I'll try what you indicate above, gradually removing selected 
portions, tell you later what it does to my system.
...
Well, it seems to have survived (apart from bootstrap.jar, which I had 
to leave), and now runs as

tomcat55  8106     1 97 119903 196100 0 17:54 pts/2    00:04:56 
/usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true -Xmx256M 
-server -Djava.endorsed.dirs=/usr/share/tomcat5.5/common/endorsed 
-classpath :/usr/share/tomcat5.5/bin/bootstrap.jar 
-Dcatalina.base=/var/lib/tomcat5.5 -Dcatalina.home=/usr/share/tomcat5.5 
-Djava.io.tmpdir=/var/lib/tomcat5.5/temp 
org.apache.catalina.startup.Bootstrap start

But that did not apparently reduce its startup time much.
If anything, it seems now to occupy more memory than before :

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  8106 tomcat55  25   0  485m 202m  12m S  0.0 40.1   6:22.38 java

Against before :

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  2864 tomcat55  25   0  482m 188m  12m S  0.0 37.4   6:46.74 java

Is there an explanation for that ?
As far as I know, the same applications are loaded as last time.

I also don't seem to be able to run JConsole.  I am connecting to that 
system via a terminal-like SSH connection only.
root@arthur:/usr/share/tomcat5.5/bin# jconsole
Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation 
which requires it.
         at 
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
etc...

Is there a way around this ?



Mime
View raw message