2013/4/16 Gilles <[email protected]> > Hello > > Sorry for the newbie question, but I was wondering: When launching > multiple uWSGI processes, do they all share a single Python > interpreter in RAM? >
It depends on settings, but with defaults master process is started and then all workers are fork()'ed from it. It means that until they modify any pages in memory, they share a single page copy in memory. With --threads you will have threaded workers, so single loaded interpreter will be able to handle more than one request at a time. WIth --lazy-apps whole app is started in each worker as it is spawned. You can also enable KSM for memory deduplication (--ksm option, only on linux). tl;dr uWSGI tries to run python in a way that is memory efficient, but it depends on various factors, including app itself (not everything is thread safe). -- Łukasz Mierzwa
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
