RE: 20 Tips for Using Tomcat in Production

2007-08-29 Thread myrealbruno
: Tomcat Users List Assunto: Re: 20 Tips for Using Tomcat in Production Thanks for this info,... How do I implement this tip? #18. Use the -server JVM option. This enables the server JVM, which JIT compiles bytecode much earlier, and with stronger optimizations. Startup and first calls will be slower

RE: 20 Tips for Using Tomcat in Production

2007-08-29 Thread myrealbruno
in the usual library versions nightmare.. :-) -Original Message- From: Diego Yasuhiko Kurisaki [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 00:35 To: Tomcat Users List Subject: Re: 20 Tips for Using Tomcat in Production I agree, i'm not willing to pay the management overhead of putting my

Re: 20 Tips for Using Tomcat in Production

2007-08-29 Thread Ole Ersoy
library versions nightmare.. :-) -Original Message- From: Diego Yasuhiko Kurisaki [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 00:35 To: Tomcat Users List Subject: Re: 20 Tips for Using Tomcat in Production I agree, i'm not willing to pay the management overhead of putting my shared

Re: 20 Tips for Using Tomcat in Production

2007-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck and Ole, Caldarale, Charles R wrote: From: Ole Ersoy [mailto:[EMAIL PROTECTED] Subject: Re: 20 Tips for Using Tomcat in Production Anyone know if there is a way to verify that the jvm is running in server mode? Enable JMX and use

RE: 20 Tips for Using Tomcat in Production

2007-08-28 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: 20 Tips for Using Tomcat in Production Or just look at the value for the system property java.vm.name. Yes, that's exactly what both JConsole and Lambda Probe do; I was just trying to suggest a mechanism that didn't require

Re: 20 Tips for Using Tomcat in Production

2007-08-28 Thread Ole Ersoy
] Subject: Re: 20 Tips for Using Tomcat in Production Or just look at the value for the system property java.vm.name. Yes, that's exactly what both JConsole and Lambda Probe do; I was just trying to suggest a mechanism that didn't require writing additional code. - Chuck THIS COMMUNICATION MAY

Re: 20 Tips for Using Tomcat in Production

2007-08-27 Thread Ole Ersoy
Hi, I'm trying to get the -server option working with jsvc. When inserting -server I get this: [EMAIL PROTECTED] init.d]# service tomcat start Starting tomcat 27/08/2007 21:11:08 10371 jsvc error: Invalid option -server 27/08/2007 21:11:08 10371 jsvc error: Cannot parse command line arguments

Re: 20 Tips for Using Tomcat in Production

2007-08-27 Thread Ole Ersoy
Hi, I ran ./jsvc help and notice it had a -jvm option. So I tried this: CATALINA_HOME=/usr/share/apache-tomcat JAVA_HOME=/usr/lib/jvm/java DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc TOMCAT_USER=tomcat TMP_DIR=/var/cache/apache-tomcat/temp

RE: 20 Tips for Using Tomcat in Production

2007-08-27 Thread Caldarale, Charles R
From: Ole Ersoy [mailto:[EMAIL PROTECTED] Subject: Re: 20 Tips for Using Tomcat in Production Anyone know if there is a way to verify that the jvm is running in server mode? Enable JMX and use JConsole to look inside, or install Lambda Probe and look at its System Information tab. Get

Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel V Sedlacek
Thanks for this info,... How do I implement this tip? #18. Use the -server JVM option. This enables the server JVM, which JIT compiles bytecode much earlier, and with stronger optimizations. Startup and first calls will be slower due to JIT compilation taking more time, but subsequent ones will

Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Ben Souther
It depends on which operating system you're using and how you've installed Tomcat. Can you tell us which it is? On Wed, 2007-08-22 at 07:19, Karel V Sedlacek wrote: Thanks for this info,... How do I implement this tip? #18. Use the -server JVM option. This enables the server JVM, which

Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Leon Rosenberg
as far as i know this option is outdated, hence the vm automatically goes into server mode if it detects a server class machine (=2GB RAM, 2 processors (which also includes ht or dualcore) leon maybe wrong though On 8/22/07, Ben Souther [EMAIL PROTECTED] wrote: It depends on which operating

Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Ronald Klop
See the table in this page. On Windows on i586 java always defaults to client runtime. (amd64 or ia-64 are different) http://java.sun.com/docs/hotspot/gc5.0/ergo5.html If you can set JAVA_OPTS=-server java starts with it. Print System.getProperties() and you can see what runtime is used.

Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel Sedlacek
OK, let me give this a whirl. Karel At 09:20 AM 8/22/2007, you wrote: See the table in this page. On Windows on i586 java always defaults to client runtime. (amd64 or ia-64 are different) http://java.sun.com/docs/hotspot/gc5.0/ergo5.html If you can set JAVA_OPTS=-server java starts with it.

RE: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Caldarale, Charles R
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: 20 Tips for Using Tomcat in Production as far as i know this option is outdated, hence the vm automatically goes into server mode if it detects a server class machine (=2GB RAM, 2 processors (which also includes ht or dualcore

RE: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel Sedlacek
Thank you, we are running Windows,... will check the Service properties. At 09:55 AM 8/22/2007, you wrote: From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Subject: Re: 20 Tips for Using Tomcat in Production as far as i know this option is outdated, hence the vm automatically goes

Re: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Karel Sedlacek
you think? PLEASE DONT! (I won't) Leon -Mensagem original- De: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Enviada em: quarta-feira, 22 de agosto de 2007 10:56 Para: Tomcat Users List Assunto: RE: 20 Tips for Using Tomcat in Production From: Leon Rosenberg [mailto:[EMAIL

RE: 20 Tips for Using Tomcat in Production

2007-08-22 Thread Caldarale, Charles R
From: Milanez, Marcus [mailto:[EMAIL PROTECTED] Subject: RES: 20 Tips for Using Tomcat in Production What's wrong? Problems with native libraries? Makes the environment much more complex and is platform-specific, eliminating one of Tomcat's highly desirable attributes - platform

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread David Delbecq
Very nice. May i suggest 2 comments perhaps?: 6... If you're loading several applications with several of the same library dependencies, consider moving them from the applications' |WEB-INF/lib| directory to Tomcat's shared library |{catalina.home}/shared/lib|. This will reduce the memory used by

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Lyallex
Good stuff I'm doing 70% of what you suggest and Tomcat 5.5.20 hums along nicely on Debian Linux with Java 1.5.0_04 I bet this one runs and runs ... Rgds Duncan On 8/21/07, Shane Witbeck [EMAIL PROTECTED] wrote: I thought my latest blog post would be of interest to the people on this list:

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread David Smith
Well... be careful on the use of the shared/common classloader. It works as long as all the apps can use the same version of a library. If there are changes to the API and you have the library in the shared or common classloaders you'll have to upgrade all the webapps at once. --David

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Shane Witbeck
Chris, Yes I agree that the extent at which #6 is implemented probably depends a lot on the size of the app (namely the number of libraries). There's already a link to the Tomcat original documentation for #3 although I noticed I forgot the link for #2. Thanks for the comments, Shane On

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Shane Witbeck
David, Thanks for your comments. I've added them to the blog post for everyone's benefit. Shane On 8/21/07, David Delbecq [EMAIL PROTECTED] wrote: Very nice. May i suggest 2 comments perhaps?: 6... If you're loading several applications with several of the same library dependencies,

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Ben Souther
Tip #8: You tell the users about the tomcat-users.xml file for adding the role info but never tell them where to enter the RemoteAddrValve in order to restrict IPs. On Tue, 2007-08-21 at 10:57, Shane Witbeck wrote: David, Thanks for your comments. I've added them to the blog post for

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Shane Witbeck
Good point. I've updated the entry to be more specific. Thanks! On 8/21/07, Ben Souther [EMAIL PROTECTED] wrote: Tip #8: You tell the users about the tomcat-users.xml file for adding the role info but never tell them where to enter the RemoteAddrValve in order to restrict IPs. On Tue,

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Ben Souther
The connector entries are also case sensitive: connector port=8009 ... Should be Connector port=8009 ... On Tue, 2007-08-21 at 13:55, Shane Witbeck wrote: Good point. I've updated the entry to be more specific. Thanks! On 8/21/07, Ben Souther [EMAIL PROTECTED] wrote: Tip #8: You

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Shane Witbeck
Thanks! I've corrected the entries. On 8/21/07, Ben Souther [EMAIL PROTECTED] wrote: The connector entries are also case sensitive: connector port=8009 ... Should be Connector port=8009 ... On Tue, 2007-08-21 at 13:55, Shane Witbeck wrote: Good point. I've updated the entry to be

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Kim Albee
In putting #1 into the JAVA_OPTS (which it appears that is the CATALINA_OPTS for our implementation), it doesn't appear to work, as Tomcat doesn't restart. It could be our version -- which is currently 5.0.30. please let me know if there are other steps we need to take here as well. thanks, Kim

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Shane Witbeck
You can actually use JAVA_OPTS or CATALINA_OPTS to add the options and the options only apply to JDK 1.5 or above. I don't think the version of Tomcat matters here. Shane On 8/21/07, Kim Albee [EMAIL PROTECTED] wrote: In putting #1 into the JAVA_OPTS (which it appears that is the CATALINA_OPTS

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shane, Shane Witbeck wrote: You can actually use JAVA_OPTS or CATALINA_OPTS to add the options and the options only apply to JDK 1.5 or above. I don't think the version of Tomcat matters here. There is a (minor) difference between the two:

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Ben Souther
From: Christopher Schultz I also agree with David and, uh, David, that #6 is a little dubious. Yes, moving shared libraries into the common/lib directory will save you some memory, but it creates a management headache when it comes to version numbers, WAR

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Diego Yasuhiko Kurisaki
I agree, i'm not willing to pay the management overhead of putting my shared libraries to the tomcat common lib, unless my gains are very big in terms of memory consumption. I don't really think you should change for another one though, but you can make regards about the cons of that approach.

Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Tim Funk
#6 - Shared classloaders are evil, but not as evil as the invoker servlet. With a shared loader you can easily get Singleton assumptions being wrong, class cast exceptions, versioning woes, and other issues. Saving a little perm memory just doesn't justify it. #7 - You should have a