[mod_python] Re: Django-mod_python taking time loading libraries

bharath venkatesh bharathv6.project at gmail.com
Wed Dec 23 05:50:39 EST 2009


Hi Graham,

     Thanks for the link it was very informative
*- Technically running embedded mode with prefork MPM should offer the best
performance, especially for machines with many cpus/cores. *
*- just because mod_wsgi embedded mode and prefork MPM may be the fastest
solution out there for Apache*
**
As above lines (from link ) suggests ,can we use mod_wsgi embedded mode and
prefork MPM (as meantioned that it is best ) ?and tune apache not to load
libraries and intialise every thime  (as our apache is already running as
prefork MPM and also our machines are multi core (8 cores) and has 16 AG
Ram)  or we have to use mod_wsgi in daemon mode to pervent huge loading and
intialising time ? but  as daemon mode is used with worker MPM we have to
recompile apache
Thanks,
Bharath


On Wed, Dec 23, 2009 at 3:19 AM, Graham Dumpleton <
graham.dumpleton at gmail.com> wrote:

> 2009/12/23 bharath venkatesh <bharathv6.project at gmail.com>:
> > will mod wsgi in Daemon mode  solve this issue  as loading libraries and
> > initialising is done only once ?
>
> Maybe.
>
> As documented in:
>
>
> http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html
>
> the OP is having problems because of how embedded mode Python
> applications work in Apache. This may be  exacerbated by using prefork
> MPM with Apache. Same issues come up with mod_wsgi embedded mode as
> with mod_python if you do not configure your Apache correctly for fat
> Python web applications. If you are limited in being able to do that
> because Apache is heavily used for static file serving or mod_php, you
> really should use mod_wsgi daemon mode instead as described in that
> post.
>
> Why daemon mode will help is fixed number of persistent processes and
> more specifically defaulting to one process, so you only incur startup
> cost once and not for many processes, or in case of embedded mode also
> not when the processes get recycled as is default for Apache.
>
> Graham
>
> > On Tue, Dec 22, 2009 at 5:13 PM, bharath venkatesh
> > <bharathv6.project at gmail.com> wrote:
> >>
> >> Hi,
> >>
> >>     Django with mod python  is taking time loading libraries . I am
> using
> >> python  open source libraries like montylingua , simplejson and django
> is
> >> taking
> >> time loading these libraries .
> >>
> >> When django is run using python manage.py runserver first request takes
> >> time but rest of the requests doesn't take time ( quite fast ) ,which
> is
> >> acceptable but when django is used along with apache and mod_python it
> takes
> >> time as much time as django takes for first request  when run using
> python
> >> manage.py runserver for almost every request.
> >>
> >> How to avoid this as our performance is greatly hindered by this
> behaviour
> >>
> >> is it possible to cache these external open source libraries  ?
> >>
> >> Thanks in Advance,
> >> Bharath
> >
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20091223/cec115bf/attachment.html


More information about the Mod_python mailing list