You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Harsimranjit singh Kler <si...@gmail.com> on 2011/04/27 17:27:07 UTC

modjk apache response questions

Hi


 I  need some observations on loadbalancer with mod jk, such as
How to check  utilization of each httpd workers? How to check what is the
number of connections active on the each separate
Tomcats when there is load?.How i can increase response time?AJP port should
unique in worker.properities?

Whenever i am increasing concurrent requests on LB response time decreases?
Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27


regards
harsimran

Re: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Yes .Three tomcats(500+500+500 each).



Latest configuration .


worker.list=balancer

#For tomcat 1

worker.worker1.type=ajp13

worker.worker1.host=10.50.16.10

worker.worker1.port=8009

worker.worker1.lbfactor=1

 #For tomcat 2

worker2.worker2.type=ajp13

worker.worker2.host=10.50.16.10

worker.worker2.port=8010

worker.worker2.lbfactor=1

#For tomcat 3

worker.worker3.type=ajp13

worker.worker3.host=10.50.16.10

worker.worker3.port=8011

worker.worker3.lbfactor=1

 worker.balancer.type=lb

worker.balancer.balance_workers=worker1,worker2,worker3

worker.balancer.sticky_session=1



regards
Harsimran





On Mon, May 2, 2011 at 10:10 PM, André Warnier <aw...@ice-sa.com> wrote:

>  Christopher Schultz wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> harsimran,
>>
>> On 5/1/2011 1:09 PM, Harsimranjit singh Kler wrote:
>>
>>> Server MPM: Worker
>>> threaded: yes (fixed thread count)
>>> forked: yes (variable process count)
>>>
>>
>> ServerLimit 30
>>> StartServers 20
>>> MaxClients 1500
>>> MinSpareThreads 40
>>> MaxSpareThreads 100
>>> ThreadsPerChild 50
>>> MaxRequestsPerChild 0
>>>
>>
>> So you have a maximum of 50 * 30 = 1500 incoming connections for Apache
>> httpd.
>>
>> #For tomcat 1
>>> worker.list=worker1
>>> #worker.worker1.domain=worker1
>>> worker.worker1.type=ajp13
>>> worker.worker1.host=
>>>
>>
>> Hmm. What does host="" get you? I hope localhost, by default.
>>
>> worker.worker1.port=8009
>>> worker.worker1.lbfactor=1
>>>
>>
>> Default connection_pool_size is "do whatever makes sense" which should
>> be "1": that will give you 1500 connections to your backend.
>>
>> server.xml(tomcats)
>>> Connector port=”8009″
>>> enableLookups=”false” redirectPort=”8443″
>>> maxThreads=”500″ minSpareThreads=”25″
>>> maxSpareThreads=”75″ protocol=”AJP/1.3
>>>
>>
>> You have configured httpd to make 1500 connections to Tomcat, but Tomcat
>> can only accept 500 connections. You will have lots of
>> connection-thrashing on the httpd side.
>>
>> You want to make sure that the number of mod_jk connections you expect
>> to make from the httpd side is the same as the number of connections you
>> can handle on the Tomcat side.
>>
>
> He has 3 tomcats though.
> Or did I misread that ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: modjk apache response questions

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

Harsimranjit,

On 5/5/2011 2:14 PM, Harsimranjit singh Kler wrote:
> any other input required ?

To me, it just looks like higher load=slower response time. Sounds like
you have maxed-out your hardware.

A 20x load increase with only a 2x response time increase seems like
reasonable scaling to me.

What are we looking for, here?

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

iEYEARECAAYFAk3DObgACgkQ9CaO5/Lv0PAqywCguWngSeBts8BKHKEKNmAnOcEU
/7MAoIaQ+n4z8Y6L8CBCQQhDeLfCeZBL
=miDt
-----END PGP SIGNATURE-----

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


Re: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Hi
any other input required ?

On Wed, May 4, 2011 at 9:48 AM, Harsimranjit singh Kler <simran4u2@gmail.com
> wrote:

>
>
>  Hi
>>
>
>
>>
>> i have done testing as required using ab- please find details :.
>>
>> Please let me knw if anything other details required.
>>
>> Is this always manadatory that maxthread in tomcat shoud equal to
>> maxclient(apache)?
>>
>> in my case traffic always distributes among 3 tomcats so i assume to give
>> 500 maxthread on each tomcat(also high values for maxthread in tomcat not
>> recomended)
>>
>>
>     Not sure if following worker setting is proper?
>
>>   *http.conf*
>>
>> <IfModule mpm_worker_module>
>>
>> ServerLimit 50
>>
>> StartServers 2
>>
>> MaxClients 1500
>>
>> MinSpareThreads 50
>>
>> MaxSpareThreads 600
>>
>> ThreadsPerChild 50
>>
>> MaxRequestsPerChild 0
>>
>
>
>>   </IfModule>
>>  *Server.xml(for three tomcat)***
>>
>> <Connector port="8008"
>>
>>                enableLookups="false" redirectPort="8443"
>>
>>                 maxThreads="500" minSpareThreads="25"
>>
>>                maxSpareThreads="75" acceptCount="100"
>>                protocol="AJP/1.3" />
>>
>>
>> *TEST*
>>
>> # ./ab -n 150 -c 50 http://10.58.116.20/test/test.html
>>
>> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
>>
>> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
>>
>> Licensed to The Apache Software Foundation, http://www.apache.org/
>>
>>
>>
>> Benchmarking 10.58.116.20 (be patient).....done
>>
>>
>>
>>
>>
>> Server Software:        Apache/2.2.17
>>
>> Server Hostname:        10.58.116.20
>>
>> Server Port:            80
>>
>>
>>
>> Document Path:          /test/test.html
>>
>> Document Length:        104 bytes
>>
>>
>>
>> Concurrency Level:      50
>>
>> Time taken for tests:   0.369 seconds
>>
>> Complete requests:      150
>>
>> Failed requests:        0
>>
>> Write errors:           0
>>
>> Total transferred:      52500 bytes
>>
>> HTML transferred:       15600 bytes
>>
>> Requests per second:    406.96 [#/sec] (mean)
>>
>> Time per request:       122.863 [ms] (mean)
>>
>> Time per request:       2.457 [ms] (mean, across all concurrent requests)
>>
>> Transfer rate:          139.10 [Kbytes/sec] received
>>
>>
>>
>> Connection Times (ms)
>>
>>               min  mean[+/-sd] median   max
>>
>> Connect:        0    1   0.3      1       1
>>
>> Processing:     1  112 111.2     84     337
>>
>> Waiting:        1  112 111.2     84     337
>>
>> Total:          1  113 111.3     85     338
>>
>>
>>
>> Percentage of the requests served within a certain time (ms)
>>
>>   50%     85
>>
>>   66%    141
>>
>>   75%    185
>>
>>   80%    215
>>
>>   90%    330
>>
>>   95%    335
>>
>>   98%    336
>>
>>   99%    337
>>
>>  100%    338 (longest request)
>>
>>
>>
>>
>>
>>
>>
>> *]# ./ab -n 3000 -c 1000 **http://10.58.116.20/test/test.html***
>>
>> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
>>
>> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
>>
>> Licensed to The Apache Software Foundation, http://www.apache.org/
>>
>>
>>
>> Benchmarking 10.58.116.20 (be patient)
>>
>> Completed 300 requests
>>
>> Completed 600 requests
>>
>> Completed 900 requests
>>
>> Completed 1200 requests
>>
>> Completed 1500 requests
>>
>> Completed 1800 requests
>>
>> Completed 2100 requests
>>
>> Completed 2400 requests
>>
>> Completed 2700 requests
>>
>> Completed 3000 requests
>>
>> Finished 3000 requests
>>
>>
>>
>>
>>
>> Server Software:        Apache/2.2.17
>>
>> Server Hostname:        10.58.116.20
>>
>> Server Port:            80
>>
>>
>>
>> Document Path:          /test/test.html
>>
>> Document Length:        104 bytes
>>
>>
>>
>> Concurrency Level:      1000
>>
>> Time taken for tests:   7.246 seconds
>>
>> Complete requests:      3000
>>
>> Failed requests:        0
>>
>> Write errors:           0
>>
>> Total transferred:      1050000 bytes
>>
>> HTML transferred:       312000 bytes
>>
>> Requests per second:    414.00 [#/sec] (mean)
>>
>> Time per request:       2415.471 [ms] (mean)
>>
>> Time per request:       2.415 [ms] (mean, across all concurrent requests)
>>
>> Transfer rate:          141.50 [Kbytes/sec] received
>>
>>
>>
>> Connection Times (ms)
>>
>>               min  mean[+/-sd] median   max
>>
>> Connect:        0   31 277.8      0    3001
>>
>> Processing:     1 1384 2297.0    136    7218
>>
>> Waiting:        1 1383 2296.0    136    7217
>>
>> Total:         57 1415 2308.5    140    7246
>>
>>
>>
>> Percentage of the requests served within a certain time (ms)
>>
>>   50%    140
>>
>>   66%    326
>>
>>   75%   1756
>>
>>   80%   3103
>>
>>   90%   6392
>>
>>   95%   6670
>>
>>   98%   7065
>>
>>   99%   7175
>>
>>  100%   7246 (longest request)
>>
>>
>> On Wed, May 4, 2011 at 2:55 AM, André Warnier <aw...@ice-sa.com> wrote:
>>
>>> Christopher Schultz wrote:
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> André,
>>>>
>>>> On 5/2/2011 12:40 PM, André Warnier wrote:
>>>>
>>>>> He has 3 tomcats though.
>>>>> Or did I misread that ?
>>>>>
>>>>
>>>> Oh, well, there still might be a problem. No httpd configuration was
>>>> shown (only workers.properties), so there are still situations where the
>>>> connections can be way-off.
>>>>
>>>> For instance, if session stickiness is used and you get very unlucky,
>>>> it's possible that two Tomcat backends will sit idle while the third
>>>> will be handling 100% of the traffic. If that instance only has 500
>>>> connections available, there will be 1500 active connections
>>>> bearing-down on it. :(
>>>>
>>>
>>> Yes.  Session stickines is used, and this scenario has been mentioned.
>>> I have been trying to get the OP to use the standard Apache "ab" program,
>>> with a simple request to a static page, to make sure that this was not the
>>> case, in conditions that we can relate to.
>>> Unfortunately, he does not seem convinced by the need to do so, so it is
>>> a bit difficult to help further in that case.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>

Re: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
 Hi
>


>
> i have done testing as required using ab- please find details :.
>
> Please let me knw if anything other details required.
>
> Is this always manadatory that maxthread in tomcat shoud equal to
> maxclient(apache)?
>
> in my case traffic always distributes among 3 tomcats so i assume to give
> 500 maxthread on each tomcat(also high values for maxthread in tomcat not
> recomended)
>
>
    Not sure if following worker setting is proper?

>   *http.conf*
>
> <IfModule mpm_worker_module>
>
> ServerLimit 50
>
> StartServers 2
>
> MaxClients 1500
>
> MinSpareThreads 50
>
> MaxSpareThreads 600
>
> ThreadsPerChild 50
>
> MaxRequestsPerChild 0
>


>   </IfModule>
>  *Server.xml(for three tomcat)***
>
> <Connector port="8008"
>
>                enableLookups="false" redirectPort="8443"
>
>                 maxThreads="500" minSpareThreads="25"
>
>                maxSpareThreads="75" acceptCount="100"
>                protocol="AJP/1.3" />
>
>
> *TEST*
>
> # ./ab -n 150 -c 50 http://10.58.116.20/test/test.html
>
> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
>
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
>
>
> Benchmarking 10.58.116.20 (be patient).....done
>
>
>
>
>
> Server Software:        Apache/2.2.17
>
> Server Hostname:        10.58.116.20
>
> Server Port:            80
>
>
>
> Document Path:          /test/test.html
>
> Document Length:        104 bytes
>
>
>
> Concurrency Level:      50
>
> Time taken for tests:   0.369 seconds
>
> Complete requests:      150
>
> Failed requests:        0
>
> Write errors:           0
>
> Total transferred:      52500 bytes
>
> HTML transferred:       15600 bytes
>
> Requests per second:    406.96 [#/sec] (mean)
>
> Time per request:       122.863 [ms] (mean)
>
> Time per request:       2.457 [ms] (mean, across all concurrent requests)
>
> Transfer rate:          139.10 [Kbytes/sec] received
>
>
>
> Connection Times (ms)
>
>               min  mean[+/-sd] median   max
>
> Connect:        0    1   0.3      1       1
>
> Processing:     1  112 111.2     84     337
>
> Waiting:        1  112 111.2     84     337
>
> Total:          1  113 111.3     85     338
>
>
>
> Percentage of the requests served within a certain time (ms)
>
>   50%     85
>
>   66%    141
>
>   75%    185
>
>   80%    215
>
>   90%    330
>
>   95%    335
>
>   98%    336
>
>   99%    337
>
>  100%    338 (longest request)
>
>
>
>
>
>
>
> *]# ./ab -n 3000 -c 1000 **http://10.58.116.20/test/test.html***
>
> This is ApacheBench, Version 2.3 <$Revision: 655654 $>
>
> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
>
> Licensed to The Apache Software Foundation, http://www.apache.org/
>
>
>
> Benchmarking 10.58.116.20 (be patient)
>
> Completed 300 requests
>
> Completed 600 requests
>
> Completed 900 requests
>
> Completed 1200 requests
>
> Completed 1500 requests
>
> Completed 1800 requests
>
> Completed 2100 requests
>
> Completed 2400 requests
>
> Completed 2700 requests
>
> Completed 3000 requests
>
> Finished 3000 requests
>
>
>
>
>
> Server Software:        Apache/2.2.17
>
> Server Hostname:        10.58.116.20
>
> Server Port:            80
>
>
>
> Document Path:          /test/test.html
>
> Document Length:        104 bytes
>
>
>
> Concurrency Level:      1000
>
> Time taken for tests:   7.246 seconds
>
> Complete requests:      3000
>
> Failed requests:        0
>
> Write errors:           0
>
> Total transferred:      1050000 bytes
>
> HTML transferred:       312000 bytes
>
> Requests per second:    414.00 [#/sec] (mean)
>
> Time per request:       2415.471 [ms] (mean)
>
> Time per request:       2.415 [ms] (mean, across all concurrent requests)
>
> Transfer rate:          141.50 [Kbytes/sec] received
>
>
>
> Connection Times (ms)
>
>               min  mean[+/-sd] median   max
>
> Connect:        0   31 277.8      0    3001
>
> Processing:     1 1384 2297.0    136    7218
>
> Waiting:        1 1383 2296.0    136    7217
>
> Total:         57 1415 2308.5    140    7246
>
>
>
> Percentage of the requests served within a certain time (ms)
>
>   50%    140
>
>   66%    326
>
>   75%   1756
>
>   80%   3103
>
>   90%   6392
>
>   95%   6670
>
>   98%   7065
>
>   99%   7175
>
>  100%   7246 (longest request)
>
>
> On Wed, May 4, 2011 at 2:55 AM, André Warnier <aw...@ice-sa.com> wrote:
>
>> Christopher Schultz wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> André,
>>>
>>> On 5/2/2011 12:40 PM, André Warnier wrote:
>>>
>>>> He has 3 tomcats though.
>>>> Or did I misread that ?
>>>>
>>>
>>> Oh, well, there still might be a problem. No httpd configuration was
>>> shown (only workers.properties), so there are still situations where the
>>> connections can be way-off.
>>>
>>> For instance, if session stickiness is used and you get very unlucky,
>>> it's possible that two Tomcat backends will sit idle while the third
>>> will be handling 100% of the traffic. If that instance only has 500
>>> connections available, there will be 1500 active connections
>>> bearing-down on it. :(
>>>
>>
>> Yes.  Session stickines is used, and this scenario has been mentioned.
>> I have been trying to get the OP to use the standard Apache "ab" program,
>> with a simple request to a static page, to make sure that this was not the
>> case, in conditions that we can relate to.
>> Unfortunately, he does not seem convinced by the need to do so, so it is a
>> bit difficult to help further in that case.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>

Re: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> André,
> 
> On 5/2/2011 12:40 PM, André Warnier wrote:
>> He has 3 tomcats though.
>> Or did I misread that ?
> 
> Oh, well, there still might be a problem. No httpd configuration was
> shown (only workers.properties), so there are still situations where the
> connections can be way-off.
> 
> For instance, if session stickiness is used and you get very unlucky,
> it's possible that two Tomcat backends will sit idle while the third
> will be handling 100% of the traffic. If that instance only has 500
> connections available, there will be 1500 active connections
> bearing-down on it. :(

Yes.  Session stickines is used, and this scenario has been mentioned.
I have been trying to get the OP to use the standard Apache "ab" program, with a simple 
request to a static page, to make sure that this was not the case, in conditions that we 
can relate to.
Unfortunately, he does not seem convinced by the need to do so, so it is a bit difficult 
to help further in that case.

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


Re: modjk apache response questions

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

André,

On 5/2/2011 12:40 PM, André Warnier wrote:
> He has 3 tomcats though.
> Or did I misread that ?

Oh, well, there still might be a problem. No httpd configuration was
shown (only workers.properties), so there are still situations where the
connections can be way-off.

For instance, if session stickiness is used and you get very unlucky,
it's possible that two Tomcat backends will sit idle while the third
will be handling 100% of the traffic. If that instance only has 500
connections available, there will be 1500 active connections
bearing-down on it. :(

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

iEYEARECAAYFAk3AYc8ACgkQ9CaO5/Lv0PCSVACfYPoX2a1FCZ+yYEgEhcW8Ofrt
nuEAnRPsvhBuqbpkuLiVNHyOmPR0d9Qi
=72aF
-----END PGP SIGNATURE-----

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


Re: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> harsimran,
> 
> On 5/1/2011 1:09 PM, Harsimranjit singh Kler wrote:
>> Server MPM: Worker
>> threaded: yes (fixed thread count)
>> forked: yes (variable process count)
> 
>> ServerLimit 30
>> StartServers 20
>> MaxClients 1500
>> MinSpareThreads 40
>> MaxSpareThreads 100
>> ThreadsPerChild 50
>> MaxRequestsPerChild 0
> 
> So you have a maximum of 50 * 30 = 1500 incoming connections for Apache
> httpd.
> 
>> #For tomcat 1
>> worker.list=worker1
>> #worker.worker1.domain=worker1
>> worker.worker1.type=ajp13
>> worker.worker1.host=
> 
> Hmm. What does host="" get you? I hope localhost, by default.
> 
>> worker.worker1.port=8009
>> worker.worker1.lbfactor=1
> 
> Default connection_pool_size is "do whatever makes sense" which should
> be "1": that will give you 1500 connections to your backend.
> 
>> server.xml(tomcats)
>> Connector port=”8009″
>> enableLookups=”false” redirectPort=”8443″
>> maxThreads=”500″ minSpareThreads=”25″
>> maxSpareThreads=”75″ protocol=”AJP/1.3
> 
> You have configured httpd to make 1500 connections to Tomcat, but Tomcat
> can only accept 500 connections. You will have lots of
> connection-thrashing on the httpd side.
> 
> You want to make sure that the number of mod_jk connections you expect
> to make from the httpd side is the same as the number of connections you
> can handle on the Tomcat side.

He has 3 tomcats though.
Or did I misread that ?

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


Re: modjk apache response questions

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

harsimran,

On 5/1/2011 1:09 PM, Harsimranjit singh Kler wrote:
> Server MPM: Worker
> threaded: yes (fixed thread count)
> forked: yes (variable process count)

> ServerLimit 30
> StartServers 20
> MaxClients 1500
> MinSpareThreads 40
> MaxSpareThreads 100
> ThreadsPerChild 50
> MaxRequestsPerChild 0

So you have a maximum of 50 * 30 = 1500 incoming connections for Apache
httpd.

> #For tomcat 1
> worker.list=worker1
> #worker.worker1.domain=worker1
> worker.worker1.type=ajp13
> worker.worker1.host=

Hmm. What does host="" get you? I hope localhost, by default.

> worker.worker1.port=8009
> worker.worker1.lbfactor=1

Default connection_pool_size is "do whatever makes sense" which should
be "1": that will give you 1500 connections to your backend.

> server.xml(tomcats)
> Connector port=”8009″
> enableLookups=”false” redirectPort=”8443″
> maxThreads=”500″ minSpareThreads=”25″
> maxSpareThreads=”75″ protocol=”AJP/1.3

You have configured httpd to make 1500 connections to Tomcat, but Tomcat
can only accept 500 connections. You will have lots of
connection-thrashing on the httpd side.

You want to make sure that the number of mod_jk connections you expect
to make from the httpd side is the same as the number of connections you
can handle on the Tomcat side.

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

iEYEARECAAYFAk2+vZkACgkQ9CaO5/Lv0PCc4gCfd7WJ0T5y1cmjUZR02NPE26RH
JDEAnRW/feEcrk89HBunN3yFW5S0pdOT
=r1rr
-----END PGP SIGNATURE-----

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


Re: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
Are you sure ?

Harsimranjit singh Kler wrote:
...

> —–
> worker.properities
> ——————–
> worker.list=balancer          <----- that's fine
> 
> #For tomcat 1
> worker.list=worker1           <--- but what is that one doing here ? ...
> #worker.worker1.domain=worker1
> worker.worker1.type=ajp13
> worker.worker1.host=
> worker.worker1.port=8009
> worker.worker1.lbfactor=1
> .
> ..
> 
> .....
> 
> 
> worker.balancer.type=lb
> worker.balancer.balance_workers=worker1,worker2,worker3  <-- ...considering this

> worker.balancer.local_worker_only=1           <---- and what is this ?
> worker.balancer.sticky_session=1
> 


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


Re: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
 Hi
Here is details:::::
./apachectl -V
Server version: Apache/2.2.17 (Unix)
Server built: Apr 19 2011 08:35:28
Server’s Module Magic Number: 20051115:25
Server loaded: APR 1.4.2, APR-Util 1.3.10
Compiled using: APR 1.4.2, APR-Util 1.3.10
Architecture: 64-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with….
-D APACHE_MPM_DIR=”server/mpm/worker”
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT=”/applications/balancer”
-D SUEXEC_BIN=”/applications/balancer/bin/suexec”
-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”
-D DEFAULT_ERRORLOG=”logs/error_log”
-D AP_TYPES_CONFIG_FILE=”conf/mime.types”
-D SERVER_CONFIG_FILE=”conf/httpd.conf”

APACHE->
http.conf
—
–

ServerLimit 30
StartServers 20
MaxClients 1500
MinSpareThreads 40
MaxSpareThreads 100
ThreadsPerChild 50
MaxRequestsPerChild 0

——
—–
worker.properities
——————–
worker.list=balancer

#For tomcat 1
worker.list=worker1
#worker.worker1.domain=worker1
worker.worker1.type=ajp13
worker.worker1.host=
worker.worker1.port=8009
worker.worker1.lbfactor=1
.
..

.....


worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2,worker3
worker.balancer.local_worker_only=1
worker.balancer.sticky_session=1

4 TOMCAT->

—–
server.xml(tomcats)
Connector port=”8009″
enableLookups=”false” redirectPort=”8443″
maxThreads=”500″ minSpareThreads=”25″
maxSpareThreads=”75″ protocol=”AJP/1.3






On Sun, May 1, 2011 at 5:03 PM, André Warnier <aw...@ice-sa.com> wrote:

> Can you show the contents of the workers.properties file ?
> And, if you send just /one/ of your test requests to one Tomcat, what is
> the response time ? (do that several times, separately, and calculate the
> average).
>
>
>
> arsimranjit singh Kler wrote:
>
>> Hi
>> Hope you clear with my steup?
>>
>> Regards
>> Harsimran
>>
>> On Fri, Apr 29, 2011 at 4:30 PM, Harsimranjit singh Kler <
>> simran4u2@gmail.com> wrote:
>>
>> Hi
>>> My  Setup one load balancer(apache ) and three tomcat server .
>>> so 800 requests me i am hitting on apache loadbalancer using SOAP UI
>>> s\w now apache using modjk connector(equal load among all worker
>>> .Rondrobin) and  distributing requests to 3 tomcats .So 270 aprx for each
>>> tomcat worker.
>>>
>>> If hitting 1200 on Loadbalancer .this mean  400 aprox  processed by each
>>> tomcat worker.(Assuming all 1200 requests not going to one tomcat if no
>>> failover.As per my understanding i have given maxthread as 500 for each
>>> tomcat worker )
>>>
>>> Yes I removed  minProcessors="25" maxProcessors="2000" now.
>>>
>>> i am using SOAP UI s\w to test setup where i can check response and
>>> all.For
>>> my web services project(wsdl) some 4 methods exposed & are invoked in
>>> sequence.Average time for these all method to complete i am using to
>>> test.Let me know if some alternate tool to test load and performance , i
>>> can
>>> try with that also.
>>>
>>> Let me know if some issue with my configurations ?
>>>
>>> On Fri, Apr 29, 2011 at 3:41 PM, André Warnier <aw...@ice-sa.com> wrote:
>>>
>>> Hi.
>>>>
>>>> I am still not quite sure that I understand the way your are presenting
>>>> your results, below.
>>>> What does a line like
>>>>
>>>> b) 800 request 1 LB ,3 tomcat==Slow response time(double)
>>>>>
>>>> actually mean ?
>>>>
>>>> Apart from that :
>>>>
>>>> a)
>>>>
>>>>> minProcessors="25" maxProcessors="2000"
>>>>>
>>>> these attributes are deprecated, see
>>>> http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
>>>> Since they are confusing, remove them.
>>>>
>>>> b)
>>>> maxThreads="500"
>>>>
>>>> This means that each Tomcat will actually /never/ process more than 500
>>>> simultaneous AJP requests.  Any additional simultaneous request will
>>>> have to
>>>> wait, until one thread becomes available to handle it.
>>>>
>>>> One thing that you are not mentioning, is : in your test, how long does
>>>> it
>>>> take to actually process 1 request, if you send just one ?
>>>>
>>>> c) what pogram are you using, to send the requests to Apache/Tomcat ?
>>>> And how do you see that "the response time is slow/slower" ?
>>>>
>>>>
>>>>
>>>> Harsimranjit singh Kler wrote:
>>>>
>>>> Hi andre
>>>>>
>>>>> Actully i m testing performance of my setup.I have apache 2.2.17
>>>>> handling
>>>>> requests and configured 4 tomcats with modjk connector.
>>>>> ServerLimit 30
>>>>> worker MPM details:
>>>>>  StartServers 20
>>>>>  MaxClients 1500
>>>>>  MinSpareThreads 40
>>>>>  MaxSpareThreads 100
>>>>>  ThreadsPerChild 50
>>>>>  MaxRequestsPerChild 0
>>>>> server.xml for each tomcat
>>>>> --------------------------------------------
>>>>>
>>>>>
>>>>> <!-- Define an AJP 1.3 Connector on port 8009 -->
>>>>>
>>>>> <Connector port="8009"
>>>>>
>>>>> enableLookups="false" redirectPort="8443"
>>>>>
>>>>> minProcessors="25" maxProcessors="2000"
>>>>>
>>>>> maxThreads="500" minSpareThreads="25"
>>>>>
>>>>> maxSpareThreads="75" protocol="AJP/1.3" />
>>>>>
>>>>>
>>>>> Now i have tested by hitting some concurent requests on apache load
>>>>> balancer(LB):-
>>>>>
>>>>> a) 400 request 1 LB ,1 tomcat==expected response time
>>>>> b) 400 request 1 LB ,2 tomcat==expected response time
>>>>> c) 400 request 1 LB ,3 tomcat==expected response time
>>>>>
>>>>> but
>>>>>
>>>>> a) 800 request 1 LB, 2 tomcat==Slow response time(double)
>>>>> b) 800 request 1 LB ,3 tomcat==Slow response time(double)
>>>>> a) 1200 request 1 LB, 3 tomcat==Slow response time(three time)
>>>>>
>>>>> why LB slow down with increased concurent requests(CPU & memory
>>>>> utilisation
>>>>> same)?
>>>>>
>>>>> Hope u clear with my problem?
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Apr 28, 2011 at 1:06 AM, André Warnier <aw...@ice-sa.com> wrote:
>>>>>
>>>>> It may be me, but your question is not very clear.
>>>>>
>>>>>> Let me try again :
>>>>>> Since you seem to have Apache httpd in front of Tomcat, you can try to
>>>>>> use
>>>>>> the "ab" program which comes with Apache httpd, to send requests to
>>>>>> httpd,
>>>>>> and by selecting appropriate requests, have them forwarded to Tomcat
>>>>>> through
>>>>>> mod_jk.
>>>>>> Then, at the Apache httpd level, the mod_status module would help you
>>>>>> figure out what is going on at the Apache httpd level.
>>>>>> The mod_jk status worker will show you what is going on at the mod_jk
>>>>>> level.
>>>>>> And the Tomcat Manager (server-status part), will show you some
>>>>>> information
>>>>>> about what is going on at the Tomcat level.
>>>>>> There are also tools such as "jconsole" which can show you what is
>>>>>> happening at the level of the JVM which runs Tomcat (each Tomcat, if
>>>>>> you
>>>>>> have several).
>>>>>>
>>>>>> References for the above :
>>>>>> Apache "ab" program :
>>>>>> http://httpd.apache.org/docs/2.2/programs/ab.html
>>>>>> Apache mod_status :
>>>>>> http://httpd.apache.org/docs/2.2/mod/mod_status.html
>>>>>> mod_jk status worker :
>>>>>> http://tomcat.apache.org/connectors-doc/reference/status.html
>>>>>> Tomcat Manager application :
>>>>>> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
>>>>>> Monitoring the Tomcat JVM :
>>>>>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
>>>>>>
>>>>>> If that does not answer your question, then try to be more clear about
>>>>>> what
>>>>>> exactly you are looking for. For example, what do you mean by "test
>>>>>> load" ?
>>>>>> What precisely are you trying to find out ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Harsimranjit singh Kler wrote:
>>>>>>
>>>>>> Hi Andre
>>>>>>
>>>>>>> i checked but i want simple steps to test load on my each worker as
>>>>>>> am
>>>>>>> doing
>>>>>>> first time.Thanks
>>>>>>> regards
>>>>>>> Harsimran
>>>>>>> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
>>>>>>> simran4u2@gmail.com> wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>>  I  need some observations on loadbalancer with mod jk, such as
>>>>>>>> How to check  utilization of each httpd workers? How to check what
>>>>>>>> is
>>>>>>>> the
>>>>>>>> number of connections active on the each separate
>>>>>>>> Tomcats when there is load?.How i can increase response time?AJP
>>>>>>>> port
>>>>>>>> should unique in worker.properities?
>>>>>>>>
>>>>>>>> Whenever i am increasing concurrent requests on LB response time
>>>>>>>> decreases?
>>>>>>>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>>>>>>>
>>>>>>>>
>>>>>>>> regards
>>>>>>>> harsimran
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>  ---------------------------------------------------------------------
>>>>>>>>
>>>>>>> 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: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
Can you show the contents of the workers.properties file ?
And, if you send just /one/ of your test requests to one Tomcat, what is the response time 
? (do that several times, separately, and calculate the average).


arsimranjit singh Kler wrote:
> Hi
> Hope you clear with my steup?
> 
> Regards
> Harsimran
> 
> On Fri, Apr 29, 2011 at 4:30 PM, Harsimranjit singh Kler <
> simran4u2@gmail.com> wrote:
> 
>> Hi
>> My  Setup one load balancer(apache ) and three tomcat server .
>> so 800 requests me i am hitting on apache loadbalancer using SOAP UI
>> s\w now apache using modjk connector(equal load among all worker
>> .Rondrobin) and  distributing requests to 3 tomcats .So 270 aprx for each
>> tomcat worker.
>>
>> If hitting 1200 on Loadbalancer .this mean  400 aprox  processed by each
>> tomcat worker.(Assuming all 1200 requests not going to one tomcat if no
>> failover.As per my understanding i have given maxthread as 500 for each
>> tomcat worker )
>>
>> Yes I removed  minProcessors="25" maxProcessors="2000" now.
>>
>> i am using SOAP UI s\w to test setup where i can check response and all.For
>> my web services project(wsdl) some 4 methods exposed & are invoked in
>> sequence.Average time for these all method to complete i am using to
>> test.Let me know if some alternate tool to test load and performance , i can
>> try with that also.
>>
>> Let me know if some issue with my configurations ?
>>
>> On Fri, Apr 29, 2011 at 3:41 PM, André Warnier <aw...@ice-sa.com> wrote:
>>
>>> Hi.
>>>
>>> I am still not quite sure that I understand the way your are presenting
>>> your results, below.
>>> What does a line like
>>>
>>>> b) 800 request 1 LB ,3 tomcat==Slow response time(double)
>>> actually mean ?
>>>
>>> Apart from that :
>>>
>>> a)
>>>> minProcessors="25" maxProcessors="2000"
>>> these attributes are deprecated, see
>>> http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
>>> Since they are confusing, remove them.
>>>
>>> b)
>>> maxThreads="500"
>>>
>>> This means that each Tomcat will actually /never/ process more than 500
>>> simultaneous AJP requests.  Any additional simultaneous request will have to
>>> wait, until one thread becomes available to handle it.
>>>
>>> One thing that you are not mentioning, is : in your test, how long does it
>>> take to actually process 1 request, if you send just one ?
>>>
>>> c) what pogram are you using, to send the requests to Apache/Tomcat ?
>>> And how do you see that "the response time is slow/slower" ?
>>>
>>>
>>>
>>> Harsimranjit singh Kler wrote:
>>>
>>>> Hi andre
>>>>
>>>> Actully i m testing performance of my setup.I have apache 2.2.17 handling
>>>> requests and configured 4 tomcats with modjk connector.
>>>> ServerLimit 30
>>>> worker MPM details:
>>>>  StartServers 20
>>>>  MaxClients 1500
>>>>  MinSpareThreads 40
>>>>  MaxSpareThreads 100
>>>>  ThreadsPerChild 50
>>>>  MaxRequestsPerChild 0
>>>> server.xml for each tomcat
>>>> --------------------------------------------
>>>>
>>>>
>>>> <!-- Define an AJP 1.3 Connector on port 8009 -->
>>>>
>>>> <Connector port="8009"
>>>>
>>>> enableLookups="false" redirectPort="8443"
>>>>
>>>> minProcessors="25" maxProcessors="2000"
>>>>
>>>> maxThreads="500" minSpareThreads="25"
>>>>
>>>> maxSpareThreads="75" protocol="AJP/1.3" />
>>>>
>>>>
>>>> Now i have tested by hitting some concurent requests on apache load
>>>> balancer(LB):-
>>>>
>>>> a) 400 request 1 LB ,1 tomcat==expected response time
>>>> b) 400 request 1 LB ,2 tomcat==expected response time
>>>> c) 400 request 1 LB ,3 tomcat==expected response time
>>>>
>>>> but
>>>>
>>>> a) 800 request 1 LB, 2 tomcat==Slow response time(double)
>>>> b) 800 request 1 LB ,3 tomcat==Slow response time(double)
>>>> a) 1200 request 1 LB, 3 tomcat==Slow response time(three time)
>>>>
>>>> why LB slow down with increased concurent requests(CPU & memory
>>>> utilisation
>>>> same)?
>>>>
>>>> Hope u clear with my problem?
>>>>
>>>>
>>>>
>>>> On Thu, Apr 28, 2011 at 1:06 AM, André Warnier <aw...@ice-sa.com> wrote:
>>>>
>>>> It may be me, but your question is not very clear.
>>>>> Let me try again :
>>>>> Since you seem to have Apache httpd in front of Tomcat, you can try to
>>>>> use
>>>>> the "ab" program which comes with Apache httpd, to send requests to
>>>>> httpd,
>>>>> and by selecting appropriate requests, have them forwarded to Tomcat
>>>>> through
>>>>> mod_jk.
>>>>> Then, at the Apache httpd level, the mod_status module would help you
>>>>> figure out what is going on at the Apache httpd level.
>>>>> The mod_jk status worker will show you what is going on at the mod_jk
>>>>> level.
>>>>> And the Tomcat Manager (server-status part), will show you some
>>>>> information
>>>>> about what is going on at the Tomcat level.
>>>>> There are also tools such as "jconsole" which can show you what is
>>>>> happening at the level of the JVM which runs Tomcat (each Tomcat, if you
>>>>> have several).
>>>>>
>>>>> References for the above :
>>>>> Apache "ab" program : http://httpd.apache.org/docs/2.2/programs/ab.html
>>>>> Apache mod_status :
>>>>> http://httpd.apache.org/docs/2.2/mod/mod_status.html
>>>>> mod_jk status worker :
>>>>> http://tomcat.apache.org/connectors-doc/reference/status.html
>>>>> Tomcat Manager application :
>>>>> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
>>>>> Monitoring the Tomcat JVM :
>>>>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
>>>>>
>>>>> If that does not answer your question, then try to be more clear about
>>>>> what
>>>>> exactly you are looking for. For example, what do you mean by "test
>>>>> load" ?
>>>>> What precisely are you trying to find out ?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Harsimranjit singh Kler wrote:
>>>>>
>>>>> Hi Andre
>>>>>> i checked but i want simple steps to test load on my each worker as am
>>>>>> doing
>>>>>> first time.Thanks
>>>>>> regards
>>>>>> Harsimran
>>>>>> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
>>>>>> simran4u2@gmail.com> wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>>>  I  need some observations on loadbalancer with mod jk, such as
>>>>>>> How to check  utilization of each httpd workers? How to check what is
>>>>>>> the
>>>>>>> number of connections active on the each separate
>>>>>>> Tomcats when there is load?.How i can increase response time?AJP port
>>>>>>> should unique in worker.properities?
>>>>>>>
>>>>>>> Whenever i am increasing concurrent requests on LB response time
>>>>>>> decreases?
>>>>>>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>>>>>>
>>>>>>>
>>>>>>> regards
>>>>>>> harsimran
>>>>>>>
>>>>>>>
>>>>>>>  ---------------------------------------------------------------------
>>>>> 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: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Hi
Hope you clear with my steup?

Regards
Harsimran

On Fri, Apr 29, 2011 at 4:30 PM, Harsimranjit singh Kler <
simran4u2@gmail.com> wrote:

> Hi
> My  Setup one load balancer(apache ) and three tomcat server .
> so 800 requests me i am hitting on apache loadbalancer using SOAP UI
> s\w now apache using modjk connector(equal load among all worker
> .Rondrobin) and  distributing requests to 3 tomcats .So 270 aprx for each
> tomcat worker.
>
> If hitting 1200 on Loadbalancer .this mean  400 aprox  processed by each
> tomcat worker.(Assuming all 1200 requests not going to one tomcat if no
> failover.As per my understanding i have given maxthread as 500 for each
> tomcat worker )
>
> Yes I removed  minProcessors="25" maxProcessors="2000" now.
>
> i am using SOAP UI s\w to test setup where i can check response and all.For
> my web services project(wsdl) some 4 methods exposed & are invoked in
> sequence.Average time for these all method to complete i am using to
> test.Let me know if some alternate tool to test load and performance , i can
> try with that also.
>
> Let me know if some issue with my configurations ?
>
> On Fri, Apr 29, 2011 at 3:41 PM, André Warnier <aw...@ice-sa.com> wrote:
>
>> Hi.
>>
>> I am still not quite sure that I understand the way your are presenting
>> your results, below.
>> What does a line like
>>
>> > b) 800 request 1 LB ,3 tomcat==Slow response time(double)
>> actually mean ?
>>
>> Apart from that :
>>
>> a)
>> > minProcessors="25" maxProcessors="2000"
>> these attributes are deprecated, see
>> http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
>> Since they are confusing, remove them.
>>
>> b)
>> maxThreads="500"
>>
>> This means that each Tomcat will actually /never/ process more than 500
>> simultaneous AJP requests.  Any additional simultaneous request will have to
>> wait, until one thread becomes available to handle it.
>>
>> One thing that you are not mentioning, is : in your test, how long does it
>> take to actually process 1 request, if you send just one ?
>>
>> c) what pogram are you using, to send the requests to Apache/Tomcat ?
>> And how do you see that "the response time is slow/slower" ?
>>
>>
>>
>> Harsimranjit singh Kler wrote:
>>
>>> Hi andre
>>>
>>> Actully i m testing performance of my setup.I have apache 2.2.17 handling
>>> requests and configured 4 tomcats with modjk connector.
>>> ServerLimit 30
>>> worker MPM details:
>>>  StartServers 20
>>>  MaxClients 1500
>>>  MinSpareThreads 40
>>>  MaxSpareThreads 100
>>>  ThreadsPerChild 50
>>>  MaxRequestsPerChild 0
>>> server.xml for each tomcat
>>> --------------------------------------------
>>>
>>>
>>> <!-- Define an AJP 1.3 Connector on port 8009 -->
>>>
>>> <Connector port="8009"
>>>
>>> enableLookups="false" redirectPort="8443"
>>>
>>> minProcessors="25" maxProcessors="2000"
>>>
>>> maxThreads="500" minSpareThreads="25"
>>>
>>> maxSpareThreads="75" protocol="AJP/1.3" />
>>>
>>>
>>> Now i have tested by hitting some concurent requests on apache load
>>> balancer(LB):-
>>>
>>> a) 400 request 1 LB ,1 tomcat==expected response time
>>> b) 400 request 1 LB ,2 tomcat==expected response time
>>> c) 400 request 1 LB ,3 tomcat==expected response time
>>>
>>> but
>>>
>>> a) 800 request 1 LB, 2 tomcat==Slow response time(double)
>>> b) 800 request 1 LB ,3 tomcat==Slow response time(double)
>>> a) 1200 request 1 LB, 3 tomcat==Slow response time(three time)
>>>
>>> why LB slow down with increased concurent requests(CPU & memory
>>> utilisation
>>> same)?
>>>
>>> Hope u clear with my problem?
>>>
>>>
>>>
>>> On Thu, Apr 28, 2011 at 1:06 AM, André Warnier <aw...@ice-sa.com> wrote:
>>>
>>> It may be me, but your question is not very clear.
>>>> Let me try again :
>>>> Since you seem to have Apache httpd in front of Tomcat, you can try to
>>>> use
>>>> the "ab" program which comes with Apache httpd, to send requests to
>>>> httpd,
>>>> and by selecting appropriate requests, have them forwarded to Tomcat
>>>> through
>>>> mod_jk.
>>>> Then, at the Apache httpd level, the mod_status module would help you
>>>> figure out what is going on at the Apache httpd level.
>>>> The mod_jk status worker will show you what is going on at the mod_jk
>>>> level.
>>>> And the Tomcat Manager (server-status part), will show you some
>>>> information
>>>> about what is going on at the Tomcat level.
>>>> There are also tools such as "jconsole" which can show you what is
>>>> happening at the level of the JVM which runs Tomcat (each Tomcat, if you
>>>> have several).
>>>>
>>>> References for the above :
>>>> Apache "ab" program : http://httpd.apache.org/docs/2.2/programs/ab.html
>>>> Apache mod_status :
>>>> http://httpd.apache.org/docs/2.2/mod/mod_status.html
>>>> mod_jk status worker :
>>>> http://tomcat.apache.org/connectors-doc/reference/status.html
>>>> Tomcat Manager application :
>>>> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
>>>> Monitoring the Tomcat JVM :
>>>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
>>>>
>>>> If that does not answer your question, then try to be more clear about
>>>> what
>>>> exactly you are looking for. For example, what do you mean by "test
>>>> load" ?
>>>> What precisely are you trying to find out ?
>>>>
>>>>
>>>>
>>>>
>>>> Harsimranjit singh Kler wrote:
>>>>
>>>> Hi Andre
>>>>>
>>>>> i checked but i want simple steps to test load on my each worker as am
>>>>> doing
>>>>> first time.Thanks
>>>>> regards
>>>>> Harsimran
>>>>> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
>>>>> simran4u2@gmail.com> wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>>>
>>>>>>  I  need some observations on loadbalancer with mod jk, such as
>>>>>> How to check  utilization of each httpd workers? How to check what is
>>>>>> the
>>>>>> number of connections active on the each separate
>>>>>> Tomcats when there is load?.How i can increase response time?AJP port
>>>>>> should unique in worker.properities?
>>>>>>
>>>>>> Whenever i am increasing concurrent requests on LB response time
>>>>>> decreases?
>>>>>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>>>>>
>>>>>>
>>>>>> regards
>>>>>> harsimran
>>>>>>
>>>>>>
>>>>>>  ---------------------------------------------------------------------
>>>> 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: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Hi
My  Setup one load balancer(apache ) and three tomcat server .
so 800 requests me i am hitting on apache loadbalancer using SOAP UI s\w now
apache using modjk connector(equal load among all worker .Rondrobin) and
 distributing requests to 3 tomcats .So 270 aprx for each tomcat worker.

If hitting 1200 on Loadbalancer .this mean  400 aprox  processed by each
tomcat worker.(Assuming all 1200 requests not going to one tomcat if no
failover.As per my understanding i have given maxthread as 500 for each
tomcat worker )

Yes I removed  minProcessors="25" maxProcessors="2000" now.

i am using SOAP UI s\w to test setup where i can check response and all.For
my web services project(wsdl) some 4 methods exposed & are invoked in
sequence.Average time for these all method to complete i am using to
test.Let me know if some alternate tool to test load and performance , i can
try with that also.

Let me know if some issue with my configurations ?

On Fri, Apr 29, 2011 at 3:41 PM, André Warnier <aw...@ice-sa.com> wrote:

> Hi.
>
> I am still not quite sure that I understand the way your are presenting
> your results, below.
> What does a line like
>
> > b) 800 request 1 LB ,3 tomcat==Slow response time(double)
> actually mean ?
>
> Apart from that :
>
> a)
> > minProcessors="25" maxProcessors="2000"
> these attributes are deprecated, see
> http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
> Since they are confusing, remove them.
>
> b)
> maxThreads="500"
>
> This means that each Tomcat will actually /never/ process more than 500
> simultaneous AJP requests.  Any additional simultaneous request will have to
> wait, until one thread becomes available to handle it.
>
> One thing that you are not mentioning, is : in your test, how long does it
> take to actually process 1 request, if you send just one ?
>
> c) what pogram are you using, to send the requests to Apache/Tomcat ?
> And how do you see that "the response time is slow/slower" ?
>
>
>
> Harsimranjit singh Kler wrote:
>
>> Hi andre
>>
>> Actully i m testing performance of my setup.I have apache 2.2.17 handling
>> requests and configured 4 tomcats with modjk connector.
>> ServerLimit 30
>> worker MPM details:
>>  StartServers 20
>>  MaxClients 1500
>>  MinSpareThreads 40
>>  MaxSpareThreads 100
>>  ThreadsPerChild 50
>>  MaxRequestsPerChild 0
>> server.xml for each tomcat
>> --------------------------------------------
>>
>>
>> <!-- Define an AJP 1.3 Connector on port 8009 -->
>>
>> <Connector port="8009"
>>
>> enableLookups="false" redirectPort="8443"
>>
>> minProcessors="25" maxProcessors="2000"
>>
>> maxThreads="500" minSpareThreads="25"
>>
>> maxSpareThreads="75" protocol="AJP/1.3" />
>>
>>
>> Now i have tested by hitting some concurent requests on apache load
>> balancer(LB):-
>>
>> a) 400 request 1 LB ,1 tomcat==expected response time
>> b) 400 request 1 LB ,2 tomcat==expected response time
>> c) 400 request 1 LB ,3 tomcat==expected response time
>>
>> but
>>
>> a) 800 request 1 LB, 2 tomcat==Slow response time(double)
>> b) 800 request 1 LB ,3 tomcat==Slow response time(double)
>> a) 1200 request 1 LB, 3 tomcat==Slow response time(three time)
>>
>> why LB slow down with increased concurent requests(CPU & memory
>> utilisation
>> same)?
>>
>> Hope u clear with my problem?
>>
>>
>>
>> On Thu, Apr 28, 2011 at 1:06 AM, André Warnier <aw...@ice-sa.com> wrote:
>>
>> It may be me, but your question is not very clear.
>>> Let me try again :
>>> Since you seem to have Apache httpd in front of Tomcat, you can try to
>>> use
>>> the "ab" program which comes with Apache httpd, to send requests to
>>> httpd,
>>> and by selecting appropriate requests, have them forwarded to Tomcat
>>> through
>>> mod_jk.
>>> Then, at the Apache httpd level, the mod_status module would help you
>>> figure out what is going on at the Apache httpd level.
>>> The mod_jk status worker will show you what is going on at the mod_jk
>>> level.
>>> And the Tomcat Manager (server-status part), will show you some
>>> information
>>> about what is going on at the Tomcat level.
>>> There are also tools such as "jconsole" which can show you what is
>>> happening at the level of the JVM which runs Tomcat (each Tomcat, if you
>>> have several).
>>>
>>> References for the above :
>>> Apache "ab" program : http://httpd.apache.org/docs/2.2/programs/ab.html
>>> Apache mod_status : http://httpd.apache.org/docs/2.2/mod/mod_status.html
>>> mod_jk status worker :
>>> http://tomcat.apache.org/connectors-doc/reference/status.html
>>> Tomcat Manager application :
>>> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
>>> Monitoring the Tomcat JVM :
>>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
>>>
>>> If that does not answer your question, then try to be more clear about
>>> what
>>> exactly you are looking for. For example, what do you mean by "test load"
>>> ?
>>> What precisely are you trying to find out ?
>>>
>>>
>>>
>>>
>>> Harsimranjit singh Kler wrote:
>>>
>>> Hi Andre
>>>>
>>>> i checked but i want simple steps to test load on my each worker as am
>>>> doing
>>>> first time.Thanks
>>>> regards
>>>> Harsimran
>>>> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
>>>> simran4u2@gmail.com> wrote:
>>>>
>>>> Hi
>>>>
>>>>>
>>>>>  I  need some observations on loadbalancer with mod jk, such as
>>>>> How to check  utilization of each httpd workers? How to check what is
>>>>> the
>>>>> number of connections active on the each separate
>>>>> Tomcats when there is load?.How i can increase response time?AJP port
>>>>> should unique in worker.properities?
>>>>>
>>>>> Whenever i am increasing concurrent requests on LB response time
>>>>> decreases?
>>>>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>>>>
>>>>>
>>>>> regards
>>>>> harsimran
>>>>>
>>>>>
>>>>>  ---------------------------------------------------------------------
>>> 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: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
Hi.

I am still not quite sure that I understand the way your are presenting your results, below.
What does a line like
 > b) 800 request 1 LB ,3 tomcat==Slow response time(double)
actually mean ?

Apart from that :

a)
 > minProcessors="25" maxProcessors="2000"
these attributes are deprecated, see http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
Since they are confusing, remove them.

b)
maxThreads="500"

This means that each Tomcat will actually /never/ process more than 500 simultaneous AJP 
requests.  Any additional simultaneous request will have to wait, until one thread becomes 
available to handle it.

One thing that you are not mentioning, is : in your test, how long does it take to 
actually process 1 request, if you send just one ?

c) what pogram are you using, to send the requests to Apache/Tomcat ?
And how do you see that "the response time is slow/slower" ?


Harsimranjit singh Kler wrote:
> Hi andre
> 
> Actully i m testing performance of my setup.I have apache 2.2.17 handling
> requests and configured 4 tomcats with modjk connector.
> ServerLimit 30
> worker MPM details:
>  StartServers 20
>  MaxClients 1500
>  MinSpareThreads 40
>  MaxSpareThreads 100
>  ThreadsPerChild 50
>  MaxRequestsPerChild 0
> server.xml for each tomcat
> --------------------------------------------
> 
> 
> <!-- Define an AJP 1.3 Connector on port 8009 -->
> 
> <Connector port="8009"
> 
> enableLookups="false" redirectPort="8443"
> 
> minProcessors="25" maxProcessors="2000"
> 
> maxThreads="500" minSpareThreads="25"
> 
> maxSpareThreads="75" protocol="AJP/1.3" />
> 
> 
> Now i have tested by hitting some concurent requests on apache load
> balancer(LB):-
> 
> a) 400 request 1 LB ,1 tomcat==expected response time
> b) 400 request 1 LB ,2 tomcat==expected response time
> c) 400 request 1 LB ,3 tomcat==expected response time
> 
> but
> 
> a) 800 request 1 LB, 2 tomcat==Slow response time(double)
> b) 800 request 1 LB ,3 tomcat==Slow response time(double)
> a) 1200 request 1 LB, 3 tomcat==Slow response time(three time)
> 
> why LB slow down with increased concurent requests(CPU & memory utilisation
> same)?
> 
> Hope u clear with my problem?
> 
> 
> 
> On Thu, Apr 28, 2011 at 1:06 AM, André Warnier <aw...@ice-sa.com> wrote:
> 
>> It may be me, but your question is not very clear.
>> Let me try again :
>> Since you seem to have Apache httpd in front of Tomcat, you can try to use
>> the "ab" program which comes with Apache httpd, to send requests to httpd,
>> and by selecting appropriate requests, have them forwarded to Tomcat through
>> mod_jk.
>> Then, at the Apache httpd level, the mod_status module would help you
>> figure out what is going on at the Apache httpd level.
>> The mod_jk status worker will show you what is going on at the mod_jk
>> level.
>> And the Tomcat Manager (server-status part), will show you some information
>> about what is going on at the Tomcat level.
>> There are also tools such as "jconsole" which can show you what is
>> happening at the level of the JVM which runs Tomcat (each Tomcat, if you
>> have several).
>>
>> References for the above :
>> Apache "ab" program : http://httpd.apache.org/docs/2.2/programs/ab.html
>> Apache mod_status : http://httpd.apache.org/docs/2.2/mod/mod_status.html
>> mod_jk status worker :
>> http://tomcat.apache.org/connectors-doc/reference/status.html
>> Tomcat Manager application :
>> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
>> Monitoring the Tomcat JVM :
>> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
>>
>> If that does not answer your question, then try to be more clear about what
>> exactly you are looking for. For example, what do you mean by "test load" ?
>> What precisely are you trying to find out ?
>>
>>
>>
>>
>> Harsimranjit singh Kler wrote:
>>
>>> Hi Andre
>>>
>>> i checked but i want simple steps to test load on my each worker as am
>>> doing
>>> first time.Thanks
>>> regards
>>> Harsimran
>>> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
>>> simran4u2@gmail.com> wrote:
>>>
>>> Hi
>>>>
>>>>  I  need some observations on loadbalancer with mod jk, such as
>>>> How to check  utilization of each httpd workers? How to check what is the
>>>> number of connections active on the each separate
>>>> Tomcats when there is load?.How i can increase response time?AJP port
>>>> should unique in worker.properities?
>>>>
>>>> Whenever i am increasing concurrent requests on LB response time
>>>> decreases?
>>>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>>>
>>>>
>>>> regards
>>>> harsimran
>>>>
>>>>
>>  ---------------------------------------------------------------------
>> 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: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Hi andre

Actully i m testing performance of my setup.I have apache 2.2.17 handling
requests and configured 4 tomcats with modjk connector.
ServerLimit 30
worker MPM details:
 StartServers 20
 MaxClients 1500
 MinSpareThreads 40
 MaxSpareThreads 100
 ThreadsPerChild 50
 MaxRequestsPerChild 0
server.xml for each tomcat
--------------------------------------------


<!-- Define an AJP 1.3 Connector on port 8009 -->

<Connector port="8009"

enableLookups="false" redirectPort="8443"

minProcessors="25" maxProcessors="2000"

maxThreads="500" minSpareThreads="25"

maxSpareThreads="75" protocol="AJP/1.3" />


Now i have tested by hitting some concurent requests on apache load
balancer(LB):-

a) 400 request 1 LB ,1 tomcat==expected response time
b) 400 request 1 LB ,2 tomcat==expected response time
c) 400 request 1 LB ,3 tomcat==expected response time

but

a) 800 request 1 LB, 2 tomcat==Slow response time(double)
b) 800 request 1 LB ,3 tomcat==Slow response time(double)
a) 1200 request 1 LB, 3 tomcat==Slow response time(three time)

why LB slow down with increased concurent requests(CPU & memory utilisation
same)?

Hope u clear with my problem?



On Thu, Apr 28, 2011 at 1:06 AM, André Warnier <aw...@ice-sa.com> wrote:

> It may be me, but your question is not very clear.
> Let me try again :
> Since you seem to have Apache httpd in front of Tomcat, you can try to use
> the "ab" program which comes with Apache httpd, to send requests to httpd,
> and by selecting appropriate requests, have them forwarded to Tomcat through
> mod_jk.
> Then, at the Apache httpd level, the mod_status module would help you
> figure out what is going on at the Apache httpd level.
> The mod_jk status worker will show you what is going on at the mod_jk
> level.
> And the Tomcat Manager (server-status part), will show you some information
> about what is going on at the Tomcat level.
> There are also tools such as "jconsole" which can show you what is
> happening at the level of the JVM which runs Tomcat (each Tomcat, if you
> have several).
>
> References for the above :
> Apache "ab" program : http://httpd.apache.org/docs/2.2/programs/ab.html
> Apache mod_status : http://httpd.apache.org/docs/2.2/mod/mod_status.html
> mod_jk status worker :
> http://tomcat.apache.org/connectors-doc/reference/status.html
> Tomcat Manager application :
> http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
> Monitoring the Tomcat JVM :
> http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html
>
> If that does not answer your question, then try to be more clear about what
> exactly you are looking for. For example, what do you mean by "test load" ?
> What precisely are you trying to find out ?
>
>
>
>
> Harsimranjit singh Kler wrote:
>
>> Hi Andre
>>
>> i checked but i want simple steps to test load on my each worker as am
>> doing
>> first time.Thanks
>> regards
>> Harsimran
>> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
>> simran4u2@gmail.com> wrote:
>>
>> Hi
>>>
>>>
>>>  I  need some observations on loadbalancer with mod jk, such as
>>> How to check  utilization of each httpd workers? How to check what is the
>>> number of connections active on the each separate
>>> Tomcats when there is load?.How i can increase response time?AJP port
>>> should unique in worker.properities?
>>>
>>> Whenever i am increasing concurrent requests on LB response time
>>> decreases?
>>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>>
>>>
>>> regards
>>> harsimran
>>>
>>>
>>
>
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
It may be me, but your question is not very clear.
Let me try again :
Since you seem to have Apache httpd in front of Tomcat, you can try to use the "ab" 
program which comes with Apache httpd, to send requests to httpd, and by selecting 
appropriate requests, have them forwarded to Tomcat through mod_jk.
Then, at the Apache httpd level, the mod_status module would help you figure out what is 
going on at the Apache httpd level.
The mod_jk status worker will show you what is going on at the mod_jk level.
And the Tomcat Manager (server-status part), will show you some information about what is 
going on at the Tomcat level.
There are also tools such as "jconsole" which can show you what is happening at the level 
of the JVM which runs Tomcat (each Tomcat, if you have several).

References for the above :
Apache "ab" program : http://httpd.apache.org/docs/2.2/programs/ab.html
Apache mod_status : http://httpd.apache.org/docs/2.2/mod/mod_status.html
mod_jk status worker : http://tomcat.apache.org/connectors-doc/reference/status.html
Tomcat Manager application : http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
Monitoring the Tomcat JVM : http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html

If that does not answer your question, then try to be more clear about what exactly you 
are looking for. For example, what do you mean by "test load" ?
What precisely are you trying to find out ?



Harsimranjit singh Kler wrote:
> Hi Andre
> 
> i checked but i want simple steps to test load on my each worker as am doing
> first time.Thanks
> regards
> Harsimran
> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
> simran4u2@gmail.com> wrote:
> 
>> Hi
>>
>>
>>  I  need some observations on loadbalancer with mod jk, such as
>> How to check  utilization of each httpd workers? How to check what is the
>> number of connections active on the each separate
>> Tomcats when there is load?.How i can increase response time?AJP port
>> should unique in worker.properities?
>>
>> Whenever i am increasing concurrent requests on LB response time decreases?
>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>
>>
>> regards
>> harsimran
>>
> 


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


Re: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Hi Andre

i checked but i want simple steps to test load on my each worker as am doing
first time.Thanks
regards
Harsimran
On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
simran4u2@gmail.com> wrote:

> Hi
>
>
>  I  need some observations on loadbalancer with mod jk, such as
> How to check  utilization of each httpd workers? How to check what is the
> number of connections active on the each separate
> Tomcats when there is load?.How i can increase response time?AJP port
> should unique in worker.properities?
>
> Whenever i am increasing concurrent requests on LB response time decreases?
> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>
>
> regards
> harsimran
>

Re: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
Harsimranjit singh Kler wrote:
> Hi
> 
> 
>  I  need some observations on loadbalancer with mod jk, such as
> How to check  utilization of each httpd workers? How to check what is the
> number of connections active on the each separate
> Tomcats when there is load?.How i can increase response time?AJP port should
> unique in worker.properities?
> 
> Whenever i am increasing concurrent requests on LB response time decreases?
> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
> 
> 
How about starting with the on-line documentation ?
http://tomcat.apache.org/connectors-doc/reference/status.html



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


Re: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Hey
Load balancing is perfect.Same number of requests are distributed among
number of tomcats.

Only thing what may possible some requests in queue like why only 500
requests proccessed.

tool is able to hit concurrent requests,LB is disrtibuting among each tomcat
as well.

worker.balancer.sticky_session=1

so indivdual requests is completly proccessed by one tomcat.tool taking care
of sessions.this is fine



i willl surly back you with following tests as well


Thanks a lot !

Regards
Harsimram







On Mon, May 2, 2011 at 1:52 PM, André Warnier <aw...@ice-sa.com> wrote:

>  Harsimranjit singh Kler wrote:
>
>> Hi
>> Yes , it seems wrong configuration .New one is:
>>
>>
>> worker.list=balancer
>>
>> #For tomcat 1
>>
>> worker.worker1.type=ajp13
>>
>> worker.worker1.host=10.58.116.20
>>
>> worker.worker1.port=8009
>>
>> worker.worker1.lbfactor=1
>>
>>  #For tomcat 2
>>
>> worker2.worker2.type=ajp13
>>
>> worker.worker2.host=10.58.116.20
>>
>> worker.worker2.port=8010
>>
>> worker.worker2.lbfactor=1
>>
>> #For tomcat 3
>>
>> worker.worker3.type=ajp13
>>
>> worker.worker3.host=10.71.10.231
>>
>> worker.worker3.port=8011
>>
>> worker.worker3.lbfactor=1
>>
>>
>>
>> worker.balancer.type=lb
>>
>> worker.balancer.balance_workers=worker1,worker2,worker3
>>
>> worker.balancer.sticky_session=1
>>  Is this fine Now?
>>
>> One more thing i observe .When i changing with  with maxthreads.Httpd
>> status
>> following o/p
>>
>> Apache Server Status for  Server Version: Apache/2.2.17 (Unix) DAV/2
>> mod_jk/1.2.30 Server Built: Apr 19 2011 08:35:28
>> ------------------------------
>>  Current Time: Tuesday, 03-May-2011 02:13:57 IST Restart Time: Tuesday,
>> 03-May-2011 01:56:50 IST Parent Server Generation: 0 Server uptime: 17
>> minutes 7 seconds Total accesses: 16534 - Total Traffic: 7.2 MB CPU Usage:
>> u3.4 s1.79 cu0 cs0 - .505% CPU load 16.1 requests/sec - 7.2 kB/second -
>> 459
>> B/request 1 requests currently being processed, 499 idle workers
>> .
>> .
>>  501 requests currently being processed, 149 idle workers
>> Why always 501 requests processed??.i mean if i increase number of
>> concurrent requests on apache loadbalancer this value never increses
>> beyond
>> 500?
>>
>> 149 (i.e idle worker increses)change if i increase maxspareThreads from
>> worker MPM configurations.
>>
>>
> I am not really familiar with the Apache "worker MPM" and its exact
> ramifications in the way that mod_jk handles the number of connections to
> Tomcat.
> So I don't know.
> But the limit of 500 requests being processed, looks suspiciously the same
> as the maxThreads value of /one/ Tomcat.
> So maybe it is not really balancing the load, but sending it all to one
> Tomcat only.
> This may have something to do with the following setting :
>
>
> > worker.balancer.sticky_session=1
>
> and with the way in which your test application is working (with regard to
> sessions).
> You say that you are issuing 4 requests in sequence.  Are those requests
> part of a session at the Tomcat level ? Does your test tool take this into
> account ?
>
> I think you should really (re-)read this page :
> http://httpd.apache.org/docs/2.2/mod/worker.html
> and this page :
> http://tomcat.apache.org/connectors-doc/reference/workers.html
> (see in particular "connection_pool_size")
>
> and use logic to determine what may be happening.
>
> Also, for us to really help you, there are too many unknowns in your test
> setup (for example, we do not know your test application).
>
> To eat an elephant, do it a little bit at a time (African proverb).
>
> So let me suggest the following plan, to simplify the analysis :
>
> 1) at the Tomcat level, create one static html page inside your webapp
> (for example : tomcat_dir/webapps/my-webapp/test.html)
> 2) /from another server/, use the Apache "ab" program (*) to issue a number
> of test requests to the front-end load-balancer, for this static page
> 3) note the settings and the results
> 4) re-do the same test with other settings, changing one setting at a time
>
> If you see the same behaviour as with your own test application, then
> indeed there is something strange going on, worthy of more analysis.
> If you do not see the same behaviour, then you know that what you are
> seeing has something to do with your test application.  Then you need to
> figure out what is different between your test application, and a standard
> request for a static page.
>
>
> (*) see : http://httpd.apache.org/docs/2.2/programs/ab.html
> Example test :
> /usr/sbin/ab -n 150 -c 50 "http://frontend.company.com/my-webapp/test.html
> "
> (to issue a total of 150 requests, with 50 in parallel; in other words, 50
> ab instances will issue 3 requests each)
> and then change gradually to
> /usr/sbin/ab -n 3000 -c 1000 "
> http://frontend.company.com/my-webapp/test.html"
> (to issue a total of 3000 requests, with 1000 in parallel; in other words,
> 1000 ab instances will issue 3 requests each)
>
> Run this from another server, so that running "ab" itself does not
> interfere with the resources of your load-balancer and tomcat hosts.
>
>
>
>
>>
>>
>> why no error logs if something wrong configured in worker.properities?
>>
>
> 1) unknown directives are just being ignored.  Maybe if you set the log
> level very high (e.g. debug) it will print a warning.
> 2) the 2 directives
> worker.list=balancer
> worker.list=worker1
> were not illegal. They just add up, so you end up with a worker list
> containing "balancer,worker1".
> on the other hand, you had
>
> worker.balancer.balance_workers=worker1,worker2,worker3
> So you ended up with worker1 in both lists : the non-balanced list of
> mod_jk itself (2 workers : worker1 and balancer); and the internal list of
> the balancer worker.  That was inconsistent and may be the cause for the
> strange behaviour you were seeing.
>
>
>
>
>
>>
>>
>> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
>> simran4u2@gmail.com> wrote:
>>
>> Hi
>>>
>>>
>>>  I  need some observations on loadbalancer with mod jk, such as
>>> How to check  utilization of each httpd workers? How to check what is the
>>> number of connections active on the each separate
>>> Tomcats when there is load?.How i can increase response time?AJP port
>>> should unique in worker.properities?
>>>
>>> Whenever i am increasing concurrent requests on LB response time
>>> decreases?
>>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>>
>>>
>>> regards
>>> harsimran
>>>
>>>
>>
>
>  ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: modjk apache response questions

Posted by André Warnier <aw...@ice-sa.com>.
Harsimranjit singh Kler wrote:
> Hi
> Yes , it seems wrong configuration .New one is:
> 
> 
> worker.list=balancer
> 
> #For tomcat 1
> 
> worker.worker1.type=ajp13
> 
> worker.worker1.host=10.58.116.20
> 
> worker.worker1.port=8009
> 
> worker.worker1.lbfactor=1
> 
>  #For tomcat 2
> 
> worker2.worker2.type=ajp13
> 
> worker.worker2.host=10.58.116.20
> 
> worker.worker2.port=8010
> 
> worker.worker2.lbfactor=1
> 
> #For tomcat 3
> 
> worker.worker3.type=ajp13
> 
> worker.worker3.host=10.71.10.231
> 
> worker.worker3.port=8011
> 
> worker.worker3.lbfactor=1
> 
> 
> 
> worker.balancer.type=lb
> 
> worker.balancer.balance_workers=worker1,worker2,worker3
> 
> worker.balancer.sticky_session=1
>  Is this fine Now?
> 
> One more thing i observe .When i changing with  with maxthreads.Httpd status
> following o/p
> 
> Apache Server Status for  Server Version: Apache/2.2.17 (Unix) DAV/2
> mod_jk/1.2.30 Server Built: Apr 19 2011 08:35:28
> ------------------------------
>  Current Time: Tuesday, 03-May-2011 02:13:57 IST Restart Time: Tuesday,
> 03-May-2011 01:56:50 IST Parent Server Generation: 0 Server uptime: 17
> minutes 7 seconds Total accesses: 16534 - Total Traffic: 7.2 MB CPU Usage:
> u3.4 s1.79 cu0 cs0 - .505% CPU load 16.1 requests/sec - 7.2 kB/second - 459
> B/request 1 requests currently being processed, 499 idle workers
> .
> .
>  501 requests currently being processed, 149 idle workers
> Why always 501 requests processed??.i mean if i increase number of
> concurrent requests on apache loadbalancer this value never increses beyond
> 500?
> 
> 149 (i.e idle worker increses)change if i increase maxspareThreads from
> worker MPM configurations.
> 

I am not really familiar with the Apache "worker MPM" and its exact ramifications in the 
way that mod_jk handles the number of connections to Tomcat.
So I don't know.
But the limit of 500 requests being processed, looks suspiciously the same as the 
maxThreads value of /one/ Tomcat.
So maybe it is not really balancing the load, but sending it all to one Tomcat only.
This may have something to do with the following setting :

 > worker.balancer.sticky_session=1

and with the way in which your test application is working (with regard to sessions).
You say that you are issuing 4 requests in sequence.  Are those requests part of a session 
at the Tomcat level ? Does your test tool take this into account ?

I think you should really (re-)read this page :
http://httpd.apache.org/docs/2.2/mod/worker.html
and this page :
http://tomcat.apache.org/connectors-doc/reference/workers.html
(see in particular "connection_pool_size")

and use logic to determine what may be happening.

Also, for us to really help you, there are too many unknowns in your test setup (for 
example, we do not know your test application).

To eat an elephant, do it a little bit at a time (African proverb).

So let me suggest the following plan, to simplify the analysis :

1) at the Tomcat level, create one static html page inside your webapp
(for example : tomcat_dir/webapps/my-webapp/test.html)
2) /from another server/, use the Apache "ab" program (*) to issue a number of test 
requests to the front-end load-balancer, for this static page
3) note the settings and the results
4) re-do the same test with other settings, changing one setting at a time

If you see the same behaviour as with your own test application, then indeed there is 
something strange going on, worthy of more analysis.
If you do not see the same behaviour, then you know that what you are seeing has something 
to do with your test application.  Then you need to figure out what is different between 
your test application, and a standard request for a static page.


(*) see : http://httpd.apache.org/docs/2.2/programs/ab.html
Example test :
/usr/sbin/ab -n 150 -c 50 "http://frontend.company.com/my-webapp/test.html"
(to issue a total of 150 requests, with 50 in parallel; in other words, 50 ab instances 
will issue 3 requests each)
and then change gradually to
/usr/sbin/ab -n 3000 -c 1000 "http://frontend.company.com/my-webapp/test.html"
(to issue a total of 3000 requests, with 1000 in parallel; in other words, 1000 ab 
instances will issue 3 requests each)

Run this from another server, so that running "ab" itself does not interfere with the 
resources of your load-balancer and tomcat hosts.


> 
> 
> 
> why no error logs if something wrong configured in worker.properities?

1) unknown directives are just being ignored.  Maybe if you set the log level very high 
(e.g. debug) it will print a warning.
2) the 2 directives
worker.list=balancer
worker.list=worker1
were not illegal. They just add up, so you end up with a worker list containing 
"balancer,worker1".
on the other hand, you had
worker.balancer.balance_workers=worker1,worker2,worker3
So you ended up with worker1 in both lists : the non-balanced list of mod_jk itself (2 
workers : worker1 and balancer); and the internal list of the balancer worker.  That was 
inconsistent and may be the cause for the strange behaviour you were seeing.



> 
> 
> 
> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
> simran4u2@gmail.com> wrote:
> 
>> Hi
>>
>>
>>  I  need some observations on loadbalancer with mod jk, such as
>> How to check  utilization of each httpd workers? How to check what is the
>> number of connections active on the each separate
>> Tomcats when there is load?.How i can increase response time?AJP port
>> should unique in worker.properities?
>>
>> Whenever i am increasing concurrent requests on LB response time decreases?
>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>>
>>
>> regards
>> harsimran
>>
> 


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


Re: modjk apache response questions

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Hi
Yes , it seems wrong configuration .New one is:


worker.list=balancer

#For tomcat 1

worker.worker1.type=ajp13

worker.worker1.host=10.58.116.20

worker.worker1.port=8009

worker.worker1.lbfactor=1

 #For tomcat 2

worker2.worker2.type=ajp13

worker.worker2.host=10.58.116.20

worker.worker2.port=8010

worker.worker2.lbfactor=1

#For tomcat 3

worker.worker3.type=ajp13

worker.worker3.host=10.71.10.231

worker.worker3.port=8011

worker.worker3.lbfactor=1



worker.balancer.type=lb

worker.balancer.balance_workers=worker1,worker2,worker3

worker.balancer.sticky_session=1
 Is this fine Now?

One more thing i observe .When i changing with  with maxthreads.Httpd status
following o/p

Apache Server Status for  Server Version: Apache/2.2.17 (Unix) DAV/2
mod_jk/1.2.30 Server Built: Apr 19 2011 08:35:28
------------------------------
 Current Time: Tuesday, 03-May-2011 02:13:57 IST Restart Time: Tuesday,
03-May-2011 01:56:50 IST Parent Server Generation: 0 Server uptime: 17
minutes 7 seconds Total accesses: 16534 - Total Traffic: 7.2 MB CPU Usage:
u3.4 s1.79 cu0 cs0 - .505% CPU load 16.1 requests/sec - 7.2 kB/second - 459
B/request 1 requests currently being processed, 499 idle workers
.
.
 501 requests currently being processed, 149 idle workers
Why always 501 requests processed??.i mean if i increase number of
concurrent requests on apache loadbalancer this value never increses beyond
500?

149 (i.e idle worker increses)change if i increase maxspareThreads from
worker MPM configurations.




why no error logs if something wrong configured in worker.properities?



On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler <
simran4u2@gmail.com> wrote:

> Hi
>
>
>  I  need some observations on loadbalancer with mod jk, such as
> How to check  utilization of each httpd workers? How to check what is the
> number of connections active on the each separate
> Tomcats when there is load?.How i can increase response time?AJP port
> should unique in worker.properities?
>
> Whenever i am increasing concurrent requests on LB response time decreases?
> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27
>
>
> regards
> harsimran
>