On 10 June 2010 13:18, Graham Dumpleton <[email protected]> wrote:
> On 10 June 2010 13:10, Shady <[email protected]> wrote:
>> I'll have probably six to a dozen scripts once the website is
>> complete, but I can easily see that doubling by the end of next year.
>> Though there will only be one or two scripts which will get extremely
>> large amounts of traffic (my site is a live sports fantasy stat
>> viewer) since they refresh every 30 seconds with new data. Meaning if
>> five people are using my site for viewing one game live, there will be
>> roughly 1500 page views. The page consists of reading a text file of
>> roughly a megabyte, extracting the match data and then the usual
>> formatting (with a few dozen MySQL queries). Obviously this script and
>> the one which collects the data are going to put the most load on the
>> server, so maybe they should have their own separate interpreter while
>> other scripts rely on a couple? The other scripts aren't load
>> intensive at all and deal with only a couple MySQL queries.
>
> You definitely want to avoid Windows if you are getting that sort of
> load. I hope you intend doing some measure of caching of data to avoid
> having to extract data out of that file all the time.
>
> I should point out that a sub interpreter doesn't imply a new process
> as delegation to separate sub interpreters, which is the default, is
> within the same process.
>
> Anyway, sounds like UNIX, Apache with worker MPM and mod_wsgi daemon
> mode is best idea.
>
> The reason for this is that using daemon mode you can delegate
> different applications to process groups of their own and control
> resource usage better by configuring daemon process for more load
> heavy application with more processes and threads. If caching is
> important, then it actually may make sense to use a single process for
> daemon process group as that way you don't have multiple caches being
> maintained in multiple process.
>
> If you are not sure about difference in configuring embedded mode vs
> daemon mode, read:
>
>  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>
>> Now if all of a sudden 6 or 7 people start using my live stat viewer
>> for each game ( ~ 15000 page views and ~ 1 million MySQL queries over
>> three days), I'll probably need to upgrade my server altogether unless
>> I'm underestimating the power of modwsgi and 360mb of VPS RAM.
>>
>> But let's worry about what I can control at the moment. I'm assuming
>> this page ( http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives
>> ) deals with sub interpreters? Not understanding too much of it... Is
>> it the 'WSGIRestrictProcess' section? Is there anyway to see if it's
>> working once I implement it?
>
> Because you aren't doing shared hosting where have to share with
> anyone else, WSGIRestrictProcess is not relevant.

Also perhaps worthwhile reading:

  http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading

to get some background on different process/threading models when
using Apache/mod_wsgi.

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