用wrk测试nginx/ndoejs/golang

时间:2022-03-26 16:57:45
sudo taskset -c  ./wrk -c1 -t1 -d30 http://localhost/hello

wrk+nginx(helloworld module)
    sudo taskset -c  sbin/nginx
    nginx: cpu:%
    wrk: cpu:%
    Running 30s test @ http://localhost/hello
       threads and  connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    .55us   .57us   .30ms   99.28%
        Req/Sec    .58k   .44k    76.94%
       requests .00s, .69MB read
    Requests/sec:  10842.55
    Transfer/sec:      .62MB

wrk+golang (%)
    nginx: cpu:%
    wrk: cpu:%
    Running 30s test @ http://localhost/hello
       threads and  connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    .75us  .18us  .59ms   99.33%
        Req/Sec     .77k   .78k    68.18%
       requests .00s, .92MB read
    Requests/sec:   8261.07
    Transfer/sec:      .20MB

wrk+nodejs (%)
    sudo taskset -c  nodejs nodejs_httpserver.js
    nodejs: cpu:%
    wrk: cpu:%
    Running 30s test @ http://localhost/hello
       threads and  connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency    .52us   .77us   .41ms   99.50%
        Req/Sec     .03k   .78k    93.76%
       requests .00s, .38MB read
    Requests/sec:   8502.58
    Transfer/sec:      .05MB