tudormunteanu / python-web-perf

Code for testing performance of popular python webservers
0 stars 0 forks source link

Results on Linode box #2

Open tudormunteanu opened 4 years ago

tudormunteanu commented 4 years ago

Updates:

  1. created Ansible script to provision new dev machine. Mostly for quick setup for new remote testing environments. Used them on Linode and to avoid any possible overhead created by containers.

  2. wrote run-bechmark-batch.sh, a basic script to run a sequence of tests in one go.

Results, 50% of requests with uvicorn+sanic are faster, but beyond that response times seem to slow down. 14 out of 100.000 even failed.

Does this mean that async is unfit for web servers?

tudormunteanu commented 4 years ago

@calpaterson I just pushed the results of my runs on a Linode with 2 CPUs and, even if the numbers are far better than on my Mac, the pattern seems similiar to your observations.

Good thing Linode charges by hour, because I've also ran them on a much powerful machine. Same pattern in the results.

See recent commits on more-coroutines branch.

calpaterson commented 4 years ago

Does this mean that async is unfit for web servers?

Unfortunately it seems that way. :cry:

As soon as you get to the point where CPU is in short supply, they perform poorly on latency. More depressingly, flask+gunicorn were not the best sync performers in my tests on throughput either. Bottle and UWSGI were considerably better on throughput though sanic+uvicorn were roughly the best async performers.

It looks like the sync frameworks a strictly better than the async ones.