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

chuqingq · · 5817 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

sudo taskset -c 1 ./wrk -c1 -t1 -d30 http://localhost/hello

wrk+nginx(helloworld module)
    sudo taskset -c 0 sbin/nginx
    nginx: cpu:76%
    wrk: cpu:70%
    Running 30s test @ http://localhost/hello
      1 threads and 1 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    61.55us   27.57us   4.30ms   99.28%
        Req/Sec    11.58k   682.50    14.44k    76.94%
      325276 requests in 30.00s, 48.69MB read
    Requests/sec:  10842.55
    Transfer/sec:      1.62MB

wrk+golang (77%)
    nginx: cpu:70%
    wrk: cpu:47%
    Running 30s test @ http://localhost/hello
      1 threads and 1 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    95.75us  122.18us  17.59ms   99.33%
        Req/Sec     8.77k   665.39     9.78k    68.18%
      247829 requests in 30.00s, 35.92MB read
    Requests/sec:   8261.07
    Transfer/sec:      1.20MB

wrk+nodejs (79%)
    sudo taskset -c 0 nodejs nodejs_httpserver.js
    nodejs: cpu:99%
    wrk: cpu:42%
    Running 30s test @ http://localhost/hello
      1 threads and 1 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    95.52us   56.77us   6.41ms   99.50%
        Req/Sec     9.03k   632.66     9.78k    93.76%
      255071 requests in 30.00s, 31.38MB read
    Requests/sec:   8502.58
    Transfer/sec:      1.05MB

有疑问加站长微信联系(非本文作者)

本文来自:开源中国博客

感谢作者:chuqingq

查看原文:用wrk对golang/nodejs/nginx做性能测试对比

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

5817 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传