A good place to start is using django-debug-toolbar and taking a look at the
queries generated for each view, so that you know what's taking long. There
are tools for monitoring database performance, but I have no experience with
them, so I'll leave it to other members in this list to make the
recomendations. Maybe go after disk read/write monitoring if you have access
to that?

When possible, moving the big functions in your code to asynchronous celery
tasks [1] will nearly always speed things up.

If you're doing big (hundreds of thousands of rows) db calls, try using DSE
[2]

[1] http://readthedocs.org/docs/django-celery/en/latest/
[2] http://pypi.python.org/pypi/dse


Cheers,
AT


On Wed, Oct 12, 2011 at 10:19 AM, <
[email protected]> wrote:

> **
>
> The django application I am working on is very slow on the server-side, and
> I want to know why.
> The essence is to identify which code-parts of processing one request take
> most time.
>
> The app runs with mod_wsgi on Apache, here is what I tried:
>
> - django-timelog: the information logged is too unspecific and
> high-leveled. I want to know which functions and parts of a view require
> most time. (moreover, analyze_timelog doesn't work here)
> - django-debug-toolbar with profiling from
> http://backslashn.com/post/505601626/ - too fine-grained:
>    I do not want to know that 138752 calls to
> python2.6/posixpath.py:129(islink) take 0.858 seconds. I want to know in
> which views / functions it happens.
> - profiling with wsgiref, like described in
> https://code.djangoproject.com/wiki/ProfilingDjango#no1 - looks like (and
> probably is?) exactly the same output as the django-debug-toolbar with
> profiling: too fine-grained, I want to get an overview, not the pure
> low-level calls.
>
> What is your preferred way to analyze/profile the performance of
> django-applications?
>
> thanks,
> Michael
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" 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/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.

Reply via email to