tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Should I use the -server switch?
Date Fri, 06 Feb 2009 04:45:25 GMT
> From: Bill Davidson [mailto:billdsd@gmail.com]
> Subject: Should I use the -server switch?
>
> Tomcat 6.0.18
> JVM: Sun 1.6.0_11 64-bit for Linux

Most of the 64-bit Sun JVMs come only in -server mode, no -client version.  Run "java -version"
(without the quotes) to see what the default mode is.

> What does this switch really do anyway?

There are two byte-code to native compilers in the JVM, called client and server (or C1 and
C2, internally).  The C1 compiler focuses on fast compilations, whereas C2 tries to generate
the most optimum code.  The C2 compiler will actually recompile methods multiple times to
improve optimization as it learns more about how methods are being used.  C2-generated code
is often 10-15% faster than C1 code, but it takes a *lot* longer to compile things.

The current HotSpot JVMs only allow you to select one or the other mode, and you're stuck
with it for the life of that JVM execution.  Sun is moving the JVM towards tiered compilations,
where both the C1 and C2 compilers will work together, with C1 being used initially, and C2
applied to heavily used pieces of the application.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message