0

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.

Chris Curvey
  • 359
  • 1
  • 2
  • 8

2 Answers2

1

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.

Graham Dumpleton
  • 5,990
  • 2
  • 20
  • 19
  • 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 04 '10 at 03:50
0

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

Yaroslav
  • 171
  • 1
  • 3