You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marco Spinetti <m....@pisa.iol.it> on 2001/05/22 09:22:16 UTC

R: C1 performance (Paul)

Hi Paul,
I must create, to send my application in production, a well balanced and
resistant system.(load balacing problem). I am much interested in your
configuration, which seems excellent to me. The problem is that I do not
know how to create it: could you tell me how you have done?
Have you used Ajpv13?
How have you set up the Workers properties?
Thanx
Regards
Marco

----- Original Message -----
From: Paul Nock <pn...@medicineplanet.com>
To: <co...@xml.apache.org>
Sent: Monday, May 21, 2001 10:00 PM
Subject: RE: C1 performance


> -----Original Message-----
> From: Antonio Parolini [mailto:tony@employer.com.br]
> Sent: Monday, May 21, 2001 11:59 AM
> To: cocoon-users@xml.apache.org
> Subject: C1 performance
>
>
> Hi.
>
> I'm using cocoon 1.8.2 and I am now pretty much concerned by performance
> right now.
>
> My avarage pages response time is 0.6 seconde (about 70% XSLT
transformation
> and 30% database pooled access). I find this pretty slow since the site is
> going to have something like 400 crazy simultaneaous users clicking stuffs
> all over.
> :)
>
> >>>>
> >>>> If you're not using Saxon already, then my experience was this gave a
> huge performance improvement.
> >>>>
> >>>> If your database is Oracle, then I also saw a big performance
> improvement using MTS SQLnet connections.
> >>>> The downside here though is that MTS seems to be pretty buggy on
Linux,
> at least before Oracle 8.1.7.
> >>>> Any benefit here though is going to be more dependent on your
> application architecture - most of
> >>>> mine was through the internal connection pooling of MTS, I think.
> >>>>
>
> My fair is that our linux/redhat 1GHz / 500Mo Ram production machine isn't
> going to make it...since every request use 100% of the precessor machine!
>
> >>>>
> >>>>  That sounds very high. Once my XSP is compiled, I only see a few %
> utilization, never 100%.
> >>>>
>
> Cache management is delicate... because most of our page informations are
> based on POSTed request parameters. But we will implement cache in some of
> the most requested pages.
>
> We plan to port the site later on Cocoon2. (when beta) Those Saxon
> asychronous response will probalby drop dramatically those 70%, but we
still
> need more.
>
> So I go two questions :
>
> 1) Where can I find info on loadbalancing tomcat/apache ? we need
> "statefull" load balancing (we have user session). Is this possible
without
> posting the user ID in links and forms ?
>
> >>>>>
> >>>>>  Well, no it's not really a Cocoon question, but I have my site
> configured using
> >>>>>  mod_jk loadbalancing across 4 JVM instances on a physical server
and
> then
> >>>>>  physical Foundry loadbalancing over 2 machines.  Once a session is
> established,
> >>>>>  we tie that client to the same server and JVM using either cookies
or
> URL re-writing.
> >>>>>  Due to the limitations of the redirect rules on the loadbalancer
> though, I had to
> >>>>>  re-compile Tomcat to work with it.  Good job it's open source ;-)
> >>>>>  If you're going to have a lot of sessions, then probably the more
> JVMs you can run the
> >>>>>  better.
> >>>>>
>
> 2) What kind of web site load testing tools you guys use ?
>
> >>>>>  Jmeter
>
>
> Paul
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: R: R: C1 performance (Paul)

Posted by Ulrich Mayring <ul...@denic.de>.
Marco Spinetti wrote:
> 
> Hi Ulrich,
> why? I have read that ajpv13 is faster ajpv12: is it right?
> What do you advise me?

I advise to use ajpv12 if you have many users, there have been reports
that ajpv13 performs well under heavy load with one user, but not with
many users.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


R: R: C1 performance (Paul)

Posted by Marco Spinetti <m....@pisa.iol.it>.
Hi Ulrich,
why? I have read that ajpv13 is faster ajpv12: is it right?
What do you advise me?
Regards
Marco

----- Original Message ----- 
From: Ulrich Mayring <ul...@denic.de>
To: <co...@xml.apache.org>
Sent: Tuesday, May 22, 2001 9:48 AM
Subject: Re: R: C1 performance (Paul)


> Marco Spinetti wrote:
> > 
> > Have you used Ajpv13?
> 
> For heavy load and many users you should use Ajpv12.
> 
> Ulrich
> 
> -- 
> Ulrich Mayring
> DENIC eG, Systementwicklung
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
> 
> 


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: R: C1 performance (Paul)

Posted by Ulrich Mayring <ul...@denic.de>.
Marco Spinetti wrote:
> 
> Have you used Ajpv13?

For heavy load and many users you should use Ajpv12.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: C1 performance (Paul)

Posted by Paul Nock <pn...@medicineplanet.com>.
Assuming that you already have tomcat and Apache configured together using
mod_jk, here are the relevant pieces of files to enable mod_jk
loadbalancing.  I'm using Ajp13, haven't really investigated Ajp12 too much,
but then I haven't seen any problem with Ajp13 yet. The configuration
process is the same however, so you can choose either.

1. server*.xml (one for each JVM):
Ajp12 is still required, but I start up with thread settings very low.  No
particular significance to the Ajp13 parameters other than to stop things
getting out of control under heavy load.

        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="9007"/>
            <Parameter name="thread_pool" value="true"/>
            <Parameter name="max_threads" value="2"/>
            <Parameter name="max_spare_threads" value="2"/>
            <Parameter name="min_spare_threads" value="1"/>
        </Connector>
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
            <Parameter name="port" value="8009"/>
            <Parameter name="backlog" value="100"/>
            <Parameter name="thread_pool" value="true"/>
            <Parameter name="max_threads" value="40"/>
            <Parameter name="max_spare_threads" value="7"/>
            <Parameter name="min_spare_threads" value="3"/>
        </Connector>


2. MyMod_jk.conf (put a line at the end of httpd.conf to include this file):
The interesting thing here is the 'JkMount' directive: I've called the
worker 'loadbalancer'
	Alias /mt-point "/path-to/webapps/cocoon/"
	<Directory "/path-to/webapps/cocoon">
	    Options None
	</Directory>
	JkMount /mt-point/*.xml loadbalancer
	<Location "/mt-point/WEB-INF/">
	    AllowOverride None
	    deny from all
	</Location>
	<Location "/mt-point/META-INF/">
	    AllowOverride None
	    deny from all
	</Location>
	<Location "/mt-point/Cocoon.xml">
	    Order Deny,Allow
	    Deny from all
	</Location>

3. workers.properties:
Here are the relevant pieces:
	worker.list=loadbalancer, worker1, worker2, worker3, worker4

	worker.worker1.port=8009
	worker.worker1.host=localhost  #  Haven't tried running to a remote host,
but this is another option
	worker.worker1.type=ajp13
	worker.worker1.lbfactor=1   #  no reason to change from 1 if all your
workers are doing the same thing
	worker.worker1.cachesize=1  #  think this has to 1 for tomcat/Apache1.3

(repeat for all the workers you have, changing the port number obviously.)

	worker.loadbalancer.type=lb
	worker.loadbalancer.balanced_workers=worker1, worker2, worker3, worker4


4. Startup script:
use -f to point at different server.xml files so you can start multiple
tomcats from the same home:
	java -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat -f
${TOMCAT_HOME}/conf/server1.xml "$@" &
	java -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat -f
${TOMCAT_HOME}/conf/server2.xml "$@" &
	java -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat -f
${TOMCAT_HOME}/conf/server3.xml "$@" &


Tomcat will then load balance connections between the different instances of
tomcat that are running on this server.  It will do it by appending the name
of the worker to the sessionid, like 'jsessionid=1234556.worker1, so you
might want to abbreviate the name of the workers if you're worried about the
length of the URL.

That's the tomcat/apache part.  If you're using an external hardware
loadbalancer too, you'll also need to make sure that routes subsequent
sessions back to the same machine.  In my case, our loadbalancer routes on
cookie names and/or URL rewriting. To cut a long story short, I set a
"server-id" cookie to the value of the node where this session belongs, and
I re-built tomcat so that the "JSESSIONID" parameter/cookie is an identifier
for the node, e.g. node1id=123456.worker1.  This was necessary because the
load balancer can't switch on patterns like *;jsessionid=*.worker1a*, and I
need to switch on cookie or cookie-less browsers.  I'll spare the full
details from the cocoon distribution list  ;-)

Paul


-----Original Message-----
From: Marco Spinetti [mailto:m.spinetti@pisa.iol.it]
Sent: Tuesday, May 22, 2001 12:22 AM
To: cocoon-users@xml.apache.org
Subject: R: C1 performance (Paul)


Hi Paul,
I must create, to send my application in production, a well balanced and
resistant system.(load balacing problem). I am much interested in your
configuration, which seems excellent to me. The problem is that I do not
know how to create it: could you tell me how you have done?
Have you used Ajpv13?
How have you set up the Workers properties?
Thanx
Regards
Marco


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>