First, let's take a look at the test cloud host
Cpu:
[Email protected]:/tmp/webbench-1.5cat /proc/cpuinfo | grep Modelmodel the model name : Intel (R) Core (TM) i5-4260U1. 40ghz[email protected]:/tmp/ webbench-1.5#
Mem:
[Email protected]:/tmp/webbench-1.5 free-m total used free shared buffers cachedmem: 490 364 3 a 103-/+ Buffers/cache: 219 Swap: 509 208 301
Two. Test comparison
The test tool is webbench.
- The following is the performance of Django's own Wsgi webserver
[Email protected]:/tmp/webbench-1.5# webbench-c --T -http//115.28.21.25:8008/Webbench-simple Web Benchmark1.5Copyright (c) Radim Kolar1997-2004, GPL Open Source Software.Benchmarking:GET http://115.28.21.25:8008/ -Clients, running -sec. speed=554Pages/min,129959bytes/sec. Requests:277Susceed,0Failed.
will probably be able to withstand the 20-way concurrency, and when it goes up to 25, a failed request begins.
- The following replaces the WSGI server with Uwsgi+nginx
[Email protected]:/tmp/webbench-1.5# webbench-c the-T -http//115.28.21.25:8000/Webbench-simple Web Benchmark1.5Copyright (c) Radim Kolar1997-2004, GPL Open Source Software.Benchmarking:GET http://115.28.21.25:8000/ theClients, running -sec. speed=640Pages/min,126746bytes/sec. Requests: theSusceed,0Failed.
Probably able to withstand the 170-way concurrency, the effect is obvious, when the request continues to rise, will start to appear the failure request.
Performance comparison of Django's own WSGI server vs Deployment Uwsgi+nginx