Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

my mod_wsgi/django app has ~2s response time with or without memcached in-memory caching.

response is the same 2s with or without DNS resolution (i.e. with direct IP request)

for comparison, a simulaneously running mediawiki php process running with APC has sub-second response.

the machine is not out of memory and I can tell that memcached uses up some space.

I've seen the same django app run twice faster on some other machine (of which I unfortunately know little details, but it seems to be running on webfactional) my machine is dedicated host.

here is my apache directive to run the app

<VirtualHost ...:80>
     ServerAdmin ...
     DocumentRoot ...
     ServerName ..
     WSGIScriptAlias / /../wsgi-script.wsgi
     CustomLog ... common
     ErrorLog /.../error_log
     DirectoryIndex index.html

EDIT ok found the source of the problem - wsgi was serving static files and that's what drained the performance. Some Alias-type directives for static content fix the issue.

share|improve this question
So, could you please share how you fixed it? – Afshin Mehrabani Oct 11 '12 at 22:30
add Alias directive to connect static files urls with a directory where your static files are. – Evgeny Oct 12 '12 at 6:48

Are you using the built-in development server? Last time I checked that wasn't really meant for production. Consider using Apache with mod_wsgi if that is the case. Here are the instructions.

share|improve this answer
with both apache/wsgi and dev server. speed is the same, thanks – Evgeny Jul 28 '09 at 17:43

Your Answer


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.