Hi,
I'm having a nginx / uwsgi / django server and wanted to get some profiling data to identify bottle necks learn more about where time is consumed (80% dynamic difficult to cache contents, so don't worry too much about serving static contents)


In this question I'm mostly interested in django / python specific profiling.
I posted another question in the uwsgi group for uwsgi specific profiling.


What would be recommended strategies to create decent reports, that can help to pinpoint potentially critical code.


I could add specific profiling features to the server even if they would slow down the system. I'd just enable them for a few days, gather the data and would disable them afterwards.


What statistics do you normally use to identify such issues and how could you get them?

Some measures I can think of:


report of django requests and their execution time
-----------------------------------------------------
Is there already any simple middleware measuring request times.
It might be useful for profiling on test servers.
On the real servers I'd probably use directly the uwsgi logs, which report if I recall correctly already the request time.


individually profile each Django request
------------------------------------------

In django snippets I found a profiling middleware
http://djangosnippets.org/snippets/727/ which seems to print the stats just plainly into the log file. Not sure how one is supposed to create a decent report afterwards.

Alternatively I found a suggestion of using hotshot and save the reports.
https://code.djangoproject.com/wiki/ProfilingDjango
http://packages.python.org/django-extensions/runprofileserver.html

or another profiling middleware reporting for each request at the end of the response. http://www.no-ack.org/2010/12/yet-another-profiling-middleware-for.html

ANy experience with any of above.


number of SQL queries
-----------------------
I know how to visualize the number of sql queries for a page request with django debug toolbar.

I wondered about a good middleware to report this on a view by view basis or on a client by client basis



analyzing these reports.
--------------------------

Any good tools to analyze profiling reports for a django uwsig setup.

At the moment I itnend to view whatever reports manually or with self written scripts, but would be interested inwhat others use.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to