You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2011/03/01 16:31:54 UTC

Re: IIS7/isapi/tomcat performance

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

Tony,

On 2/28/2011 4:21 PM, Tony Anecito wrote:
> I also use Native APR with Tomcat 7 which eliminates AJP and 
> supposedly is faster than Apache Web Server

It's probably the same as AWS, as the code is the same :)

> http://people.apache.org/~schultz/ApacheCon%20NA%202010/ApacheCon%20NA%202010%20Slides.pdf

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

iEYEARECAAYFAk1tEWoACgkQ9CaO5/Lv0PBaUgCff8BC8ctr6IRNz0822wepdyxN
47sAn15U0Sy3O9mUAk1roW2M8vAjV3Z2
=r51s
-----END PGP SIGNATURE-----

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


Re: IIS7/isapi/tomcat performance

Posted by Michael Ludwig <mi...@gmx.de>.
Christopher Schultz schrieb am 01.03.2011 um 16:56 (-0500):

> I find *NIX smaller, cleaner, simpler, more scriptable and
> remotely administratable (is that a word? maybe administerable?)
> than Windows.

The word is: administrable

http://en.wiktionary.org/wiki/-abilis
http://en.wiktionary.org/wiki/administrare

Cheers,

Michael

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


Re: IIS7/isapi/tomcat performance

Posted by Tony Anecito <ad...@yahoo.com>.
I do not know what the "My bad" limit per day is but I am sure you are fine. :]

-Tony



----- Original Message ----
From: David kerber <dc...@verizon.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wed, March 2, 2011 10:20:57 AM
Subject: Re: IIS7/isapi/tomcat performance

On 3/2/2011 12:03 PM, Tony Anecito wrote:
> As stated in my message I was using the -server option for the server jvm.
>
> -Tony
>

My bad; I missed that.


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


      

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


Re: IIS7/isapi/tomcat performance

Posted by David kerber <dc...@verizon.net>.
On 3/2/2011 12:03 PM, Tony Anecito wrote:
> As stated in my message I was using the -server option for the server jvm.
>
> -Tony
>

My bad; I missed that.


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


Re: IIS7/isapi/tomcat performance

Posted by Tony Anecito <ad...@yahoo.com>.
As stated in my message I was using the -server option for the server jvm.

-Tony



----- Original Message ----
From: David kerber <dc...@verizon.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Tue, March 1, 2011 2:23:45 PM
Subject: Re: IIS7/isapi/tomcat performance

On 3/1/2011 4:07 PM, Tony Anecito wrote:
> Thanks Chris I will take a look at it.
>
> I am just trying to figure out what is the fastest was to handle my app. I was
> shooting for less than 1msec at Tomcat which I not have done. Now I want to 
get
> to 100 microseconds. Years ago from an logical architecture standpoint It was:
> 1. Apache web server - JBoss, then
> 2. Apache - Tomcat - JBoss
> 3. APR/Tomcat - JBoss.
>
> Then I drilled down into and refactored some of my code then finally looked at
> different types of web services and how fast and maybe why they might be slow.
>
> I currently am using 200MB xmx, xms, -server, NUMA, and set my new generation 
>to
> be large since my objects are short lived. I do not remember my other 
settings.
> I am beginning to think simpler is better for settings since at 1msec or less
> any time spent by the processor might be wasted time.
>
> I am very curious how you got 50K requests per second. I can get 1K per second
> on my AMD 6 core system. What was your client setup? I ran my client on the 
>same
> server as my APR/Tomcat-JBoss and I am setting up the client on a laptop so I 
>am
> not sharing resources. For the client I am using ApacheHttp class running in
> Eclipse and launch each http request in a different thread. I ended
> up configuring Tomcat for 400 connections which made a big difference. I still
> have alot more testing/tuning to do and I hope to get to it over the next 
>couple
> of evenings.

Are you using the client or server jvm?  I found a HUGE performance 
improvement when I went to the server jvm.

D

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


      

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


Re: IIS7/isapi/tomcat performance

Posted by David kerber <dc...@verizon.net>.
On 3/1/2011 4:07 PM, Tony Anecito wrote:
> Thanks Chris I will take a look at it.
>
> I am just trying to figure out what is the fastest was to handle my app. I was
> shooting for less than 1msec at Tomcat which I not have done. Now I want to get
> to 100 microseconds. Years ago from an logical architecture standpoint It was:
> 1. Apache web server - JBoss, then
> 2. Apache - Tomcat - JBoss
> 3. APR/Tomcat - JBoss.
>
> Then I drilled down into and refactored some of my code then finally looked at
> different types of web services and how fast and maybe why they might be slow.
>
> I currently am using 200MB xmx, xms, -server, NUMA, and set my new generation to
> be large since my objects are short lived. I do not remember my other settings.
> I am beginning to think simpler is better for settings since at 1msec or less
> any time spent by the processor might be wasted time.
>
> I am very curious how you got 50K requests per second. I can get 1K per second
> on my AMD 6 core system. What was your client setup? I ran my client on the same
> server as my APR/Tomcat-JBoss and I am setting up the client on a laptop so I am
> not sharing resources. For the client I am using ApacheHttp class running in
> Eclipse and launch each http request in a different thread. I ended
> up configuring Tomcat for 400 connections which made a big difference. I still
> have alot more testing/tuning to do and I hope to get to it over the next couple
> of evenings.

Are you using the client or server jvm?  I found a HUGE performance 
improvement when I went to the server jvm.

D

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


Re: IIS7/isapi/tomcat performance

Posted by Tony Anecito <ad...@yahoo.com>.
There is no code. All I did was create a servlet with a doGet method that had 
nothing in it.

I did notice alot of Tomcat code being called. I have not supplied profiling 
until I get the separate client machine setup. That will be sometime over the 
next few evenings.

-Tony



----- Original Message ----
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Tue, March 1, 2011 2:45:39 PM
Subject: Re: IIS7/isapi/tomcat performance

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

Tony,

On 3/1/2011 4:33 PM, Tony Anecito wrote:
> I used Tomcat separately because JBoss was always somewhat behind the current 
> production version of Tomcat. Eventually I will remove JBoss and use JDBC from 

> Tomcat to my database to reduce memory footprint and improve performance. I am 

> only using EJB's in JBoss right now.

You could look at OpenEJB and run your EJBs directly from Tomcat, too.

> Best practice regarding memory settings is set the min.max to be the same so 
>the 
>
> CPU is not busy allocating memory.

No, that's so the memory manager isn't wasting time re-sizing the heap.

> I know each jvm release gets better so less tuning is needed as what
> I think you are trying to say.

Generally, yes.

> I went up to 1,000 client threads before I stopped.

If you have 1000 client threads and (therefore) 1000 server threads all
operating one the same 6-core machine, you are probably pegging the CPU
so badly that you are ruining your own test.

> Since I met my first goal I like to get 10X better on the next one if possible 

> and from what you told me I might be able to make it. I can get close if I went 
>
> to a i7 980 or Sandy Bridge system instead of the slower AMD processor.

Switching processors is cheating :)

> To me that is cheating since I believe through tuning and code
> changes one should be able to get there.

At some point, work must get done. You can't simply configure-away the
need to allocate memory, copy buffers, parse the request, etc.

There is very little Tomcat configuration that can be done to improve
your observed performance: Tomcat has a great default configuration.
Actually, most of the settings that could affect performance usually
/degrade/ performance if changed from the default. You can also tweak
the GC settings like sizing various pools and stuff, but that won't
change the amount of time it takes to make a single request (or really
even in aggregate, unless you are creating hundreds of thousands of
temporary objects during a single request).

What you really need to do is profile your code and figure out what
/you/ are doing that's taking so long. :)

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

iEYEARECAAYFAk1taQMACgkQ9CaO5/Lv0PBNFgCcDPbq2vLz2Ef7xxt1eB0itgFX
OPYAniSvf0j00DjksQKiSpSIpICf/RwJ
=nDqy
-----END PGP SIGNATURE-----

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


      

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


Re: IIS7/isapi/tomcat performance

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

Tony,

On 3/1/2011 4:33 PM, Tony Anecito wrote:
> I used Tomcat separately because JBoss was always somewhat behind the current 
> production version of Tomcat. Eventually I will remove JBoss and use JDBC from 
> Tomcat to my database to reduce memory footprint and improve performance. I am 
> only using EJB's in JBoss right now.

You could look at OpenEJB and run your EJBs directly from Tomcat, too.

> Best practice regarding memory settings is set the min.max to be the same so the 
> CPU is not busy allocating memory.

No, that's so the memory manager isn't wasting time re-sizing the heap.

> I know each jvm release gets better so less tuning is needed as what
> I think you are trying to say.

Generally, yes.

> I went up to 1,000 client threads before I stopped.

If you have 1000 client threads and (therefore) 1000 server threads all
operating one the same 6-core machine, you are probably pegging the CPU
so badly that you are ruining your own test.

> Since I met my first goal I like to get 10X better on the next one if possible 
> and from what you told me I might be able to make it. I can get close if I went 
> to a i7 980 or Sandy Bridge system instead of the slower AMD processor.

Switching processors is cheating :)

> To me that is cheating since I believe through tuning and code
> changes one should be able to get there.

At some point, work must get done. You can't simply configure-away the
need to allocate memory, copy buffers, parse the request, etc.

There is very little Tomcat configuration that can be done to improve
your observed performance: Tomcat has a great default configuration.
Actually, most of the settings that could affect performance usually
/degrade/ performance if changed from the default. You can also tweak
the GC settings like sizing various pools and stuff, but that won't
change the amount of time it takes to make a single request (or really
even in aggregate, unless you are creating hundreds of thousands of
temporary objects during a single request).

What you really need to do is profile your code and figure out what
/you/ are doing that's taking so long. :)

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

iEYEARECAAYFAk1taQMACgkQ9CaO5/Lv0PBNFgCcDPbq2vLz2Ef7xxt1eB0itgFX
OPYAniSvf0j00DjksQKiSpSIpICf/RwJ
=nDqy
-----END PGP SIGNATURE-----

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


Re: IIS7/isapi/tomcat performance

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

Bruce,

On 3/1/2011 4:42 PM, Bruce Pease wrote:
> I'm just curious if anyone is using a 64 bit version of Linux, and has seen
> performance degradation.  We are looking to move off the Windows platform
> eventually anyway.

I'm not using 64-bit, but I am on Linux (happens to be Debian).

As of today, our uptime is 700 days for the OS on one production
machine, our database has been up since March 2010, and our webapp has
only been running a couple of days because we just had a production
release. Before that, it had been running for nearly a year with zero
downtime.

I know Microsoft Windows admins who schedule nightly reboots because
otherwise, their stuff doesn't work properly. Now, that was back in the
Windows 2003 days, so things have have improved since then.

I would highly recommend switching to *NIX to anyone considering doing
it. I find *NIX smaller, cleaner, simpler, more scriptable and remotely
administratable (is that a word? maybe administerable?) than Windows.

I hear that Microsoft SQL Server is a really great RDBMS. Too bad
they'll never port it to *NIX :)

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

iEYEARECAAYFAk1ta3oACgkQ9CaO5/Lv0PCaUgCfRtK8WI5iGbKRJkN69OcVNFIH
GO8Anj1ZOH7SrQ7zdRQFet+uUvJf5Cnj
=3zbM
-----END PGP SIGNATURE-----

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


RE: IIS7/isapi/tomcat performance

Posted by Bruce Pease <bp...@wth.com>.
I'm just curious if anyone is using a 64 bit version of Linux, and has seen
performance degradation.  We are looking to move off the Windows platform
eventually anyway.

-----Original Message-----
From: Tony Anecito [mailto:adanecito@yahoo.com] 
Sent: Tuesday, March 01, 2011 4:34 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

Hi Chris,

I used Tomcat separately because JBoss was always somewhat behind the current

production version of Tomcat. Eventually I will remove JBoss and use JDBC
from 
Tomcat to my database to reduce memory footprint and improve performance. I
am 
only using EJB's in JBoss right now.

Best practice regarding memory settings is set the min.max to be the same so
the 
CPU is not busy allocating memory. There are other settings one can use just 
trial and error or keep testing till you get the best configuration for your 
app. I know each jvm release gets better so less tuning is needed as what I 
think you are trying to say.

I went up to 1,000 client threads before I stopped.

Since I met my first goal I like to get 10X better on the next one if
possible 
and from what you told me I might be able to make it. I can get close if I
went 
to a i7 980 or Sandy Bridge system instead of the slower AMD processor. To me

that is cheating since I believe through tuning and code changes one should
be 
able to get there.

I will look for the pdf again if it is the one I am thinking of for
ApacheHttp 
commons testing then I am on the same track regarding setup and usage of the 
client program.

Regards,
-Tony




----- Original Message ----
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Tue, March 1, 2011 2:17:46 PM
Subject: Re: IIS7/isapi/tomcat performance

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

Tony,

Good thing these are marked as [OT]... we have totally hijacked Bruce's
thread. Maybe we should start another.

On 3/1/2011 4:07 PM, Tony Anecito wrote:
> I am just trying to figure out what is the fastest was to handle my app. I
was 

> shooting for less than 1msec at Tomcat which I not have done. Now I want to
get 
>
> to 100 microseconds. Years ago from an logical architecture standpoint It
was:
> 1. Apache web server - JBoss, then 
> 2. Apache - Tomcat - JBoss
> 3. APR/Tomcat - JBoss. 

Do you mean you are using Tomcat out in front of JBoss? Why not just use
JBoss directly? That'll probably buy you more than any other
configuration change.

> I currently am using 200MB xmx, xms, -server, NUMA, and set my new
generation 
>to 
>
> be large since my objects are short lived. I do not remember my other
settings. 
>
> I am beginning to think simpler is better for settings since at 1msec or
less 
> any time spent by the processor might be wasted time.

Generally speaking, you should let the GC configure itself unless you
really know what you are doing or have to work around some specific problem.

> I am very curious how you got 50K requests per second.

You'll have to be more specific. Do you mean in my performance tests?
Which one? Did you read all of the setup info in the earlier slides?

> I can get 1K per second on my AMD 6 core system. What was your client
setup?

It's all in the PDF.

> I ran my client on the same
> server as my APR/Tomcat-JBoss and I am setting up the client on a laptop so
I 
>am 
>
> not sharing resources. For the client I am using ApacheHttp class running
in 
> Eclipse and launch each http request in a different thread.

How many threads are you talking about using, here?

> I ended 
> up configuring Tomcat for 400 connections which made a big difference. I
still 

> have alot more testing/tuning to do and I hope to get to it over the next 
>couple 
>
> of evenings.

100 microseconds seems like an arbitrary target. Where did it come from?

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

iEYEARECAAYFAk1tYnoACgkQ9CaO5/Lv0PDVpwCgvlpUZcm4uZd/do+EeYuu/dte
o2QAn3XHEdvKFVwFUR2VdLDnBghXlP03
=ov34
-----END PGP SIGNATURE-----

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


      

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


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


Re: IIS7/isapi/tomcat performance

Posted by Tony Anecito <ad...@yahoo.com>.
Hi Chris,

I used Tomcat separately because JBoss was always somewhat behind the current 
production version of Tomcat. Eventually I will remove JBoss and use JDBC from 
Tomcat to my database to reduce memory footprint and improve performance. I am 
only using EJB's in JBoss right now.

Best practice regarding memory settings is set the min.max to be the same so the 
CPU is not busy allocating memory. There are other settings one can use just 
trial and error or keep testing till you get the best configuration for your 
app. I know each jvm release gets better so less tuning is needed as what I 
think you are trying to say.

I went up to 1,000 client threads before I stopped.

Since I met my first goal I like to get 10X better on the next one if possible 
and from what you told me I might be able to make it. I can get close if I went 
to a i7 980 or Sandy Bridge system instead of the slower AMD processor. To me 
that is cheating since I believe through tuning and code changes one should be 
able to get there.

I will look for the pdf again if it is the one I am thinking of for ApacheHttp 
commons testing then I am on the same track regarding setup and usage of the 
client program.

Regards,
-Tony




----- Original Message ----
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Tue, March 1, 2011 2:17:46 PM
Subject: Re: IIS7/isapi/tomcat performance

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

Tony,

Good thing these are marked as [OT]... we have totally hijacked Bruce's
thread. Maybe we should start another.

On 3/1/2011 4:07 PM, Tony Anecito wrote:
> I am just trying to figure out what is the fastest was to handle my app. I was 

> shooting for less than 1msec at Tomcat which I not have done. Now I want to get 
>
> to 100 microseconds. Years ago from an logical architecture standpoint It was:
> 1. Apache web server - JBoss, then 
> 2. Apache - Tomcat - JBoss
> 3. APR/Tomcat - JBoss. 

Do you mean you are using Tomcat out in front of JBoss? Why not just use
JBoss directly? That'll probably buy you more than any other
configuration change.

> I currently am using 200MB xmx, xms, -server, NUMA, and set my new generation 
>to 
>
> be large since my objects are short lived. I do not remember my other settings. 
>
> I am beginning to think simpler is better for settings since at 1msec or less 
> any time spent by the processor might be wasted time.

Generally speaking, you should let the GC configure itself unless you
really know what you are doing or have to work around some specific problem.

> I am very curious how you got 50K requests per second.

You'll have to be more specific. Do you mean in my performance tests?
Which one? Did you read all of the setup info in the earlier slides?

> I can get 1K per second on my AMD 6 core system. What was your client setup?

It's all in the PDF.

> I ran my client on the same
> server as my APR/Tomcat-JBoss and I am setting up the client on a laptop so I 
>am 
>
> not sharing resources. For the client I am using ApacheHttp class running in 
> Eclipse and launch each http request in a different thread.

How many threads are you talking about using, here?

> I ended 
> up configuring Tomcat for 400 connections which made a big difference. I still 

> have alot more testing/tuning to do and I hope to get to it over the next 
>couple 
>
> of evenings.

100 microseconds seems like an arbitrary target. Where did it come from?

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

iEYEARECAAYFAk1tYnoACgkQ9CaO5/Lv0PDVpwCgvlpUZcm4uZd/do+EeYuu/dte
o2QAn3XHEdvKFVwFUR2VdLDnBghXlP03
=ov34
-----END PGP SIGNATURE-----

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


      

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


Re: IIS7/isapi/tomcat performance

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

Tony,

Good thing these are marked as [OT]... we have totally hijacked Bruce's
thread. Maybe we should start another.

On 3/1/2011 4:07 PM, Tony Anecito wrote:
> I am just trying to figure out what is the fastest was to handle my app. I was 
> shooting for less than 1msec at Tomcat which I not have done. Now I want to get 
> to 100 microseconds. Years ago from an logical architecture standpoint It was:
> 1. Apache web server - JBoss, then 
> 2. Apache - Tomcat - JBoss
> 3. APR/Tomcat - JBoss. 

Do you mean you are using Tomcat out in front of JBoss? Why not just use
JBoss directly? That'll probably buy you more than any other
configuration change.

> I currently am using 200MB xmx, xms, -server, NUMA, and set my new generation to 
> be large since my objects are short lived. I do not remember my other settings. 
> I am beginning to think simpler is better for settings since at 1msec or less 
> any time spent by the processor might be wasted time.

Generally speaking, you should let the GC configure itself unless you
really know what you are doing or have to work around some specific problem.

> I am very curious how you got 50K requests per second.

You'll have to be more specific. Do you mean in my performance tests?
Which one? Did you read all of the setup info in the earlier slides?

> I can get 1K per second on my AMD 6 core system. What was your client setup?

It's all in the PDF.

> I ran my client on the same
> server as my APR/Tomcat-JBoss and I am setting up the client on a laptop so I am 
> not sharing resources. For the client I am using ApacheHttp class running in 
> Eclipse and launch each http request in a different thread.

How many threads are you talking about using, here?

> I ended 
> up configuring Tomcat for 400 connections which made a big difference. I still 
> have alot more testing/tuning to do and I hope to get to it over the next couple 
> of evenings.

100 microseconds seems like an arbitrary target. Where did it come from?

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

iEYEARECAAYFAk1tYnoACgkQ9CaO5/Lv0PDVpwCgvlpUZcm4uZd/do+EeYuu/dte
o2QAn3XHEdvKFVwFUR2VdLDnBghXlP03
=ov34
-----END PGP SIGNATURE-----

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


Re: IIS7/isapi/tomcat performance

Posted by Tony Anecito <ad...@yahoo.com>.
Thanks Chris I will take a look at it.

I am just trying to figure out what is the fastest was to handle my app. I was 
shooting for less than 1msec at Tomcat which I not have done. Now I want to get 
to 100 microseconds. Years ago from an logical architecture standpoint It was:
1. Apache web server - JBoss, then 
2. Apache - Tomcat - JBoss
3. APR/Tomcat - JBoss. 

Then I drilled down into and refactored some of my code then finally looked at 
different types of web services and how fast and maybe why they might be slow.

I currently am using 200MB xmx, xms, -server, NUMA, and set my new generation to 
be large since my objects are short lived. I do not remember my other settings. 
I am beginning to think simpler is better for settings since at 1msec or less 
any time spent by the processor might be wasted time.

I am very curious how you got 50K requests per second. I can get 1K per second 
on my AMD 6 core system. What was your client setup? I ran my client on the same 
server as my APR/Tomcat-JBoss and I am setting up the client on a laptop so I am 
not sharing resources. For the client I am using ApacheHttp class running in 
Eclipse and launch each http request in a different thread. I ended 
up configuring Tomcat for 400 connections which made a big difference. I still 
have alot more testing/tuning to do and I hope to get to it over the next couple 
of evenings.

-Tony



----- Original Message ----
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Tue, March 1, 2011 1:42:37 PM
Subject: Re: IIS7/isapi/tomcat performance

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

Tony,

On 3/1/2011 2:49 PM, Tony Anecito wrote:
> I understand it is from the core AWS but the important thing for me was to 
> eliminate AJP because in a AWS standalone I had used to communicate AJP.
> When I enabled ARP I did not have to do anything with AJP.
> 
> So does ARP communicate with the servlet conatiner in a more efficiant manner?

(Presuming s/ARP/APR/g)

APR is just a connector strategy, like the BIO or NIO connectors. There
are APR connectors for both HTTP and AJP.

If you're saying that you switched from BIO/AJP to APR/HTTP, I'm not
surprised you experienced a performance improvement: you're eliminated
the web server altogether.

If instead you are still using a web server out front and using HTTP
instead of AJP to communicate with the back-end, I'd be interested in
your configuration, environment, and observed performance gain.
Generally speaking, use of AJP is slightly faster than proxied HTTP but
there are certainly some trade-offs (like lack of encrypted
communication support for AJP).

APR handles connections differently than the Default BIO connector. See
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html#Connector%20Comparison
for notes about the relative capabilities of the connectors (for HTTP).
There is
no NIO connector for AJP, but I would imagine that the comparison between
the other two HTTP connectors is applicable to the AJP connectors as well.

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

iEYEARECAAYFAk1tWj0ACgkQ9CaO5/Lv0PBNLwCgmpEjzeX8lxu2+ac7yxP5BV95
9eYAn0SkImgJxKoqg15rqgk0pCBs2e6L
=y6g9
-----END PGP SIGNATURE-----

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


      

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


Re: IIS7/isapi/tomcat performance

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

Tony,

On 3/1/2011 2:49 PM, Tony Anecito wrote:
> I understand it is from the core AWS but the important thing for me was to 
> eliminate AJP because in a AWS standalone I had used to communicate AJP.
> When I enabled ARP I did not have to do anything with AJP.
> 
> So does ARP communicate with the servlet conatiner in a more efficiant manner?

(Presuming s/ARP/APR/g)

APR is just a connector strategy, like the BIO or NIO connectors. There
are APR connectors for both HTTP and AJP.

If you're saying that you switched from BIO/AJP to APR/HTTP, I'm not
surprised you experienced a performance improvement: you're eliminated
the web server altogether.

If instead you are still using a web server out front and using HTTP
instead of AJP to communicate with the back-end, I'd be interested in
your configuration, environment, and observed performance gain.
Generally speaking, use of AJP is slightly faster than proxied HTTP but
there are certainly some trade-offs (like lack of encrypted
communication support for AJP).

APR handles connections differently than the Default BIO connector. See
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html#Connector%20Comparison
for notes about the relative capabilities of the connectors (for HTTP).
There is
no NIO connector for AJP, but I would imagine that the comparison between
the other two HTTP connectors is applicable to the AJP connectors as well.

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

iEYEARECAAYFAk1tWj0ACgkQ9CaO5/Lv0PBNLwCgmpEjzeX8lxu2+ac7yxP5BV95
9eYAn0SkImgJxKoqg15rqgk0pCBs2e6L
=y6g9
-----END PGP SIGNATURE-----

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


Re: IIS7/isapi/tomcat performance

Posted by Tony Anecito <ad...@yahoo.com>.
Hi Chris,

I understand it is from the core AWS but the important thing for me was to 
eliminate AJP because in a AWS standalone I had used to communicate AJP.
When I enabled ARP I did not have to do anything with AJP.

So does ARP communicate with the servlet conatiner in a more efficiant manner?

Thanks,
-Tony



----- Original Message ----
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Tue, March 1, 2011 8:31:54 AM
Subject: Re: IIS7/isapi/tomcat performance

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

Tony,

On 2/28/2011 4:21 PM, Tony Anecito wrote:
> I also use Native APR with Tomcat 7 which eliminates AJP and 
> supposedly is faster than Apache Web Server

It's probably the same as AWS, as the code is the same :)

>http://people.apache.org/~schultz/ApacheCon%20NA%202010/ApacheCon%20NA%202010%20Slides.pdf
>f

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

iEYEARECAAYFAk1tEWoACgkQ9CaO5/Lv0PBaUgCff8BC8ctr6IRNz0822wepdyxN
47sAn15U0Sy3O9mUAk1roW2M8vAjV3Z2
=r51s
-----END PGP SIGNATURE-----

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


      

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