用wrk对golang/nodejs/nginx做性能测试对比

前端之家收集整理的这篇文章主要介绍了用wrk对golang/nodejs/nginx做性能测试对比前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. sudo taskset -c 1 ./wrk -c1 -t1 -d30 http://localhost/hello
  2.  
  3. wrk+Nginx(helloworld module)
  4. sudo taskset -c 0 sbin/Nginx
  5. Nginx: cpu:76%
  6. wrk: cpu:70%
  7. Running 30s test @ http://localhost/hello
  8. 1 threads and 1 connections
  9. Thread Stats Avg Stdev Max +/- Stdev
  10. Latency 61.55us 27.57us 4.30ms 99.28%
  11. Req/Sec 11.58k 682.50 14.44k 76.94%
  12. 325276 requests in 30.00s,48.69MB read
  13. Requests/sec: 10842.55
  14. Transfer/sec: 1.62MB
  15.  
  16. wrk+golang (77%)
  17. Nginx: cpu:70%
  18. wrk: cpu:47%
  19. Running 30s test @ http://localhost/hello
  20. 1 threads and 1 connections
  21. Thread Stats Avg Stdev Max +/- Stdev
  22. Latency 95.75us 122.18us 17.59ms 99.33%
  23. Req/Sec 8.77k 665.39 9.78k 68.18%
  24. 247829 requests in 30.00s,35.92MB read
  25. Requests/sec: 8261.07
  26. Transfer/sec: 1.20MB
  27.  
  28. wrk+nodejs (79%)
  29. sudo taskset -c 0 nodejs nodejs_httpserver.js
  30. nodejs: cpu:99%
  31. wrk: cpu:42%
  32. Running 30s test @ http://localhost/hello
  33. 1 threads and 1 connections
  34. Thread Stats Avg Stdev Max +/- Stdev
  35. Latency 95.52us 56.77us 6.41ms 99.50%
  36. Req/Sec 9.03k 632.66 9.78k 93.76%
  37. 255071 requests in 30.00s,31.38MB read
  38. Requests/sec: 8502.58
  39. Transfer/sec: 1.05MB

猜你在找的Go相关文章