On Thursday, September 9, 2010, virgil.balibanu
<[email protected]> wrote:
>> > At the moment we have around 600 accounts and with inactivity-timeout
>> > we manage with 3 GB RAM, so I would say this is ok, and we will
>> > probably use more servers later, keeping around 300 users per server,
>> > so I think our configuration should work out pretty well. Is there any
>> > way of not keeping each user o a single process?
>>
>> Don't fully understand what you may mean by this last question.
>
>
> Well, we keep one process per process group, and one site per process
> group, so one process per site. I was wondering if I can make more
> than one site run on the same process? I've only seen this
> configuration discussed here, I'm not sure there is any other way of
> doing it, so you can still allocate processed dynamically.

Don't specify:

  WSGIApplicationGroup %{GLOBAL}

ie., allow the default behaviour, and an application will be delegated
to a Python intpreter within the process which is named based on
virtual host name and application mount point.

Thus, if you delegate two sites to the same daemon process group they
will run within two separate sub interpreters within the same process
and more or less be separate.

The only gotcha with that is if you are using third party extension
modules for Python which don't work properly in sub interpreters. For
simple stuff in Django this probably isn't an issue though.

So, what I would suggest is you delegate high volume sites to their
own daemon process group, but after removing WSGIAplicationGroup,
delegate multiple low volume/infrequently visited sites to the same
process group.

Do note that Django sites themselves will take the same amount of
memory, but you do cut back on the number of processes being used and
so reduce how much memory may be taken up by idle processes if sites
are infrequently visited.

Do realize though that where running multiple sites in same process,
that they run as same user. If you control all the code for a site,
that possibly will not be a big deal. You wouldn't want that though if
user supplying code.

Anyway, suggest you go look at the WSGIApplicationGroup directive
documentation on directives page in the wiki.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to