Significant overhead on Django apache vs. built-in dev server

笑着哭i 提交于 2019-12-06 09:04:48

Have you considered using NGINX? Its allowed us to have significant performance improvement when running with uwsgi.

Your Apache MPM configuration is broken in various ways and also way overkill for the number of requests you actually allow to flow through to the mod_wsgi daemon process group where your application is actually running. Under load all you are going to do is create a large amount of backlog and long response times because your Django application is not going to be able to keep up as it is starved of the processes/threads needed to handle the load.

Using ab with only 100 requests for a test is also going to distort results as well, as you are likely going to be measure warmup time for Apache as it creates more worker processes. Initially you will also be counting in loading time for your Django application as well.

I would suggest you watch my two PyCon talks which cover Apache/mod_wsgi configuration and the use of performance monitoring to work out where bottlenecks are. That may give you some context as to why you are having problems.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!