You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve Brunton <br...@dweeb.turner.com> on 2001/05/01 22:46:38 UTC

Tomcat Performance..

  Just curious if anyone out there has benchmarked all the different
versions of Tomcat that are available to find the one that performs the
best. I've just got a little servlet working that does some various
things and talks to Oracle using the JDBC Thin driver to build some
dynamic content. The servlet works fine and everything is groovy. 
  Running Tomcat 3.3M2 with Apache 1.3.19 using mod_jk.so and the apj13
setup on a HP LPR with 2 500 Mhz PIII's and Solaris 8 x86 with all the
latest and greatest patches on it (Tomcat/Apache/mod_jk.so built
natively on the box) I get around 4.93 requests per second with 10
concurrent connections making around 1000 requests. The apache processes
don't get all that busy and neither does the Java process, but the box
is sitting at 40% IOWait as it chugs along.
  Over on a Sun Ultra 60 (2x360 Mhz CPU's) running Solaris 2.6 with the
iPlanet 4.1SP6 webserver I can process about 34 requests per second with
the same servlet and request metrics. 
  Is the 3.3 path the wrong one to take? should I be working with the
3.2 stuff? 


-- 
Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
<*> Do Lipton employees take coffee breaks? <*>

Re: Tomcat providers

Posted by "Corey A. Johnson" <cj...@cniweb.net>.
<shameless plug>
The company i work for offers JSP/Servlet/EJB hosting... all accounts get
dedicated JVM and TOMCAT instance... we use Sun SPARC Servers.. and we offer
LDAP/MySQL/MSSQL7/JBoss access as well...

http://www.cniweb.net/
</shameless plug>

;-)

Sachin Phatak wrote:

> Hi! Cristoph
> You could check out www.podc.com
> thanks
> sachin
>
> ----- Original Message -----
> From: Christoph Rooms <ch...@pandora.be>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, May 10, 2001 2:22 AM
> Subject: Tomcat providers
>
> > Hi,
> >
> > I'm looking for a host firm that will host my site and my java servlet.
> > (tomcat ?)
> >
> > Do you guys have got any good references  ? I'm not a bussiness so I'm not
> > looking for an expensive solution :)))
> >
> > thanks ! Christoph
> >

--
Corey A. Johnson
Creative Network Innovations
http://www.cniweb.net/
1-800-CNi-5547 ** 1-321-259-1984



Re: Tomcat providers

Posted by Sachin Phatak <sa...@podc.com>.
Hi! Cristoph
You could check out www.podc.com
thanks
sachin

----- Original Message -----
From: Christoph Rooms <ch...@pandora.be>
To: <to...@jakarta.apache.org>
Sent: Thursday, May 10, 2001 2:22 AM
Subject: Tomcat providers


> Hi,
>
> I'm looking for a host firm that will host my site and my java servlet.
> (tomcat ?)
>
> Do you guys have got any good references  ? I'm not a bussiness so I'm not
> looking for an expensive solution :)))
>
> thanks ! Christoph
>


Tomcat providers

Posted by Christoph Rooms <ch...@pandora.be>.
Hi,

I'm looking for a host firm that will host my site and my java servlet.
(tomcat ?)

Do you guys have got any good references  ? I'm not a bussiness so I'm not
looking for an expensive solution :)))

thanks ! Christoph


Re: Tomcat Performance..

Posted by Steve Brunton <br...@dweeb.turner.com>.
Jeff Kilbride wrote:
> 
> No, I didn't synchronize either. That would defeat the purpose of my
> connection pool and *really* slow down performance.
> 

  Right, that's why I expected crappy performance from the servlet as a
whole, since I synchronized the method. What has me bothered is the 39
requests per second on iPlanet, 16 requests per second talking straight
to Tomcat 3.3 and 4 requests per second talking to Apache 1.3.19 w/
mod_jk.so in ajp13 mode talking to Tomcat 3.3.
  I could understand like a 30%->50% performance drop from
iPlanet->Apache, but from 39 RPS to 4 RPS seems a bit absurd.

> If you're synchronizing access to the method that does your insert/update,
> then that's your bottleneck. Do you really have to synchronize it? Can you
> rewrite the SQL to avoid the overhead of synchronizing in Java? Are you
> synchronizing the entire method or just the block of code that does the
> insert/update?
> 

  Well, let's just cut the whole insert out of the formula and state
that it's an update. It has to be synchronized since a request from a
luser comes in, we take that data get data out of the database, add them
together and update it back into the database. It's not a scientific
kind of thing nor are lives depending on it, but if it's not synchonized
and I push 1000 requests against it about 100 of them actually get
counted, while syncronized they all get counted. And actually in testing
against iPlanet itself the syncronized was just a smidge faster than
non-syncronized. We think it has something to do with Oracle's row
locking on updates.

-- 
Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
<*> Black holes are where God divided by zero. <*>

Re: Tomcat Performance..

Posted by Jeff Kilbride <je...@kilbride.com>.
No, I didn't synchronize either. That would defeat the purpose of my
connection pool and *really* slow down performance.

If you're synchronizing access to the method that does your insert/update,
then that's your bottleneck. Do you really have to synchronize it? Can you
rewrite the SQL to avoid the overhead of synchronizing in Java? Are you
synchronizing the entire method or just the block of code that does the
insert/update?

Thanks,
--jeff

----- Original Message -----
From: "Steve Brunton" <br...@dweeb.turner.com>
To: <to...@jakarta.apache.org>
Sent: Wednesday, May 09, 2001 9:17 AM
Subject: Re: Tomcat Performance..


> Jeff Kilbride wrote:
> >
> > I'm a little surprised by your performance numbers, actually. I wrote a
> > small servlet to test Apache + Tomcat + MySQL speed and tested it on an
> > intel celeron 433MHz box with a single IDE drive and 128MB of RAM --
pretty
> > much a piece of crap. I ran Tomcat 3.2.1, ajp13, Apache 1.3.19, the
> > IBMJava2-13 JVM, RedHat 6.2 with the 2.4.3 kernel -- with almost no
> > configuration tweaking (default server.xml, default JVM settings). The
> > servlet would take a GET request, insert the parameters into the
database,
> > and then redirect to another page on the same box. I was able to get 54
> > inserts per second into the database with 25 threads running, which
equates
> > to 108 requests with the redirect. I was running a connection pool of 20
> > connections to the database. The network was a 100bT LAN and I ran each
test
> > for 10 minutes -- multiple times with the same results.
> >
> > I tested mod_jk/ajp13 against mod_jserv/ajp12 and found mod_jk to be
almost
> > 60% faster -- plus it's performance was a lot smoother. I was using the
Web
> > Performance Trainer software from http://webperformanceinc.com/products/
> >
>
>   Did you synchronize either your doGet() or the method that did the
> insert/update into the DB? Maybe the problem does lie in Tomcat 3.3 and
> I should back out to 3.2.2. The problem dosen't seem to be Hardware or
> OS related since it's the same crappy performance on both an Ultra 60
> and a Intel box. I started off the testing with the request that I know
> should be the slowest out of all of them since it is a synchronized
> method for a Database insert/update. I'll drop the U60 back to Tomcat
> 3.2.2 and see if that gets any better numbers out of it.
>
>
> --
> Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
> Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
> CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
> <*> Money Isn't Everything, But it Sure Keeps the Kids In Touch <*>
>


Re: Tomcat Performance..

Posted by Steve Brunton <br...@dweeb.turner.com>.
Jeff Kilbride wrote:
> 
> I'm a little surprised by your performance numbers, actually. I wrote a
> small servlet to test Apache + Tomcat + MySQL speed and tested it on an
> intel celeron 433MHz box with a single IDE drive and 128MB of RAM -- pretty
> much a piece of crap. I ran Tomcat 3.2.1, ajp13, Apache 1.3.19, the
> IBMJava2-13 JVM, RedHat 6.2 with the 2.4.3 kernel -- with almost no
> configuration tweaking (default server.xml, default JVM settings). The
> servlet would take a GET request, insert the parameters into the database,
> and then redirect to another page on the same box. I was able to get 54
> inserts per second into the database with 25 threads running, which equates
> to 108 requests with the redirect. I was running a connection pool of 20
> connections to the database. The network was a 100bT LAN and I ran each test
> for 10 minutes -- multiple times with the same results.
> 
> I tested mod_jk/ajp13 against mod_jserv/ajp12 and found mod_jk to be almost
> 60% faster -- plus it's performance was a lot smoother. I was using the Web
> Performance Trainer software from http://webperformanceinc.com/products/
> 

  Did you synchronize either your doGet() or the method that did the
insert/update into the DB? Maybe the problem does lie in Tomcat 3.3 and
I should back out to 3.2.2. The problem dosen't seem to be Hardware or
OS related since it's the same crappy performance on both an Ultra 60
and a Intel box. I started off the testing with the request that I know
should be the slowest out of all of them since it is a synchronized
method for a Database insert/update. I'll drop the U60 back to Tomcat
3.2.2 and see if that gets any better numbers out of it.


-- 
Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
<*> Money Isn't Everything, But it Sure Keeps the Kids In Touch <*>

Re: Tomcat Performance..

Posted by Jeff Kilbride <je...@kilbride.com>.
I'm a little surprised by your performance numbers, actually. I wrote a
small servlet to test Apache + Tomcat + MySQL speed and tested it on an
intel celeron 433MHz box with a single IDE drive and 128MB of RAM -- pretty
much a piece of crap. I ran Tomcat 3.2.1, ajp13, Apache 1.3.19, the
IBMJava2-13 JVM, RedHat 6.2 with the 2.4.3 kernel -- with almost no
configuration tweaking (default server.xml, default JVM settings). The
servlet would take a GET request, insert the parameters into the database,
and then redirect to another page on the same box. I was able to get 54
inserts per second into the database with 25 threads running, which equates
to 108 requests with the redirect. I was running a connection pool of 20
connections to the database. The network was a 100bT LAN and I ran each test
for 10 minutes -- multiple times with the same results.

I tested mod_jk/ajp13 against mod_jserv/ajp12 and found mod_jk to be almost
60% faster -- plus it's performance was a lot smoother. I was using the Web
Performance Trainer software from http://webperformanceinc.com/products/

--jeff

----- Original Message -----
From: "Steve Brunton" <br...@dweeb.turner.com>
To: <to...@jakarta.apache.org>
Sent: Friday, May 04, 2001 11:30 AM
Subject: Re: Tomcat Performance..


> Craig O'Brien wrote:
> >
> > Hello,
> >
> > Those are similar numbers to what I have been getting on Intel platforms
> > with Tomcat3.2.1.  You can boost Tomcat to about 90 pages per second
using
> > ajp13, mod_jk, and reducing the log level to warn rather then info. (of
> > course your Servlet code makes a difference) There is actually a bug in
the
> > logging with Tomcat 3.2.1 -- info actually gives you debug log level.
> > According to GOMEZ the ajp13 connector is not fully optimized and mod_jk
is
> > still unfinished.  Apache's performance can be boosted by limiting the
> > modules that you use and reducing log levels as well.  Interestingly, I
was
> > testing a servlet which displayed date, session variables, and generated
a
> > random password and clocked in at about 88 pages per second with mod_jk.
> > When I direct connected to Tomcat I was able to get 463 pages per second
> > with no errors so there is allot of potential there. I was able to top
out
> > at 1107 pages per second on that servlet with Resin. Consider your
> > bandwidth, of course, 50-60 pages per second can easily overwhelm a T1
line.
> > Indeed with a standard 45k+ page you would be lucky to anywhere near 25.
> >
>
>   Ok, since some questioned my methodology before I've re-run the tests
> on the same box (a Sun Ultra 60 2x360 Mhz with Solaris 6 installed). The
> same servlet has been used for all this testing. Bandwidth isn't a
> problem in our case since I'm pretty sure the two OC-48's and seven
> OC-3's can handle pretty much whatever we've got coming in. All tests
> were run with 1000 requests and a concurrency of 10.
>
>   Apache 1.3.19/Tomcat 3.3M2 with mod_jk in ajp13 usage mode turned out
> around 5.37 requests per second with a very very very high IO wait. One
> question would be does the mod_jk module open adn close a connection to
> the Tomcat engine for every request? That would surely hurt performance.
>
>   Talking straight to Tomcat we get 16.11 requests per second. No IO
> Wait and it just does it's thing.
>
>   iPlanet 4.1SP6 will whip out about 38 requests per second.
>
>   The apache build is just a straight build with only the mod_so module
> installed along with the default settings. mod_jk was setup with 'warn'
> as the logging option even though a 'none' would be nifty.
>
>   So it sort of goes back to the original question of is 3.3M2 the way
> to go or the 3.2.x family or possibly the 4.x for the best performance?
> What about the Apache 2.x tree?
>
>
> --
> Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
> Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
> CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
> <*> If at first you don't succeed...blame someone else and seek
> counseling <*>
>


Re: Tomcat Performance..

Posted by Steve Brunton <br...@dweeb.turner.com>.
Craig O'Brien wrote:
> 
> Hello,
> 
> Those are similar numbers to what I have been getting on Intel platforms
> with Tomcat3.2.1.  You can boost Tomcat to about 90 pages per second using
> ajp13, mod_jk, and reducing the log level to warn rather then info. (of
> course your Servlet code makes a difference) There is actually a bug in the
> logging with Tomcat 3.2.1 -- info actually gives you debug log level.
> According to GOMEZ the ajp13 connector is not fully optimized and mod_jk is
> still unfinished.  Apache's performance can be boosted by limiting the
> modules that you use and reducing log levels as well.  Interestingly, I was
> testing a servlet which displayed date, session variables, and generated a
> random password and clocked in at about 88 pages per second with mod_jk.
> When I direct connected to Tomcat I was able to get 463 pages per second
> with no errors so there is allot of potential there. I was able to top out
> at 1107 pages per second on that servlet with Resin. Consider your
> bandwidth, of course, 50-60 pages per second can easily overwhelm a T1 line.
> Indeed with a standard 45k+ page you would be lucky to anywhere near 25.
> 

  Ok, since some questioned my methodology before I've re-run the tests
on the same box (a Sun Ultra 60 2x360 Mhz with Solaris 6 installed). The
same servlet has been used for all this testing. Bandwidth isn't a
problem in our case since I'm pretty sure the two OC-48's and seven
OC-3's can handle pretty much whatever we've got coming in. All tests
were run with 1000 requests and a concurrency of 10.

  Apache 1.3.19/Tomcat 3.3M2 with mod_jk in ajp13 usage mode turned out
around 5.37 requests per second with a very very very high IO wait. One
question would be does the mod_jk module open adn close a connection to
the Tomcat engine for every request? That would surely hurt performance.

  Talking straight to Tomcat we get 16.11 requests per second. No IO
Wait and it just does it's thing.

  iPlanet 4.1SP6 will whip out about 38 requests per second.

  The apache build is just a straight build with only the mod_so module
installed along with the default settings. mod_jk was setup with 'warn'
as the logging option even though a 'none' would be nifty. 

  So it sort of goes back to the original question of is 3.3M2 the way
to go or the 3.2.x family or possibly the 4.x for the best performance?
What about the Apache 2.x tree?


-- 
Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
<*> If at first you don't succeed...blame someone else and seek
counseling <*>

RE: Tomcat Performance..

Posted by Craig O'Brien <cr...@dynamic-apps.com>.
Hello,

Those are similar numbers to what I have been getting on Intel platforms
with Tomcat3.2.1.  You can boost Tomcat to about 90 pages per second using
ajp13, mod_jk, and reducing the log level to warn rather then info. (of
course your Servlet code makes a difference) There is actually a bug in the
logging with Tomcat 3.2.1 -- info actually gives you debug log level.
According to GOMEZ the ajp13 connector is not fully optimized and mod_jk is
still unfinished.  Apache's performance can be boosted by limiting the
modules that you use and reducing log levels as well.  Interestingly, I was
testing a servlet which displayed date, session variables, and generated a
random password and clocked in at about 88 pages per second with mod_jk.
When I direct connected to Tomcat I was able to get 463 pages per second
with no errors so there is allot of potential there. I was able to top out
at 1107 pages per second on that servlet with Resin. Consider your
bandwidth, of course, 50-60 pages per second can easily overwhelm a T1 line.
Indeed with a standard 45k+ page you would be lucky to anywhere near 25.

Regards,
Craig

-----Original Message-----
From: brunton@dweeb.turner.com [mailto:brunton@dweeb.turner.com]
Sent: Wednesday, May 02, 2001 8:50 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: Tomcat Performance..


Kief Morris wrote:
>
>
> It sounds like you tested Tomcat on an HP, and Tomcat on an x86 with
> Solaris 8, vs. iPlanet on an Ultra running Solaris 2.6. You are then
guessing
> that the difference in performance is entirely due to the servlet engine?
>
> Have you tried testing Tomcat vs. iPlanet on *identical* hardware/OS
> platforms?
>


  Well, alas I haven't been able to talk the iPlanet folks into building
iWS for me on Solaris x86 yet so I can't test it that way. In testing
just straight normal everyday static HTML serving between Apache and
iPlanet between the two platforms I get a more expected performance
difference. Where the iWS server can spit back something like 200
requests per second and the Apache server can spit back 170 requests per
second. That would be what I expect. I've got a couple of other projects
I've got to get done here today and then I was planning on building the
Apache/Tomcat setup over on the Ultra 60 to see if the performance
numbers are still skewed as much on the same platform.


--
Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
<*> There's too much blood in my alcohol system. <*>


Re: Tomcat Performance..

Posted by Steve Brunton <br...@dweeb.turner.com>.
Kief Morris wrote:
> 
> 
> It sounds like you tested Tomcat on an HP, and Tomcat on an x86 with
> Solaris 8, vs. iPlanet on an Ultra running Solaris 2.6. You are then guessing
> that the difference in performance is entirely due to the servlet engine?
> 
> Have you tried testing Tomcat vs. iPlanet on *identical* hardware/OS
> platforms?
> 


  Well, alas I haven't been able to talk the iPlanet folks into building
iWS for me on Solaris x86 yet so I can't test it that way. In testing
just straight normal everyday static HTML serving between Apache and
iPlanet between the two platforms I get a more expected performance
difference. Where the iWS server can spit back something like 200
requests per second and the Apache server can spit back 170 requests per
second. That would be what I expect. I've got a couple of other projects
I've got to get done here today and then I was planning on building the
Apache/Tomcat setup over on the Ultra 60 to see if the performance
numbers are still skewed as much on the same platform.


-- 
Steve Brunton   <br...@dweeb.turner.com>  Phone: 404-827-2756
Chief Engineer Enterprise Systems    One CNN Center, Atlanta GA
CNN Internet Technologies          ICBM: 84W 23' 45" 33N 45' 29"
<*> There's too much blood in my alcohol system. <*>

Re: Tomcat Performance..

Posted by Kief Morris <ki...@kief.com>.
Steve Brunton typed the following on 04:46 PM 5/1/2001 -0400
>  Running Tomcat 3.3M2 with Apache 1.3.19 using mod_jk.so and the apj13
>setup on a HP LPR with 2 500 Mhz PIII's and Solaris 8 x86 with all the
>latest and greatest patches on it (Tomcat/Apache/mod_jk.so built
>natively on the box) I get around 4.93 requests per second with 10
>concurrent connections making around 1000 requests. The apache processes
>don't get all that busy and neither does the Java process, but the box
>is sitting at 40% IOWait as it chugs along.
>  Over on a Sun Ultra 60 (2x360 Mhz CPU's) running Solaris 2.6 with the
>iPlanet 4.1SP6 webserver I can process about 34 requests per second with
>the same servlet and request metrics. 

>  Is the 3.3 path the wrong one to take? should I be working with the
>3.2 stuff? 

It sounds like you tested Tomcat on an HP, and Tomcat on an x86 with 
Solaris 8, vs. iPlanet on an Ultra running Solaris 2.6. You are then guessing
that the difference in performance is entirely due to the servlet engine?

Have you tried testing Tomcat vs. iPlanet on *identical* hardware/OS 
platforms?

Kief