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

[users@httpd] Worker MPM configuration with High Load

Hi

Using apache2.2.17,mod_jk_1.2.30,tomcat5.5.27..for my setup.!
./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”

See with above setup i am checking load of 1500 concurret requests with
SOAPUI with  worker MPM.with Default setting i am getting “max client error
in error.log”.So i have made following change.please look and validate
things if am on track:

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
.
.
#For tomcat 4
worker.list=worker4
#worker.worker4.domain=worker4
worker2.worker4.type=ajp13
worker.worker4.host=
worker.worker4.port=8012
worker.worker4.lbfactor=1

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

4 TOMCAT->

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

i have few questions..:-)

1)i am hitting with 1500 concurrent user.is this configuration fine?

2)AJP conector port should unique or not?For tomcat running on same machine
and if tomcats are on differenct machins?

3)I HAVE SET startserver 20(means 20 child processes with 50 thread per
child) .but why am getting 2 with following command

“ps aux | grep http | grep -v “\(root\|grep\)” | wc -l”–>2

4)Any other configuration need to do for worker MPM?

Thanks a lot in advance

regards
Harsimran

Re: [users@httpd] Worker MPM configuration with High Load

Posted by Harsimranjit singh Kler <si...@gmail.com>.
Sorry simply when i am increasing concurrent(400 to 600 to 800 to
1000) requests response time also increasing.i want same response time what
i am getting with 400 only.

On Wed, Apr 27, 2011 at 5:51 PM, Jeff Trawick <tr...@gmail.com> wrote:

> On Wed, Apr 27, 2011 at 4:31 AM, Harsimranjit singh Kler
> <si...@gmail.com> wrote:
> > Hi Jeff
> >
> > Whenever i am increasing number of worker(tomcat) my response time
> > increased.If i am running 1 tomcat & 1 LB with above configuration and
> > hitting 400 concurrent requests it give me expected response time.when i
> > added one more tomcat (so total 2 worker,1 LB) and hitting concurrent 800
> > requests my response time increased.i feel some issue at apache
> > configuration so its not forwarding requests properly\timly to tomcat
> > workers and slow down response. please help me out?
>
> I can't make the connection.  You need some more observations, such as
> what does server status (mod_status) indicate about utilization of
> httpd workers, what is the number of connections on the two separate
> Tomcats, etc.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Worker MPM configuration with High Load

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Apr 27, 2011 at 4:31 AM, Harsimranjit singh Kler
<si...@gmail.com> wrote:
> Hi Jeff
>
> Whenever i am increasing number of worker(tomcat) my response time
> increased.If i am running 1 tomcat & 1 LB with above configuration and
> hitting 400 concurrent requests it give me expected response time.when i
> added one more tomcat (so total 2 worker,1 LB) and hitting concurrent 800
> requests my response time increased.i feel some issue at apache
> configuration so its not forwarding requests properly\timly to tomcat
> workers and slow down response. please help me out?

I can't make the connection.  You need some more observations, such as
what does server status (mod_status) indicate about utilization of
httpd workers, what is the number of connections on the two separate
Tomcats, etc.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Worker MPM configuration with High Load

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

Whenever i am increasing number of worker(tomcat) my response time
increased.If i am running 1 tomcat & 1 LB with above configuration and
hitting 400 concurrent requests it give me expected response time.when i
added one more tomcat (so total 2 worker,1 LB) and hitting concurrent 800
requests my response time increased.i feel some issue at apache
configuration so its not forwarding requests properly\timly to tomcat
workers and slow down response. please help me out?

thanks
harsimran

On Mon, Apr 25, 2011 at 9:03 PM, Jeff Trawick <tr...@gmail.com> wrote:

> On Mon, Apr 25, 2011 at 10:50 AM, Harsimranjit singh Kler
> <si...@gmail.com> wrote:
> > Hi Jeff
> >
> > Thanks for update .I have gone through that Doc.
> >
> > Above configurations working for me Still i have some specific
> > questions..:-)
> > 1)Is it good to increase min\maxSparethread for increasing response time?
>
> see if there is significant httpd child process creation/termination;
> if so, these can be adjusted to reduce that
>
> > And what should MaxRequestsPerChild?
>
> 0, unless you have a specific problem you're trying to work around
>
> > 2)AJP ports should different for all tomcat worker ?
> > 3)Why apache not complain(no error log) if we provide wrong
> configurations
> > in worker properities for particular worker?
>
> maybe there is a better mailing list for mod_jk?
>
> >
> >
> > Thanks
> >
> >
> > On Thu, Apr 21, 2011 at 4:50 PM, Jeff Trawick <tr...@gmail.com> wrote:
> >>
> >> On Wed, Apr 20, 2011 at 11:55 PM, Harsimranjit singh Kler
> >> <si...@gmail.com> wrote:
> >>
> >> > ServerLimit 30
> >> > StartServers 20
> >> > MaxClients 1500
> >> > MinSpareThreads 40
> >> > MaxSpareThreads 100
> >> > ThreadsPerChild 50
> >> > MaxRequestsPerChild 0
> >>
> >> > 1)i am hitting with 1500 concurrent user.is this configuration fine?
> >>
> >> you encountered the "reached maxclients" condition with
> MaxClients=1500...
> >>
> >> whether that is expected is up to your app and the traffic
> >>
> >> if the app hangs or takes a long time to respond, you could reach the
> >> maxclients limit regardless
> >>
> >> if the app is responding appropriately and your machine has capacity,
> >> increase maxclients
> >>
> >> > 3)I HAVE SET startserver 20(means 20 child processes with 50 thread
> per
> >> > child) .but why am getting 2 with following command
> >> >
> >> > “ps aux | grep http | grep -v “\(root\|grep\)” | wc -l”–>2
> >>
> >> you set MaxSpareThreads to 100; that's 2 * your ThreadsPerChild
> >>
> >> don't worry about StartServers
> >>
> >> notice that your MinSpareThreads and MaxSpareThreads values and the
> >> difference between them are a small percentage of MaxClients; if load
> >> changes by a very small percentage, child processes will be terminated
> >> or started
> >>
> >> perhaps this preso would help:
> >>
> http://blogs.sun.com/trawick/resource/DeepDive/WebStackDeepDiveApache.pdf
> >>
> >> > 4)Any other configuration need to do for worker MPM?
> >> >
> >> > Thanks a lot in advance
> >> >
> >> > regards
> >> > Harsimran
> >>
> >>
> >>
> >> --
> >> Born in Roswell... married an alien...
> >>
> >> ---------------------------------------------------------------------
> >> The official User-To-User support forum of the Apache HTTP Server
> Project.
> >> See <URL:http://httpd.apache.org/userslist.html> for more info.
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >
> >
>
>
>
> --
>  Born in Roswell... married an alien...
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Worker MPM configuration with High Load

Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, Apr 25, 2011 at 10:50 AM, Harsimranjit singh Kler
<si...@gmail.com> wrote:
> Hi Jeff
>
> Thanks for update .I have gone through that Doc.
>
> Above configurations working for me Still i have some specific
> questions..:-)
> 1)Is it good to increase min\maxSparethread for increasing response time?

see if there is significant httpd child process creation/termination;
if so, these can be adjusted to reduce that

> And what should MaxRequestsPerChild?

0, unless you have a specific problem you're trying to work around

> 2)AJP ports should different for all tomcat worker ?
> 3)Why apache not complain(no error log) if we provide wrong configurations
> in worker properities for particular worker?

maybe there is a better mailing list for mod_jk?

>
>
> Thanks
>
>
> On Thu, Apr 21, 2011 at 4:50 PM, Jeff Trawick <tr...@gmail.com> wrote:
>>
>> On Wed, Apr 20, 2011 at 11:55 PM, Harsimranjit singh Kler
>> <si...@gmail.com> wrote:
>>
>> > ServerLimit 30
>> > StartServers 20
>> > MaxClients 1500
>> > MinSpareThreads 40
>> > MaxSpareThreads 100
>> > ThreadsPerChild 50
>> > MaxRequestsPerChild 0
>>
>> > 1)i am hitting with 1500 concurrent user.is this configuration fine?
>>
>> you encountered the "reached maxclients" condition with MaxClients=1500...
>>
>> whether that is expected is up to your app and the traffic
>>
>> if the app hangs or takes a long time to respond, you could reach the
>> maxclients limit regardless
>>
>> if the app is responding appropriately and your machine has capacity,
>> increase maxclients
>>
>> > 3)I HAVE SET startserver 20(means 20 child processes with 50 thread per
>> > child) .but why am getting 2 with following command
>> >
>> > “ps aux | grep http | grep -v “\(root\|grep\)” | wc -l”–>2
>>
>> you set MaxSpareThreads to 100; that's 2 * your ThreadsPerChild
>>
>> don't worry about StartServers
>>
>> notice that your MinSpareThreads and MaxSpareThreads values and the
>> difference between them are a small percentage of MaxClients; if load
>> changes by a very small percentage, child processes will be terminated
>> or started
>>
>> perhaps this preso would help:
>> http://blogs.sun.com/trawick/resource/DeepDive/WebStackDeepDiveApache.pdf
>>
>> > 4)Any other configuration need to do for worker MPM?
>> >
>> > Thanks a lot in advance
>> >
>> > regards
>> > Harsimran
>>
>>
>>
>> --
>> Born in Roswell... married an alien...
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Worker MPM configuration with High Load

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

Thanks for update .I have gone through that Doc.

Above configurations working for me Still i have some specific
questions..:-)
1)Is it good to increase min\maxSparethread for increasing response time?
And what should MaxRequestsPerChild?
2)AJP ports should different for all tomcat worker ?
3)Why apache not complain(no error log) if we provide wrong configurations
in worker properities for particular worker?


Thanks


On Thu, Apr 21, 2011 at 4:50 PM, Jeff Trawick <tr...@gmail.com> wrote:

> On Wed, Apr 20, 2011 at 11:55 PM, Harsimranjit singh Kler
> <si...@gmail.com> wrote:
>
> > ServerLimit 30
> > StartServers 20
> > MaxClients 1500
> > MinSpareThreads 40
> > MaxSpareThreads 100
> > ThreadsPerChild 50
> > MaxRequestsPerChild 0
>
> > 1)i am hitting with 1500 concurrent user.is this configuration fine?
>
> you encountered the "reached maxclients" condition with MaxClients=1500...
>
> whether that is expected is up to your app and the traffic
>
> if the app hangs or takes a long time to respond, you could reach the
> maxclients limit regardless
>
> if the app is responding appropriately and your machine has capacity,
> increase maxclients
>
> > 3)I HAVE SET startserver 20(means 20 child processes with 50 thread per
> > child) .but why am getting 2 with following command
> >
> > “ps aux | grep http | grep -v “\(root\|grep\)” | wc -l”–>2
>
> you set MaxSpareThreads to 100; that's 2 * your ThreadsPerChild
>
> don't worry about StartServers
>
> notice that your MinSpareThreads and MaxSpareThreads values and the
> difference between them are a small percentage of MaxClients; if load
> changes by a very small percentage, child processes will be terminated
> or started
>
> perhaps this preso would help:
> http://blogs.sun.com/trawick/resource/DeepDive/WebStackDeepDiveApache.pdf
>
> > 4)Any other configuration need to do for worker MPM?
> >
> > Thanks a lot in advance
> >
> > regards
> > Harsimran
>
>
>
> --
> Born in Roswell... married an alien...
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Worker MPM configuration with High Load

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Apr 20, 2011 at 11:55 PM, Harsimranjit singh Kler
<si...@gmail.com> wrote:

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

> 1)i am hitting with 1500 concurrent user.is this configuration fine?

you encountered the "reached maxclients" condition with MaxClients=1500...

whether that is expected is up to your app and the traffic

if the app hangs or takes a long time to respond, you could reach the
maxclients limit regardless

if the app is responding appropriately and your machine has capacity,
increase maxclients

> 3)I HAVE SET startserver 20(means 20 child processes with 50 thread per
> child) .but why am getting 2 with following command
>
> “ps aux | grep http | grep -v “\(root\|grep\)” | wc -l”–>2

you set MaxSpareThreads to 100; that's 2 * your ThreadsPerChild

don't worry about StartServers

notice that your MinSpareThreads and MaxSpareThreads values and the
difference between them are a small percentage of MaxClients; if load
changes by a very small percentage, child processes will be terminated
or started

perhaps this preso would help:
http://blogs.sun.com/trawick/resource/DeepDive/WebStackDeepDiveApache.pdf

> 4)Any other configuration need to do for worker MPM?
>
> Thanks a lot in advance
>
> regards
> Harsimran



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org