Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

How Do I Configure a Tomcat Server for Production?

Thread view: 
JD - 09 Jan 2006 22:24 GMT
Hello,
I am pretty new to Tomcat.  I am wondering if there are any standard
configurations that need to be added/modified as part of a Production
deployment aside from database URLs and those types of values.
Currently, we have mostly the same configuration for Production as we
do for development.

As the load increases are there any obvious values that we should be
changing?

Thanks, Jesse
none - 09 Jan 2006 22:59 GMT
> Hello,
> I am pretty new to Tomcat.  I am wondering if there are any standard
[quoted text clipped - 7 lines]
>
> Thanks, Jesse

just a quicky:

Harden the web application, (such as checking for SQL injection exploits
etc)
Profile application to find potential bottlenecks.
Make sure the box is patched up and secure, with a good firewall.

Configuring the tomcat security manager would be a good start.
Run its as a non root/Administrator user just in case.
restrict admin, status and manager apps access (if needed) to the public.
Reduce application logging level as this may effect performance due to
the traffic increase.
Try to guestimate a sensible initial value for max threads, min threads,
accept count propeties of tomcat's connector and monitor closely and
adjust if needed. Is http compression an option? if use the http
connector property.

Make sure the JVM has enough memory available including its permanent
storage and running using the server jvm using args such as '-server
-Xmsfoom -Xmxbarm -XX:MaxPermSize=foobarm'. You may want to google for
jvm performance tuning, for many more options.

Configure an access log valve for web statistics collection.

Tim
Aray - 10 Jan 2006 01:09 GMT
"none" <""tim\"@(none)"> ??????:43c2e9bd$0$29564$da0feed9@news.zen.co.uk...

> Make sure the JVM has enough memory available including its permanent
> storage and running using the server jvm using args such as
> '-server -Xmsfoom -Xmxbarm -XX:MaxPermSize=foobarm'. You may want to
> google for jvm performance tuning, for many more options.

could you tell me the difference of JVM performance while set to '-server'
or '-client'?
Roedy Green - 10 Jan 2006 02:49 GMT
>could you tell me the difference of JVM performance while set to '-server'
>or '-client'?

For client the name of the game is to get up and going quickly. For
server you don't care how long it takes to start.  You are going to be
running for days. You want to fine tune the hotspot code since you
will be running it over and over.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Thomas Hawtin - 10 Jan 2006 18:08 GMT
> could you tell me the difference of JVM performance while set to '-server'
> or '-client'?

Broadly Client HotSpot is optimised for fast start up and to use
slightly less memory. Server HotSpot is designed to get the best
performance out of long running processes.

In 1.5 -client will default to use Class Data Sharing, so the class
loading time and memory use is reduced. That makes little odds if you
are going to load a large application anyway.

By default, -client compiles code after 1,500 iterations, -server
10,000. -server then compiles it harder, which takes longer and can
produce large object code (loop unrolling and more aggressive inlining,
for instance). From 1.6 the advantage is reduced, as -clients bad
register allocator has been replaced. There is apparently a plan to use
the client compiler first, and then recompile with the server compiler
after more iterations.

The calculation of when to clear SoftReferences is done on the basis of
current heap size with -client, but maximum heap size with -server.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/

IchBin - 10 Jan 2006 02:46 GMT
> Hello,
> I am pretty new to Tomcat.  I am wondering if there are any standard
[quoted text clipped - 7 lines]
>
> Thanks, Jesse

A lot of people run Apache in front of Tomcat. Reasons, to share the
work between static and dynamic pages and the security Apache adds to
Tomcat. I run it myself this way.

Performance and Monitoring
http://tomcat.apache.org/faq/performance.html

http://marc.theaimsgroup.com/?l=tomcat-user&m=106036177509367&w=2

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)
none - 10 Jan 2006 19:18 GMT
>> Hello,
>> I am pretty new to Tomcat.  I am wondering if there are any standard
[quoted text clipped - 24 lines]
> 'If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor,  Regular Guy (1952-)
in addition, by running apache infront of tomcat you use some of its
fancy modules.
The apache server could also act as a entry point into a tomcat cluster.

Tim


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.