You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tony Anecito <ad...@yahoo.com> on 2007/11/14 22:05:49 UTC

Tomcat performance questions

Hi All,

I am using Tomcat 6.0.14 with java 1.6.0_02 on Windows
2000 professional.

I am wondering what is the best parser to use for this
configuration? The one with java 1.6.0_02?

Also, what is the best way to monitor performance? I
am using the logs and they are only 15msec resolution.
I am surprised the Tomcat design uses timers with that
resolution even when microsecond resoltion is
advertised. Why not use the nanosecond timers that
were added with jvm 1.5+ ? Please add resolution to
6.0.15.

Regards,
-Tony


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

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


Re: Tomcat performance questions

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tony,

Tony Anecito wrote:
> Actually I just saw some reports on the new quad intel 45nm
> processors and they are much faster than 15msec.

Yes, but the windows timer resolution sucks. :(

> To justify new hardware and predict scalability Capacity Planning
> groups have to show the before/after performance.

Rather than timing one operation once using nanosecond resolution, try
timing many things many times and then taking the average. I'd bet that
the margin of error gets lost in the noise, anyway.

> I have seen web apps operate in the 4msec range on commercial servlet
> containers.
> 
> I am trying to show a fortune 50 company that Tomcat is fast and a
> viable replacement that can scale. But the commercial product does
> have microsecond resolution in its logs.

Tomcat's performance shouldn't be able to be disproven just because
there are fewer zeros after the 'seconds' decimal point.

> I have measured the System.currentTimeNanos() and found it to be down
> below 1usec execute time so not sure what you are thinking.

You are simply at the mercy of the logger in most cases. Feel free to
write your own logger -- or subclass an existing one and change the
timer display from using System.currentTimeMillis to
System.currentTimeNanos.

- -chris

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

iD8DBQFHO7N49CaO5/Lv0PARAncdAJ4vftWNwkpggUclYlUApdRexVQnOQCeI8xa
JH4FGBUVrOhSemX/iRD4Ii0=
=Epbv
-----END PGP SIGNATURE-----

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


Re: Tomcat performance questions

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Tony Anecito wrote:
> Actually I just saw some reports on the new quad intel
> 45nm processors and they are much faster than 15msec.
>
> To justify new hardware and predict scalability
> Capacity Planning groups have to show the before/after
> performance.
>
> I have seen web apps operate in the 4msec range on
> comercial servlet containers.
>
> I am trying to show a fortune 50 company that Tomcat
> is fast and a viable replacement that can scale. But
> the commercial product does have microsecond
> resolution in its logs.
>
> I have measured the System.currentTimeNanos() and
> found it to be down below 1usec execute time so not
> sure what you are thinking.
>   
http://www.simongbrown.com/blog/2007/08/20/millisecond_accuracy_in_java.html
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6440250

The biggest thing, that seems to be unclearly documented, is what 
System.nanoTime returns and what that value means.
Since that becomes OS/CPU dependent, you must understand the underlying 
value.

You can of course put in any timers you want in Tomcat, just plug in a 
valve or another component that does the measurement for you.
Filip
> Hope that helps.
>
> -Tony
>
>
> --- Filip Hanik - Dev Lists <de...@hanik.com>
> wrote:
>
>   
>> Tony Anecito wrote:
>>     
>>> Hi All,
>>>
>>> I am using Tomcat 6.0.14 with java 1.6.0_02 on
>>>       
>> Windows
>>     
>>> 2000 professional.
>>>
>>> I am wondering what is the best parser to use for
>>>       
>> this
>>     
>>> configuration? The one with java 1.6.0_02?
>>>   
>>>       
>> for XML?
>> the Sun JRE implements the Xerces and Xalan parsers,
>> so it would be the 
>> same as if you used those.
>>     
>>> Also, what is the best way to monitor performance?
>>>       
>> I
>>     
>>> am using the logs and they are only 15msec
>>>       
>> resolution.
>>     
>>> I am surprised the Tomcat design uses timers with
>>>       
>> that
>>     
>>> resolution even when microsecond resoltion is
>>> advertised. Why not use the nanosecond timers that
>>> were added with jvm 1.5+ ? Please add resolution
>>>       
>> to
>>     
>>> 6.0.15.
>>>   
>>>       
>>  From what I understand
>> System.currentTimeMillis() - fast
>> System.currentTimeNanos() - not as fast, and we
>> don't need that granularity
>>     
>>> Regards,
>>> -Tony
>>>
>>>
>>>      
>>>       
> ____________________________________________________________________________________
>   
>>> Never miss a thing.  Make Yahoo your home page. 
>>> http://www.yahoo.com/r/hs
>>>
>>>
>>>       
> ---------------------------------------------------------------------
>   
>>> To start a new topic, e-mail:
>>>       
>> users@tomcat.apache.org
>>     
>>> To unsubscribe, e-mail:
>>>       
>> users-unsubscribe@tomcat.apache.org
>>     
>>> For additional commands, e-mail:
>>>       
>> users-help@tomcat.apache.org
>>     
>>>
>>>   
>>>       
>>
>>     
> ---------------------------------------------------------------------
>   
>> To start a new topic, e-mail:
>> users@tomcat.apache.org
>> To unsubscribe, e-mail:
>> users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail:
>> users-help@tomcat.apache.org
>>
>>
>>     
>
>
>
>       ____________________________________________________________________________________
> Get easy, one-click access to your favorites. 
> Make Yahoo! your homepage.
> http://www.yahoo.com/r/hs 
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


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


Re: Tomcat performance questions

Posted by Tony Anecito <ad...@yahoo.com>.
Actually I just saw some reports on the new quad intel
45nm processors and they are much faster than 15msec.

To justify new hardware and predict scalability
Capacity Planning groups have to show the before/after
performance.

I have seen web apps operate in the 4msec range on
comercial servlet containers.

I am trying to show a fortune 50 company that Tomcat
is fast and a viable replacement that can scale. But
the commercial product does have microsecond
resolution in its logs.

I have measured the System.currentTimeNanos() and
found it to be down below 1usec execute time so not
sure what you are thinking.

Hope that helps.

-Tony


--- Filip Hanik - Dev Lists <de...@hanik.com>
wrote:

> Tony Anecito wrote:
> > Hi All,
> >
> > I am using Tomcat 6.0.14 with java 1.6.0_02 on
> Windows
> > 2000 professional.
> >
> > I am wondering what is the best parser to use for
> this
> > configuration? The one with java 1.6.0_02?
> >   
> for XML?
> the Sun JRE implements the Xerces and Xalan parsers,
> so it would be the 
> same as if you used those.
> > Also, what is the best way to monitor performance?
> I
> > am using the logs and they are only 15msec
> resolution.
> > I am surprised the Tomcat design uses timers with
> that
> > resolution even when microsecond resoltion is
> > advertised. Why not use the nanosecond timers that
> > were added with jvm 1.5+ ? Please add resolution
> to
> > 6.0.15.
> >   
>  From what I understand
> System.currentTimeMillis() - fast
> System.currentTimeNanos() - not as fast, and we
> don't need that granularity
> > Regards,
> > -Tony
> >
> >
> >      
>
____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page. 
> > http://www.yahoo.com/r/hs
> >
> >
>
---------------------------------------------------------------------
> > To start a new topic, e-mail:
> users@tomcat.apache.org
> > To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail:
> users-help@tomcat.apache.org
> >
> >
> >
> >   
> 
> 
>
---------------------------------------------------------------------
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 



      ____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

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


Re: Tomcat performance questions

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
Tony Anecito wrote:
> Hi All,
>
> I am using Tomcat 6.0.14 with java 1.6.0_02 on Windows
> 2000 professional.
>
> I am wondering what is the best parser to use for this
> configuration? The one with java 1.6.0_02?
>   
for XML?
the Sun JRE implements the Xerces and Xalan parsers, so it would be the 
same as if you used those.
> Also, what is the best way to monitor performance? I
> am using the logs and they are only 15msec resolution.
> I am surprised the Tomcat design uses timers with that
> resolution even when microsecond resoltion is
> advertised. Why not use the nanosecond timers that
> were added with jvm 1.5+ ? Please add resolution to
> 6.0.15.
>   
 From what I understand
System.currentTimeMillis() - fast
System.currentTimeNanos() - not as fast, and we don't need that granularity
> Regards,
> -Tony
>
>
>       ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page. 
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


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