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

Wicket,

wicket0123 wrote:
| If the container adds a lot of overhead, we may want to
| switch to other containers.

The only container I know that people claim to have less overhead is
Jetty. You will have the same problem instrumenting /that/ as well.

| JMeter reports that for 500 concurrent users making request to our
| application, the average response time was 1 second.  That already
broke our
| SLA which is 15 milliseconds.

If I ping www.google.com from my home computer, I get a 14.593ms average
roundtrip time. That's for the first 64 bytes of data to merely be
echoed back. If you do any processing beyond that, you are certainly not
going to be able to meet your SLA. You simply cannot avoid the network lag.

| My questions that needs to be answered:
|
| 1) out of that 1 second, how much was due to network?

If you do localhost testing, you could estimate that.

| 2) out of that 1 second, how much was spend running our application
code?  I
| got this, we have internal metrics

...and that should include DB access, too, right?

| 3) out of that 1 second, how much was spend running tomcat code?

#3 = #2 - #1

Another option is to write a filter that simply does not pass the
request on to the rest of the filter chain. That will short-circuit your
own code so that it does not execute at all. The resulting measured time
is 99.9% Tomcat.

| this maybe a bit off track to the initial question, but those are the
things
| I"m trying to answer.  I've been looking at tools like "Manage Engine"
which
| shows you average response time which they claim is time spend in tomcat.
| However, they only show down to the millisecond level.

So, run a lot of them and divide by the time. Or, hack their code to
call System.nanoTime instead of System.currentTimeMillis.

| And, if they're able
| to show that, it means that they're calling some tomcat APIs.  I want to
| know which APIs, so that I can write my own program to query them.

I don't believe Tomcat keeps its own timing metrics, so there wouldn't
be any API to fetch them. Lambda Probe does some metering and it's open
source, so you could run Lambda Probe to see if it reports the metrics
you want, and then snoop the code to figure out how it's doing it.

- -chris

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

iEYEARECAAYFAkfs/DgACgkQ9CaO5/Lv0PDpcACgtqcQ+rTCUYzalDOVdK3XdeoJ
4wMAnjGwoSX2+SyhZhyh775MnSHe2bg0
=ZDwX
-----END PGP SIGNATURE-----

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

Reply via email to