Thanks to all for the useful advices! I've done a profiling with a simple django application and it showed that the bottleneck is flup. My django application often serves big HTML/XML pages (about 1-2 Mb) - in such cases the overhead of FastCGI implemented in python becomes tangible. That's why django application deployed under Apache+FastCGI ot Lighttpd+FastCGI runs slower than under Django development server or Apache+mod_python.
I found the python-fastcgi implementation, which is a wrapper around the Open Market FastCGI C Library/SDK (http://cheeseshop.python.org/ pypi/python-fastcgi). Then i changed django.core.servers.fastcgi to use WSGI server not from flup, but from python-fastcgi. And the performance imporved greatly! It became even faster then Apache +mod_python. Django deployment documentation claims the need of flup as the FastCGI library. Are there any flup features that Django relies on? Is there any experience of deploying Django application with FastCGI but without flup? Alex On 12 мар, 20:32, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > Have you done any profiling to see where your bottlenecks are? There's a > decent set of notes on profiling Django > athttp://code.djangoproject.com/wiki/ProfilingDjangoand an even greater > writeup > athttp://www.rkblog.rk.edu.pl/w/p/django-profiling-hotshot-and-kcachegr.... > > Apache+Mod_Python and Lighttpd+FastCGI have both rendered out (very simple) > pages in the sub 100ms range for me. I'd look to the code and see exactly > where the bottlenecks are happening. > > -joe > > On 3/12/07, Alexander Boldakov <[EMAIL PROTECTED]> wrote: > > > > > Hello all, > > > My django application runs slower under Apache+FastCGI or > > Lighttpd+FastCGI than under django development HTTP server. The > > approximate times for generating the page are 0.6 vs 1.0 seconds for > > FastCGI and development server correspondingly. > > > I've tried different combinations of 'prefork' and 'threaded', unix > > domain socket and tcp socket, manually/web server started fastcgi > > server as described on django FastCGI documentation page, but nothing > > helped. > > > If you have any idea of solving this problem, i will greatly > > appreciate it! > > > Django version is 0.95. Python version is 2.4.4. Apache version is > > 2.2.3. Flup version is 0.5. > > > Alexander Boldakov --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---