20 Tips for Using Tomcat in Production

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 | Next >

20 Tips for Using Tomcat in Production

by digitalsanctum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I thought my latest blog post would be of interest to the people on this list:

http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown RES: 20 Tips for Using Tomcat in Production

by Milanez, Marcus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thank you very much!  

-----Mensagem original-----
De: Shane Witbeck [mailto:shane@...]
Enviada em: terça-feira, 21 de agosto de 2007 09:10
Para: users@...
Assunto: 20 Tips for Using Tomcat in Production

I thought my latest blog post would be of interest to the people on this list:

http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/

---------------------------------------------------------------------
To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by David Delbecq-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 each
application and result in smaller WAR files.

You should make a remark that this change the behaviour of webapp:
 a) Shared classloader is searched in last ressort when looking for
classes, according to
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
 b) Because the classes are shared, they share config & singletons and
if they store objects statically they will prevent webapp unloading


7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
performance improvements.

Note that you can gain even more performance if you recompile your
"string concatenation hungry" (d="aaaa"+b+"ccc") support libaries for
jdk 5+ on a multi CPU system. This is because jdk5 uses the
non-synchronized stringbuilder instead of the jdk 4- synchronized
StringBuffer. And synchronization over multiple cpu takes a few more
cycles than on single CPU machines.



En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en ces
termes:
> I thought my latest blog post would be of interest to the people on this list:
>
> http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>  


--
http://www.noooxml.org/


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Lyallex :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <shane@...> wrote:

> I thought my latest blog post would be of interest to the people on this list:
>
> http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by David Smith-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

David Delbecq wrote:

>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 each
>application and result in smaller WAR files.
>
>You should make a remark that this change the behaviour of webapp:
> a) Shared classloader is searched in last ressort when looking for
>classes, according to
>http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
> b) Because the classes are shared, they share config & singletons and
>if they store objects statically they will prevent webapp unloading
>
>
>7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
>performance improvements.
>
>Note that you can gain even more performance if you recompile your
>"string concatenation hungry" (d="aaaa"+b+"ccc") support libaries for
>jdk 5+ on a multi CPU system. This is because jdk5 uses the
>non-synchronized stringbuilder instead of the jdk 4- synchronized
>StringBuffer. And synchronization over multiple cpu takes a few more
>cycles than on single CPU machines.
>
>
>
>En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en ces
>termes:
>  
>
>>I thought my latest blog post would be of interest to the people on this list:
>>
>>http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@...
>>To unsubscribe, e-mail: users-unsubscribe@...
>>For additional commands, e-mail: users-help@...
>>  
>>    
>>
>
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shane,

Shane Witbeck wrote:
> I thought my latest blog post would be of interest to the people on this list:

I like the list. Could you provide references where appropriate? For
instance, you reference the Tomcat documentation in point #3, but don't
provide a link to the original documentation so readers can see it in
context.

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 packaging, etc. Ideally, the WAR contains
everything the webapp needs. If you rely on the servlet container to
provide essential libraries, you are changing your deployment strategy
significantly.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyvEd9CaO5/Lv0PARAkgHAKC+r4J+CMqaBtkBu52zw++/duGmngCglRuk
Zjl7KeAJuD2q1xKhbUTjVxw=
=C4Nf
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by digitalsanctum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 8/21/07, Christopher Schultz <chris@...> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Shane,
>
> Shane Witbeck wrote:
> > I thought my latest blog post would be of interest to the people on this list:
>
> I like the list. Could you provide references where appropriate? For
> instance, you reference the Tomcat documentation in point #3, but don't
> provide a link to the original documentation so readers can see it in
> context.
>
> 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 packaging, etc. Ideally, the WAR contains
> everything the webapp needs. If you rely on the servlet container to
> provide essential libraries, you are changing your deployment strategy
> significantly.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGyvEd9CaO5/Lv0PARAkgHAKC+r4J+CMqaBtkBu52zw++/duGmngCglRuk
> Zjl7KeAJuD2q1xKhbUTjVxw=
> =C4Nf
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Thank you,

Shane Witbeck
Digital Sanctum, inc.
-----------------------------------------------------
skype: digitalsanctum
  blog: http://www.digitalsanctum.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by digitalsanctum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David,

Thanks for your comments. I've added them to the blog post for
everyone's benefit.

Shane

On 8/21/07, David Delbecq <delbd+jakarta@...> wrote:

> 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 each
> application and result in smaller WAR files.
>
> You should make a remark that this change the behaviour of webapp:
>  a) Shared classloader is searched in last ressort when looking for
> classes, according to
> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
>  b) Because the classes are shared, they share config & singletons and
> if they store objects statically they will prevent webapp unloading
>
>
> 7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
> performance improvements.
>
> Note that you can gain even more performance if you recompile your
> "string concatenation hungry" (d="aaaa"+b+"ccc") support libaries for
> jdk 5+ on a multi CPU system. This is because jdk5 uses the
> non-synchronized stringbuilder instead of the jdk 4- synchronized
> StringBuffer. And synchronization over multiple cpu takes a few more
> cycles than on single CPU machines.
>
>
>
> En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en ces
> termes:
> > I thought my latest blog post would be of interest to the people on this list:
> >
> > http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@...
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
>
>
> --
> http://www.noooxml.org/
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Thank you,

Shane Witbeck
Digital Sanctum, inc.
-----------------------------------------------------
skype: digitalsanctum
  blog: http://www.digitalsanctum.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Ben Souther-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
> everyone's benefit.
>
> Shane
>
> On 8/21/07, David Delbecq <delbd+jakarta@...> wrote:
> > 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 each
> > application and result in smaller WAR files.
> >
> > You should make a remark that this change the behaviour of webapp:
> >  a) Shared classloader is searched in last ressort when looking for
> > classes, according to
> > http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
> >  b) Because the classes are shared, they share config & singletons and
> > if they store objects statically they will prevent webapp unloading
> >
> >
> > 7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
> > performance improvements.
> >
> > Note that you can gain even more performance if you recompile your
> > "string concatenation hungry" (d="aaaa"+b+"ccc") support libaries for
> > jdk 5+ on a multi CPU system. This is because jdk5 uses the
> > non-synchronized stringbuilder instead of the jdk 4- synchronized
> > StringBuffer. And synchronization over multiple cpu takes a few more
> > cycles than on single CPU machines.
> >
> >
> >
> > En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en ces
> > termes:
> > > I thought my latest blog post would be of interest to the people on this list:
> > >
> > > http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@...
> > > To unsubscribe, e-mail: users-unsubscribe@...
> > > For additional commands, e-mail: users-help@...
> > >
> >
> >
> > --
> > http://www.noooxml.org/
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@...
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Parent Message unknown RES: 20 Tips for Using Tomcat in Production

by Milanez, Marcus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


We should create a wiki to accomplish all theses tips.... Why not?

-----Mensagem original-----
De: Ben Souther [mailto:ben@...]
Enviada em: terça-feira, 21 de agosto de 2007 14:46
Para: Tomcat Users List
Assunto: Re: 20 Tips for Using Tomcat in Production

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
> everyone's benefit.
>
> Shane
>
> On 8/21/07, David Delbecq <delbd+jakarta@...> wrote:
> > 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
> > |each
> > application and result in smaller WAR files.
> >
> > You should make a remark that this change the behaviour of webapp:
> >  a) Shared classloader is searched in last ressort when looking for
> > classes, according to
> > http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
> >  b) Because the classes are shared, they share config & singletons
> > and if they store objects statically they will prevent webapp
> > unloading
> >
> >
> > 7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
> > performance improvements.
> >
> > Note that you can gain even more performance if you recompile your
> > "string concatenation hungry" (d="aaaa"+b+"ccc") support libaries
> > for jdk 5+ on a multi CPU system. This is because jdk5 uses the
> > non-synchronized stringbuilder instead of the jdk 4- synchronized
> > StringBuffer. And synchronization over multiple cpu takes a few more
> > cycles than on single CPU machines.
> >
> >
> >
> > En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en
> > ces
> > termes:
> > > I thought my latest blog post would be of interest to the people on this list:
> > >
> > > http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-
> > > in-production/
> > >
> > > ------------------------------------------------------------------
> > > --- To start a new topic, e-mail: users@... To
> > > unsubscribe, e-mail: users-unsubscribe@...
> > > For additional commands, e-mail: users-help@...
> > >
> >
> >
> > --
> > http://www.noooxml.org/
> >
> >
> > --------------------------------------------------------------------
> > - To start a new topic, e-mail: users@... To
> > unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >


---------------------------------------------------------------------
To start a new topic, e-mail: users@... To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by digitalsanctum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Good point. I've updated the entry to be more specific. Thanks!

On 8/21/07, Ben Souther <ben@...> 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, 2007-08-21 at 10:57, Shane Witbeck wrote:
> > David,
> >
> > Thanks for your comments. I've added them to the blog post for
> > everyone's benefit.
> >
> > Shane
> >
> > On 8/21/07, David Delbecq <delbd+jakarta@...> wrote:
> > > 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 each
> > > application and result in smaller WAR files.
> > >
> > > You should make a remark that this change the behaviour of webapp:
> > >  a) Shared classloader is searched in last ressort when looking for
> > > classes, according to
> > > http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
> > >  b) Because the classes are shared, they share config & singletons and
> > > if they store objects statically they will prevent webapp unloading
> > >
> > >
> > > 7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
> > > performance improvements.
> > >
> > > Note that you can gain even more performance if you recompile your
> > > "string concatenation hungry" (d="aaaa"+b+"ccc") support libaries for
> > > jdk 5+ on a multi CPU system. This is because jdk5 uses the
> > > non-synchronized stringbuilder instead of the jdk 4- synchronized
> > > StringBuffer. And synchronization over multiple cpu takes a few more
> > > cycles than on single CPU machines.
> > >
> > >
> > >
> > > En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en ces
> > > termes:
> > > > I thought my latest blog post would be of interest to the people on this list:
> > > >
> > > > http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
> > > >
> > > > ---------------------------------------------------------------------
> > > > To start a new topic, e-mail: users@...
> > > > To unsubscribe, e-mail: users-unsubscribe@...
> > > > For additional commands, e-mail: users-help@...
> > > >
> > >
> > >
> > > --
> > > http://www.noooxml.org/
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@...
> > > To unsubscribe, e-mail: users-unsubscribe@...
> > > For additional commands, e-mail: users-help@...
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Thank you,

Shane Witbeck
Digital Sanctum, inc.
-----------------------------------------------------
skype: digitalsanctum
  blog: http://www.digitalsanctum.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Ben Souther-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <ben@...> 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, 2007-08-21 at 10:57, Shane Witbeck wrote:
> > > David,
> > >
> > > Thanks for your comments. I've added them to the blog post for
> > > everyone's benefit.
> > >
> > > Shane
> > >
> > > On 8/21/07, David Delbecq <delbd+jakarta@...> wrote:
> > > > 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 each
> > > > application and result in smaller WAR files.
> > > >
> > > > You should make a remark that this change the behaviour of webapp:
> > > >  a) Shared classloader is searched in last ressort when looking for
> > > > classes, according to
> > > > http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
> > > >  b) Because the classes are shared, they share config & singletons and
> > > > if they store objects statically they will prevent webapp unloading
> > > >
> > > >
> > > > 7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
> > > > performance improvements.
> > > >
> > > > Note that you can gain even more performance if you recompile your
> > > > "string concatenation hungry" (d="aaaa"+b+"ccc") support libaries for
> > > > jdk 5+ on a multi CPU system. This is because jdk5 uses the
> > > > non-synchronized stringbuilder instead of the jdk 4- synchronized
> > > > StringBuffer. And synchronization over multiple cpu takes a few more
> > > > cycles than on single CPU machines.
> > > >
> > > >
> > > >
> > > > En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en ces
> > > > termes:
> > > > > I thought my latest blog post would be of interest to the people on this list:
> > > > >
> > > > > http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To start a new topic, e-mail: users@...
> > > > > To unsubscribe, e-mail: users-unsubscribe@...
> > > > > For additional commands, e-mail: users-help@...
> > > > >
> > > >
> > > >
> > > > --
> > > > http://www.noooxml.org/
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To start a new topic, e-mail: users@...
> > > > To unsubscribe, e-mail: users-unsubscribe@...
> > > > For additional commands, e-mail: users-help@...
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@...
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >


---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by digitalsanctum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks! I've corrected the entries.

On 8/21/07, Ben Souther <ben@...> 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 more specific. Thanks!
> >
> > On 8/21/07, Ben Souther <ben@...> 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, 2007-08-21 at 10:57, Shane Witbeck wrote:
> > > > David,
> > > >
> > > > Thanks for your comments. I've added them to the blog post for
> > > > everyone's benefit.
> > > >
> > > > Shane
> > > >
> > > > On 8/21/07, David Delbecq <delbd+jakarta@...> wrote:
> > > > > 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 each
> > > > > application and result in smaller WAR files.
> > > > >
> > > > > You should make a remark that this change the behaviour of webapp:
> > > > >  a) Shared classloader is searched in last ressort when looking for
> > > > > classes, according to
> > > > > http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.
> > > > >  b) Because the classes are shared, they share config & singletons and
> > > > > if they store objects statically they will prevent webapp unloading
> > > > >
> > > > >
> > > > > 7...Consider JDK 1.5 or even better JDK 1.6 to take advantage of
> > > > > performance improvements.
> > > > >
> > > > > Note that you can gain even more performance if you recompile your
> > > > > "string concatenation hungry" (d="aaaa"+b+"ccc") support libaries for
> > > > > jdk 5+ on a multi CPU system. This is because jdk5 uses the
> > > > > non-synchronized stringbuilder instead of the jdk 4- synchronized
> > > > > StringBuffer. And synchronization over multiple cpu takes a few more
> > > > > cycles than on single CPU machines.
> > > > >
> > > > >
> > > > >
> > > > > En l'instant précis du 21/08/07 14:10, Shane Witbeck s'exprimait en ces
> > > > > termes:
> > > > > > I thought my latest blog post would be of interest to the people on this list:
> > > > > >
> > > > > > http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To start a new topic, e-mail: users@...
> > > > > > To unsubscribe, e-mail: users-unsubscribe@...
> > > > > > For additional commands, e-mail: users-help@...
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > http://www.noooxml.org/
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To start a new topic, e-mail: users@...
> > > > > To unsubscribe, e-mail: users-unsubscribe@...
> > > > > For additional commands, e-mail: users-help@...
> > > > >
> > > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@...
> > > To unsubscribe, e-mail: users-unsubscribe@...
> > > For additional commands, e-mail: users-help@...
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Thank you,

Shane Witbeck
Digital Sanctum, inc.
-----------------------------------------------------
skype: digitalsanctum
  blog: http://www.digitalsanctum.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by mtitania :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 :-)

On 8/21/07, Shane Witbeck <shane@...> wrote:

>
> I thought my latest blog post would be of interest to the people on this
> list:
>
>
> http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

Re: 20 Tips for Using Tomcat in Production

by digitalsanctum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <mtitania@...> wrote:

> 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 :-)
>
> On 8/21/07, Shane Witbeck <shane@...> wrote:
> >
> > I thought my latest blog post would be of interest to the people on this
> > list:
> >
> >
> > http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@...
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >
>


--
Thank you,

Shane Witbeck
Digital Sanctum, inc.
-----------------------------------------------------
skype: digitalsanctum
  blog: http://www.digitalsanctum.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----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: JAVA_OPTS will always be
passed to the Java process (including a "stop" command), while
CATALINA_OPTS will only be passed when you use the "start" and "run"
commands.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGy15a9CaO5/Lv0PARApoOAJ9VANwQ8wPJnrAtSluG9g+KJ5/cbgCgoVH0
CZiSJdduRHree380Y5UraVY=
=8P48
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Ben Souther-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

                             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 packaging, etc. Ideally, the WAR contains
> everything the webapp needs. If you rely on the servlet container to
> provide essential libraries, you are changing your deployment strategy
> significantly.

+1

Starting with Servlet Spec 2.3 (I think) there has been an emphasis on
putting everything a web app needs to run into its war file.
To put include something that runs contrary to this 'best practice' in
an article of tips at this point in time doesn't sound like a good idea.

I would seriously consider replacing that one with something else.




---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Diego Yasuhiko Kurisaki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Anyway, great work 5 stars.


On 8/21/07, Ben Souther <ben@...> wrote:

>
>                              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 packaging, etc. Ideally, the WAR contains
> > everything the webapp needs. If you rely on the servlet container to
> > provide essential libraries, you are changing your deployment strategy
> > significantly.
>
> +1
>
> Starting with Servlet Spec 2.3 (I think) there has been an emphasis on
> putting everything a web app needs to run into its war file.
> To put include something that runs contrary to this 'best practice' in
> an article of tips at this point in time doesn't sound like a good idea.
>
> I would seriously consider replacing that one with something else.
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@...
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Diego Yasuhiko Kurisaki

Re: 20 Tips for Using Tomcat in Production

by Tim Funk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


#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 staging environment just like production. Your
development environment can just be a laptop which will probably
somewhat underpowered compared to your production instance.



-Tim

Shane Witbeck wrote:
> I thought my latest blog post would be of interest to the people on this list:
>
> http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: 20 Tips for Using Tomcat in Production

by Karel Sedlacek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 be faster.

Karel

> 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 :-)
>
> On 8/21/07, Shane Witbeck <shane@...> wrote:
>>
>> I thought my latest blog post would be of interest to the people on this
>> list:
>>
>>
>> http://www.digitalsanctum.com/2007/08/18/20-tips-for-using-tomcat-in-production/
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@...
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>



---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

< Prev | 1 - 2 - 3 | Next >