Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running Django on Windows under Apache using mod_wsgi, and I think the multi-threaded nature of this setup is causing contention for the Python GIL. I'd like to try running my system under FCGI (so I could get multiple processes), but that requires flup, and flup is not supported under Windows. Although this says that it can be done. But it's very light on details.

Does anyone have a step-by-step on how to do this? Is it even possible? I can use whatever web server (nginx, lighttpd, etc) I want, but it has to be on Windows.

share|improve this question

2 Answers 2

GIL contention will generally only arise if your application is compute bound. If it is like most web applications and is I/O bound or waiting on database queries, it is not usually an issue.

What does your web application actually do? Have you tried optimizing your application and database first? You could be wasting time by targeting the hosting mechanism as usually it is not the bottleneck as far as network performance or even GIL issues.

share|improve this answer
    
I think I am compute-bound (under load, my 4-cpu box reports 25% utilization, my 2-cpu box reports 50% utilization). That said, the more I read about the GIL, the more confused I get. But that's another question. –  Chris Curvey Sep 22 '10 at 11:58
    
But are you compute bound because of a flaw, or is your application truly doing compute intensive calculations? Ignore what load reports show, what do you know of what your application should be doing? As I said, what does your application do? –  Graham Dumpleton Oct 4 '10 at 3:50

Please check this article - Running Django on Windows (with performance tests) It shows how to run Django on Windows on IIS 7

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.