Hello, 

I'm having an hard time understanding the correlation between mod_wsgi 
Daemon Processes and apache mpm_worker (if there is any). 

I'm running a Django application on an Ubuntu 22.04 Apache Server, and I 
would like to optimise the CPU / RAM usage of it, as it looks like when 
there is a hight number of user / requests, the CPU usage is limited to 
around 60%. 


My Apache configuration is currently the following:

WSGIDaemonProcess ipt python-path=virtualenv/lib/python3.7/site-packages 
processes=7 threads=2 display-name=custom-apache
WSGIScriptAlias / conf/wsgi.preprod.py process-group=custom 
application-group=%{GLOBAL}
WSGIApplicationGroup %{GLOBAL}
<Directory conf>
  <Files wsgi.preprod.py>
        Require all granted
        Order allow,deny
        Allow from all
  </Files>
</Directory>

And my MPM conf file (which are the default settings of Apache2):

<IfModule mpm_prefork_module>
StartServers  5
MinSpareServers   5
MaxSpareServers  10
MaxRequestWorkers   150
MaxConnectionsPerChild   0
</IfModule>


I read multiple time this documentation 
https://modwsgi.readthedocs.io/en/master/user-guides/processes-and-threading.html#the-mod-wsgi-daemon-processes
 
but I don't realy understand how the mpm_prefork_module and the 
WSGIDaemonProcess combine with each other and how to tweak the value 
"safely". 

Should I only increase processes and threads at the WSGIDaemonProcess 
without modifying the mpm_prefork_module? Or are both conf related? 

Thanks for your clarification

Emmanuel 

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/d278edf0-017d-4a2b-bf14-98f21b21346bn%40googlegroups.com.

Reply via email to