Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

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

1 Answer 1

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

 
discard

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.