Hi all, as someone already knows threading mode support has been added to uWSGI 0.9.7-dev.
This is a complex/controversial topic, but lot of users already use threading mode with flup (or mod_wsgi) without problems. The main difference is that uWSGI uses the python api only for calling the WSGI function, so the GIL impact is lower that other solutions (expecially for those python-only based) How does it works ? It is very similar to async mode: you choose how many cores workers will have and the system allocate a wsgi_request structure for each core. (yes no locking system needed ;) ) For example, you want to spawn 2 workers with 4 thread cores each: ./uwsgi -M -p 2 --threads 4 -s :3031 -w werkzeug.testapp:test_app Now your uWSGI stack is able to manage 8 concurrent request instead of 2 using posix threads. Problems ? Oh yes, at this stage of development you will find something not working in threading mode, but all will be fixed for the 0.9.7 release. Some "known" problem ? - uwsgi.env still does not work as avery thread will overwrite it - multiple interpreter support is still missing - harakiri must be rewritten as every thread must be monitored - request counters are under race conditions so do not trust their value What flawlessly works (now) ? Threading mode has been successfully tested (and with amazing results) on: Trac 0.12 (4 worker with 8 threads) Plone on repoze (1 worker with 10 threads) Django 1.2.3 (4 worker with 4 threads) Every test-report with threading mode is (very, very, very) wellcomed -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
