How much memory (RAM) does Django use?

/*--- holy mAcar00ns!! --- */

I've been trying to answer that question because I've been looking at web hosts and trying to figure out what would be sufficient. The names that keep coming up for Django hosting are Webfaction and Slicehost. Slicehost offers a 256MB RAM slice for $20/month and Webfaction offers 80MB of RAM for $9.50.

So 80MB of RAM for $9.50 or 256MB for $20? Well it would seem like Slicehost is the better deal since you're getting 3x as much RAM for only double the price. Both offer 10GB of disk space, but Webfaction gives you 6x more bandwidth (600GB).

How much memory do you need for a Django app?

This interesting thread says a 256MB slice on Slicehost would be fine for "3,000-10,000 uniques (20,000-50,000 pageviews) daily":

I would bet that you'd do fairly well with a 256 Slice as long as you've got good caching and a well-tuned database. It's also beneficial to strip down your Apache config to the bare minimum you need.


This other fellow has two small sites and uses only 35MB:

I have two small sites that share a lot of code running on a webfaction account.
With ServerLimit 1 and media hosted on the main apache instance (which doesn't
count against me for RAM usage), I stay pretty constant at 32-35MB. I don't
think it would be possible to get much lower than that. Libraries have to get
loaded somewhere, afterall.


One guy doing a test for his Django app concludes that he can support 163,000 users with a 256MB RAM slice from Slicehost (running Debian Etch):

If the distribution of user requests over time was perfectly balanced (hint: it won’t be), that means 340 users (17 * 20) could be using the site each minute. To continue with this unrealistic example, we could say there are 1440 minutes in a day and each user is on the site for three minutes per day, so the site could handle about 163,000 users. That would be very good for a $20/month VPS!

To reign in those numbers a bit, lets say we handle 200 concurrent users in a minute for 6 hours per day, 100 concurrent users for another 6 hours and 10 concurrent users for the remaining 12 hours. That’s still around 115,000 users the site could handle in a day given the maximum load of 17 requests per second.


A basic Hello World Django "app" is said to use up 28MB of RAM, according to this support thread on the WebFaction forum. An administrator there says, "If you set ServerLimit to 1 in your httpd.conf you should be able to deploy 3 Django projects on a shared 1 plan."

Shared 1 would be Webfaction's $9.50/month plan.

Bottom line is that deploying a Django or Rails application is more expensive than a PHP application, but it's generally considered a worthwhile tradeoff if you're developing the site yourself.

It wouldn't make sense though if you're a non-programmer and use an off the shelf CMS written in Python or Ruby, because much better PHP alternatives exist and they are also much cheaper to deploy.

all your bases ar--

ping moi pleeez


About this entry

pacman is coming

nuck nuck

e belong to us!