On Apr 1, 2010, at 7:35 AM, Daniel Hilton wrote: > I'm researching the deployment of a new internal app and the ops team > have asked me what type of server the app requires. What I'm looking > for is some advice / guidance on how best to make > use of multi cores in a single machine deployment. > > We are currently running mod_wsgi, postgresql on a single machine. > > What I've read has said that due to GIL you need to run multi-process > mod_wsgi and make use of that to
Hi Dan, I've had some really good performance improvements in moving from Apache + mod_wsgi running Django + PostgreSQL to a stack consisting of nginx + gunicorn.py running Django, controlled by supervisord + memcached + pgpool + Postgres, on a single server. The single server has 2 CPUs/4 cores per CPU, and 32GB of RAM, as well as 2 x 15k SAS local hard drives in RAID 1, and 2 fiber channel HBAs to connect to SAN. I'm running 4 processes each of nginx, gunicorn, and pgpool, and am able to serve a few thousand requests per second. I haven't spent a great deal of time benchmarking it or working to improve efficiency much, as I don't anticipate anywhere near that high a load, but I know there's quite a bit of room for further improvement. The reason I chose to move from Apache and mod_wsgi to nginx and gunicorn wasn't necessarily because I couldn't get decent performance out of mod_wsgi, but because the nginx + gunicorn stack scales down for use on a small VM really well, as well as scaling up and out easily. That way I can use one stack for all cases, just increase the number of processes as the server scales up. Your ops folks will like that idea. What the ops folks won't like so much is that gunicorn is a very speedy moving target. But if you use pip to install it, and pip -U to keep on top of new releases, you'll be fine. The above server runs us about $5k, your mileage will inevitably vary. If you don't require SAN, you can chop ~$1500 off by dropping the HBAs. Hope that helps, ---Peter Herndon -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.