I finally got off my butt and have made a new mod_wsgi release. Version 4.8.0.
Highlights are it is faster and shinier.
Seriously, it is faster.
Or to put it another way I was able to tune out some of the overhead around Python global interpreter locking and so for certain classes of applications you may see lower overheads and potential for greater throughput. This isn't going to apply to all applications because I/O bound applications aren't going to benefit as much, and overly CPU bound applications just overload the whole system anyway.
In addition to that, have made some tweaks to how some of the daemon mode options work and when a specific combination of options are used (with loss of those features though), you can reduce those overheads and increase throughput even more.
But wait, there is more. If you really want to show off and don't need the reliability protections that daemon mode is providing when using the mod_wsgi-express default configuration, then you can now with mod_wsgi-express switch to embedded mode. This can be used to dramatically increase potential throughput, but does mean your application needs to be very robust and not prone to hanging or other things which daemon mode can automatically help recover from when set up correctly as mod_wsgi-express does out of the box.
If want to try and compare performance with some WSGI test program, try with the following variations.
Nothing special, only changing number of threads used by the daemon process from default of 5 to 3, as lower number of threads as possible is always better if you are going to try and hammer the web server with requests.
mod_wsgi-express start-server --threads=3 wsgi.py
Disable automatic reloading when WSGI script file is modified, and disable queue timeout as well, to eliminate handshake between Apache child worker processes and daemon process before sending request through.
mod_wsgi-express start-server --threads=3 --disable-reloading --queue-timeout=0 wsgi.py
Switch to embedded mode to eliminate all that overhead of proxying through to the daemon mode processes.
mod_wsgi-express start-server --threads=3 --embedded-mode wsgi.py
The performance improvements came about as a result of looking carefully at a new bunch of statistics one can get out of mod_wsgi on performance. I'll try and do a followup email on those new APIs later once I can get my test setup going again and I can capture some pretty pictures.
Note, always remember that trying to benchmark stuff on macOS is a really bad idea and gives inconsistent results, so use a Linux system instead.