3👍
Make sure keep-alive is off.
More processes and single-threaded I have seen better performance where CPU is the limiting factor; try processes=4 threads=1
.
2👍
The best way to tweak mod_wsgi is to not use it 🙂
First: I don’t think your problem is the web server: with mod_wsgi you can get hundreds requests/s. You can get better results with caching and with DB connection pooling. If you’re using postgres, take a look at pgpool II: http://pgpool.projects.postgresql.org/ .
However, if you want to go deeper into wsgi web servers, read carefully this nice benchmark: http://nichol.as/benchmark-of-python-web-servers .
If you don’t need asyncronous workers, gunicorn is a good choice. It’s very easy to setup (you can run it with manage.py run_gunicorn) and it’s pretty fast. If you want to be sure that mod_wsgi is not the cuprit, try it. If you want better performance go with gevent or uWSGI.
But the Web Server won’t change your benchmark: you can go from 4 req/s to 4.01 req/s.
- [Django]-Django retrieval of list of files in S3 bucket
- [Django]-Django and VueJS integration error. Error loading VueJS component to Django
- [Django]-Passing arguments into partials automatically
- [Django]-Prevent skip in docker-compose
- [Django]-Is this the correct way of making primary keys in django?