On Aug 3, 2010, at 9:08 AM, Aljoša Mohorović wrote:

> although i understand that optimization depends on actual hardware and
> priority of other services on system, i hope that (with restrictions
> to specific ec2 instance), it's possible to discuss optimization
> recommendations for this case.
> 
> my current testing instance has this in config:
> <IfModule mpm_worker_module>
>    ServerLimit          64
>    StartServers         32
>    MaxClients           150
>    MinSpareThreads      25
>    MaxSpareThreads      75
>    #ThreadLimit          64
>    ThreadsPerChild      25
>    MaxRequestsPerChild  0
> </IfModule>
> 
> i'm using ab and httpref to test performance but i have very little
> experience with mpm_worker so any tips/recommendations are
> appreciated.
> 
> Aljosa Mohorovic
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/modwsgi?hl=en.
> 

You should probably leave your ThreadLimit in place. This setting cannot be 
changed without a full server stop/start and is put in place as a safety 
precaution/hard upper limit on the number of threads that can be set in 
ThreadsPerChild (which can be changed without a full stop/start) [1].

MPM worker is multiprocess/multithreaded, so these settings will create 32 
worker processes on server start, with each set to have 25 threads each. This 
means you've got 32 processes * 25 threads each which is 800 total threads on 
startup. Given that you've got MaxClients set to 150, this looks like 650 
threads too many. MaxClients should be set to ThreadsPerChild * ServerLimit 
[2]. However, depending on how much RAM you have available for Apache and the 
RAM requirements of your web application, your current ServerLimit may be way 
too high.

As for optimizing, I'm assuming you are running modwsgi in daemon mode. What 
are your modwsgi settings? How much RAM do you have available for Apache? Will 
Apache be serving static requests? Other non-modwsgi applications (PHP, etc.)?


Cheers,
John-Scott


[1] http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadlimit
[2] http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to