Dear Graham,

First of all thanks for such a great work and the invaluable support. I 
definitely is very interested in being able to get the metrics from my webpage 
using mod_wsgi. Is there any documentation on this aspects?

Thanks!

Best regards,
Jian

> Den 14. maj 2021 kl. 06.28 skrev Graham Dumpleton 
> <[email protected]>:
> 
> A pretty picture as promised of the sort of metrics you can get out of this 
> new mod_wsgi version without too much effort.
> 
> <PastedGraphic-1.png>
> 
> In this case the change in throughput part way was a result of a switch from:
> 
>     mod_wsgi-express start-server wsgi.py --disable-reloading 
> --queue-timeout=0
> 
> to:
> 
>     mod_wsgi-express start-server wsgi.py --processes=1 --threads=1 
> --embedded-mode
> 
> If you have a serious interest in collecting metrics let me know and I can 
> provide more details.
> 
> Graham
> 
>> On 14 May 2021, at 2:12 pm, Graham Dumpleton <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> I finally got off my butt and have made a new mod_wsgi release. Version 
>> 4.8.0.
>> 
>> Details in:
>> 
>> https://modwsgi.readthedocs.io/en/master/release-notes/version-4.8.0.html 
>> <https://modwsgi.readthedocs.io/en/master/release-notes/version-4.8.0.html>
>> 
>> 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.
>> 
>> Graham
>> 
>> 
> 
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/modwsgi/8AB25786-9F78-466F-8CA7-C64D11D71FE6%40gmail.com
>  
> <https://groups.google.com/d/msgid/modwsgi/8AB25786-9F78-466F-8CA7-C64D11D71FE6%40gmail.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/8BA14FF4-4078-47F7-8610-956D705ECBA0%40gmail.com.

Reply via email to