You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Laurent Perez <ha...@gmail.com> on 2005/12/26 22:42:59 UTC

mod_jk versus mod_proxy under load ?

Hello

One of our production servers recently started to suffer from very
heavy performance troubles under load : the current setup is apache2 +
mod_jk/ajp13 + tomcat5.0.25, jdk 1.4.2, 1GB (Xmx/Xms to 640MB) on a
dual 2.4Ghz Xeon server. The maximum amount of requests/sec reached is
around 15req/sec under production load, and I'd like to hit something
between 30 and 40req/sec, unfortunately, mod_cache is not really an
option for our current hosting company.

Are there available benchmarks comparing mod_jk and mod_proxy
available, or resulting from anyone's personal experience ? I googled
quite a bit and results are just random, someone will tell jk is
faster, someone else will tell proxy is faster, so I'm looking for
some advice on this TC list.

Thanks for any input

Laurent

--
<a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com
- Mobile world, technology and more</a>

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


Re: mod_jk versus mod_proxy under load ?

Posted by Pulkit Singhal <pu...@gmail.com>.
I hate to take you off topic here but just in case you migth want to check
this post out as well:

*Re: About possible memory leak in Tomcat 5.x*

Cheers and Gluck!

On 12/26/05, Laurent Perez <ha...@gmail.com> wrote:
>
> Hello
>
> One of our production servers recently started to suffer from very
> heavy performance troubles under load : the current setup is apache2 +
> mod_jk/ajp13 + tomcat5.0.25, jdk 1.4.2, 1GB (Xmx/Xms to 640MB) on a
> dual 2.4Ghz Xeon server. The maximum amount of requests/sec reached is
> around 15req/sec under production load, and I'd like to hit something
> between 30 and 40req/sec, unfortunately, mod_cache is not really an
> option for our current hosting company.
>
> Are there available benchmarks comparing mod_jk and mod_proxy
> available, or resulting from anyone's personal experience ? I googled
> quite a bit and results are just random, someone will tell jk is
> faster, someone else will tell proxy is faster, so I'm looking for
> some advice on this TC list.
>
> Thanks for any input
>
> Laurent
>
> --
> <a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com
> - Mobile world, technology and more</a>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: mod_jk versus mod_proxy under load ?

Posted by Wade Chandler <hw...@yahoo.com>.
> > -----Original Message-----
> > From: news [mailto:news@sea.gmane.org] On Behalf
> Of Bill Barker
> > Sent: Thursday, December 29, 2005 2:09 AM
> > To: users@tomcat.apache.org
> > Subject: Re: mod_jk versus mod_proxy under load ?
> > 
> > One of our production servers recently started to
> suffer from very
> > heavy performance troubles under load : the
> current setup is apache2 +
> > mod_jk/ajp13 + tomcat5.0.25, jdk 1.4.2, 1GB
> (Xmx/Xms to 640MB) 
This will not limit the entire memory used by the
process.  Your Perm space is not limited by mx what so
ever.  Search for 
":Perm" +java
on google.  You may already know this.

>on a
> > dual 2.4Ghz Xeon server. The maximum amount of
> requests/sec reached is
> > around 15req/sec under production load, and I'd
> like to hit something
How many threads are allowed?  What are you doing
inside of your web pages? What technologies are you
using?  Have you profiled your application?  Where are
your bottleknecks?
> > between 30 and 40req/sec, unfortunately, mod_cache
> is not really an
> > option for our current hosting company.

Then with mod_proxy:
Proxy works good for different things.  You can round
robin or you can defer certain client requests to this
or that server.  We did this thing one time (no I
didn't say at band camp) where we were able to push
www.whatever.com/client1 */client2 */client3 to one
server and */client4 */client5 and */client6 to this
other server.  That worked well at limiting traffic on
the individual servers, but the scheme you go with
depends on customer usage.  The good part is the
request to the user looks the same and goes to a
single domain where as you use apache to split the
requests off to other servers.  I setup a separate
Apache all together for the mod_proxy machine, so it
wouldn't get bogged down and be a bottle kneck trying
to do two things.  Apache won't even try to process
the request past where it is needing to be relayed
depending on your processing rules in your conf file,
so you can really move the load around with mod_proxy.
 I think for sessions and stuff to work right if you
round robin you'll have to use clustering in tomcat or
use some type of a database session store (depends
then on will this become a bottle kneck).  If you push
this or that client here or there...depending on what
you're doing clustering won't matter because the same
users will be hitting the same server in the end.

In either case you really can't use a mod_jk vs.
mod_proxy mentality.  They both will be working
together.  I may have missed something in the question
though.

Wade

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


RE: mod_jk versus mod_proxy under load ?

Posted by George Sexton <gs...@mhsoftware.com>.
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Barker
> Sent: Thursday, December 29, 2005 2:09 AM
> To: users@tomcat.apache.org
> Subject: Re: mod_jk versus mod_proxy under load ?
> 
> One of our production servers recently started to suffer from very
> heavy performance troubles under load : the current setup is apache2 +
> mod_jk/ajp13 + tomcat5.0.25, jdk 1.4.2, 1GB (Xmx/Xms to 640MB) on a
> dual 2.4Ghz Xeon server. The maximum amount of requests/sec reached is
> around 15req/sec under production load, and I'd like to hit something
> between 30 and 40req/sec, unfortunately, mod_cache is not really an
> option for our current hosting company.
> 

You have an application problem, not a problem with Tomcat. I hit 23
requests per second on a uni-processor P4 3.0. Incidentally, if you look at
my results you'll see that the average time for pages involving DB Access is
350ms, while the average time for pages not involving DB Access is 81ms.
Here are some performance testing numbers for my app. 

http://www.mhsoftware.com/caldemo/manual/en/pageFinder.html?page=622.htm

Note that my app is handcoded servlets, and doesn't involve JSP or tag
libraries. 

You might want to upgrade to the latest JDKs. In my testing, going to the
JDK 1.5 yielded something like a 25% increase in performance.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  


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


RE: mod_jk versus mod_proxy under load ?

Posted by Daniel Blumenthal <da...@wordchamp.com>.
 

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Bill Barker
> Sent: Thursday, December 29, 2005 4:09 AM
> To: users@tomcat.apache.org
> Subject: Re: mod_jk versus mod_proxy under load ?
> 
> mod_proxy_http is almost always slower than a properly 
> configured mod_jk (due to the lack of persistant 
> connections).  The work is to get a 'properly configured mod_jk' ;-).
> 
> Personally, I like mod_proxy_ajp, just for the integrated 
> configuration options.  The speed should be comperable to 
> mod_jk, but I confess that I haven't actually run benchmarks on it.
> 
> As always, the only benchmark that counts it the one that you 
> run :).  This sort of thing depends on what your app really 
> does, as well as the static/dynamic content ratio.  And, 
> except in very few cases, you will get the best speed with a 
> Tomcat stand-alone.

A while back when I first got my configuration started I was advised to use
Tomcat (through mod_jk2) for the servlet and Apache for serving static files
- it would be faster.  Is this still the case?  Would it be faster to just
get rid of Apache and mod_jk2, and have Tomcat serve everything?  What does
everyone think?

Best,
Daniel



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


Re: mod_jk versus mod_proxy under load ?

Posted by Bill Barker <wb...@wilshire.com>.
mod_proxy_http is almost always slower than a properly configured mod_jk 
(due to the lack of persistant connections).  The work is to get a 'properly 
configured mod_jk' ;-).

Personally, I like mod_proxy_ajp, just for the integrated configuration 
options.  The speed should be comperable to mod_jk, but I confess that I 
haven't actually run benchmarks on it.

As always, the only benchmark that counts it the one that you run :).  This 
sort of thing depends on what your app really does, as well as the 
static/dynamic content ratio.  And, except in very few cases, you will get 
the best speed with a Tomcat stand-alone.

"Laurent Perez" <ha...@gmail.com> wrote in message 
news:501089280512261342s917f10fv@mail.gmail.com...
Hello

One of our production servers recently started to suffer from very
heavy performance troubles under load : the current setup is apache2 +
mod_jk/ajp13 + tomcat5.0.25, jdk 1.4.2, 1GB (Xmx/Xms to 640MB) on a
dual 2.4Ghz Xeon server. The maximum amount of requests/sec reached is
around 15req/sec under production load, and I'd like to hit something
between 30 and 40req/sec, unfortunately, mod_cache is not really an
option for our current hosting company.

Are there available benchmarks comparing mod_jk and mod_proxy
available, or resulting from anyone's personal experience ? I googled
quite a bit and results are just random, someone will tell jk is
faster, someone else will tell proxy is faster, so I'm looking for
some advice on this TC list.

Thanks for any input

Laurent

--
<a href="http://in-pocket.blogspot.com">http://in-pocket.blogspot.com
- Mobile world, technology and more</a> 




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