Closed fengyehong closed 8 years ago
The discussion group is the best place to take this discussion and other usage questions. Thanks!
@fengyehong were we able to solve this
@Deenbandhu-agarwal-ua OP uses basic authentication, which will result in the password hash calculation on every request. Password hashing is computationally intensive by design. I bet that's the reason for the slowdown. To confirm - run the test with token or session auth.
Steps to reproduce
gunicorn -b 0.0.0.0:8000 -w 5 tutorial.wsgi
ab -c 10 -n 1000 -A root:pass123 http://localhost:8000/users/
It seems, with this simplest app, we can only process 110.78 requests per second
4.But if i disable authentication on this viewset, i get a performance boost
5.Benchmarking result:
Look at the difference:
Here is my question:
THX
Test environment: drf: 3.4.0 django: 1.8.12 python: 2.7 OS: centos 7, 4core
And I tried with mysql as database, got the same result.
attached my test project: tutorial.tar.gz