3

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
</VirtualHost>

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.

2
  • So, could you please share how you fixed it? Oct 11, 2012 at 22:30
  • 1
    add Alias directive to connect static files urls with a directory where your static files are.
    – Evgeny
    Oct 12, 2012 at 6:48

1 Answer 1

2

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.

1
  • with both apache/wsgi and dev server. speed is the same, thanks
    – Evgeny
    Jul 28, 2009 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .