[Answer]-Stress test on Django makes it slow while there are free system resources

0👍

How many workers of django you are running? Maybe server can’t load to 100% because you are running small amount of workers, but there are many database connections, so most of the time workers are waiting database, and blocking new connections.

1👍

Probably caching is your answer. I don’t know how Django runs on Apache as I run a Gunicorn setup but it makes round trips for every database call.

If you institute some memcache to handle common result sets you should see a large improvement so you don’t have to make trips for each request.

Also, 50 concurrent connection requests at a time seems like a lot. Try to tone it down to 5 or 10 then 25 instead of starting at 50.

Just my opinion.

Leave a comment