thanks Robert for your answer. A little clarification: Do you mean that uwsgi "workers" are in fact different processes? so I don't really have any shared memory space (after the master process forks)? I read somewhere that uwsgi utilizes "copy on write" so my refined question is are changed from master (such as a common variable set from outside that all processes should know about) or from the workers propagate between them? Or is a worker started with each request so I can be sure that state from master is maintained?
---------- Forwarded message ---------- > From: alonn <[email protected]> > To: [email protected] > Cc: > Date: Sat, 5 Jul 2014 11:46:12 +0300 > Subject: [uWSGI] Schooling me about Uwsgi workers, processes and shared > memory space (using uwsgi with djagno and behind nginx with unix socket) > After reading lots and lots of Uwsgi docs I Still don't think I understand > exactly what memory space is shared between uwsgi workers running the web > server. I have some memory based shared config (and configurable from the > outside) everything running Django should have access to. > Are uswgi worker processes a **real** process? if so what memory space is > shared between them? > > Yes, I know I can use redis/memcache etc for inter process communication > but it's both ugly and slower then "in memory". > > Thanks! > > > Twitter:@alonisser <https://twitter.com/alonisser> > LinkedIn Profile <http://www.linkedin.com/in/alonisser> > Facebook <https://www.facebook.com/alonisser> > *Tech blog: *https://medium.com/@alonisser* and the hebrew one: * > 4p-tech.co.il/blog > *Personal Blog:*degeladom.wordpress.com > Tel:972-54-6734469 > > > ---------- Forwarded message ---------- > From: "Roberto De Ioris" <[email protected]> > To: "uWSGI developers and users list" <[email protected]> > Cc: > Date: Sat, 5 Jul 2014 11:28:36 +0200 > Subject: Re: [uWSGI] Schooling me about Uwsgi workers, processes and > shared memory space (using uwsgi with djagno and behind nginx with unix > socket) > > > After reading lots and lots of Uwsgi docs I Still don't think I > understand > > exactly what memory space is shared between uwsgi workers running the web > > server. I have some memory based shared config (and configurable from the > > outside) everything running Django should have access to. > > Are uswgi worker processes a **real** process? if so what memory space is > > shared between them? > > The only two ways (well at least on modern unices) to share memory > mappings between processes is explicitely via mmap() and the MAP_SHARED > flag or using the old sysv shared memory. > > uWSGI uses the first approach (mmap) for caches, queues and sharedareas > (as well as some additional memory structure required by the master but > invisible to workers). So there is no memory shared between workers unless > you use some of this features. > > -- > Roberto De Ioris > http://unbit.it > > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
