Friday, September 3, 2010

Very slow page load in production with mod_wsgi

Hello,

i experience slow page loads in production using mod_wsgi. The django
debugging toolbar reveals a very high CPU use with lots of voluntary context
switches:

Production (Apache mod_wsgi-3.2, daemon mode, 10 threads):
User CPU time 3580.224 msec
System CPU time 156.010 msec
Total CPU time 3736.234 msec
Elapsed time 3671.237 msec
Context switches 21573 voluntary, 108 involuntary

Same page compared using the dev server:

Development (Django dev server):
User CPU time 90.987 msec
System CPU time 5.999 msec
Total CPU time 96.986 msec
Elapsed time 99.323 msec
Context switches 0 voluntary, 51 involuntary

SQL queries doesn't seem to be the problem. I reduced the number of queries to
1 or 2 using johnny-cache, but the CPU time is still nearly the same as in the
above example.

The load of the server is somewhere around 0.1 to 0.3 so this can't be the
problem either.

Best Regards,
Dirk Eschler

--
Dirk Eschler <eschler@gmail.com>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment