I would like to make sure I understand the interaction of Apache and
mod_wsgi configuration parameters with respect to memory usage and
performance correctly. After reading a couple of posts in this group
and at other places, I am still somewhat confused.

Apache (prefork MPM) and mod_wsgi are installed on a small VPS
(serving approx. 1000 pages/day), and mod_wsgi is used in daemon mode
to run Django applications. I tried tinkering with both the MPM
parameters

StartServers 1
MinSpareServers 1
MaxSpareServers 5
MaxClients 50
MaxRequestsPerChild 1000

and the WSGIDaemonProcess options

WSGIDaemonProcess djangoproject user=nobody group=nobody threads=10
maximum-requests=1000 deadlock-timeout=30 inactivity-timeout=100 stack-
size=524288

Switching to mod_wsgi (from mod_python) eliminated the frequent black
zone QoS alerts (othersockbuf) I experienced before. But my server
still reports hitting the yellow zone (approaching the soft limit for
numproc) a couple of times a day (and even the black zone
occasionally). I wonder if I can avoid this without impairing the
responsiveness of the server too much.

As far as I understand, the configuration above allows Apache to
create a maximum of 50 child processes (servers), each of which can
create 10 mod_wsgi threads. Based on this, I assume I could easily
avoid the numproc issue by reducing the value for MaxClients and or
threads. If I reduce the number of MaxClients too much – will the more
frequent creation of child processes affect the memory usage
adversely?

Idle threads are killed after 100 seconds of inactivity, and they are
limited to a stack size of 524288 bytes. Each thread can serve up to
1000 requests, while the child process itself is also limited to 1000
requests (so this configuration probably does not make sense).

Are my assumptions correct, and is there anything else about this
setup which could/should be optimizied? Are there other parameters I
should take into account?

Kind regards,
Jan

-- 
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