You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/01/05 21:50:07 UTC

[GitHub] [apisix] xianshun163 opened a new issue #5966: request help: benchmark results is not so good,what is the problem,help

xianshun163 opened a new issue #5966:
URL: https://github.com/apache/apisix/issues/5966


   ### Issue description
   
   I have see  the  doc  about the benchmark,the result is good: https://apisix.apache.org/docs/apisix/benchmark/
   I try it myself, but  it is not so  good,any one  who can tell me  how to  optimize it.
   Here is my  env:
   I  have three host, and  they are all  4c8g
   host13: I deploy  apisix2.11.0  use the source code
   host14: I use it  to run wrk, the  HTTP benchmarking tool
   host15: I deploy a nginx, as a upstream, and k8s, I also deploy a apisix  as a pod  in  this host
   
   I have not use any plugins, and only config the nginx  as a upstream of the apisix. And the nginx return a string directory
   
   the test result like this:
   wrk  directory call the nginx, qps is 30217
   wrk call the host13 apisix,  qps is 11003.17
   wrk call the host15 apisix, qps is  8002.80
   here is the wrk  detail:
   [root@k8s_test1 data]# ./wrk -t200 -c5000 -d30s  http://172.16.11.15:1980/hello
   Running 30s test @ http://172.16.11.15:1980/hello
     200 threads and 5000 connections
     Thread Stats   Avg      Stdev     Max   +/- Stdev
       Latency   215.86ms  235.20ms   2.00s    88.07%
       Req/Sec   153.61     98.81     1.50k    71.78%
     912979 requests in 30.21s, 302.13MB read
     Socket errors: connect 0, read 4, write 163, timeout 1100
   Requests/sec:  30217.23
   Transfer/sec:     10.00MB
   
   [root@k8s_test1 data]# ./wrk -t200 -c5000 -d30s  http://172.16.11.13:9080/hello
   Running 30s test @ http://172.16.11.13:9080/hello
     200 threads and 5000 connections
     Thread Stats   Avg      Stdev     Max   +/- Stdev
       Latency   449.90ms  298.54ms   2.00s    81.53%
       Req/Sec    55.02     32.43   420.00     67.66%
     332622 requests in 30.23s, 110.40MB read
     Socket errors: connect 0, read 18, write 263, timeout 3732
     Non-2xx or 3xx responses: 548
   Requests/sec:  11003.17
   Transfer/sec:      3.65MB
   
   [root@k8s_test1 data]# ./wrk -t200 -c5000 -d30s  http://172.16.11.15:30980/hello
   Running 30s test @ http://172.16.11.15:30980/hello
     200 threads and 5000 connections
     Thread Stats   Avg      Stdev     Max   +/- Stdev
       Latency   109.96ms   89.03ms   2.00s    93.34%
       Req/Sec   100.90     92.24   717.00     76.64%
     242268 requests in 30.27s, 80.39MB read
     Socket errors: connect 0, read 2712, write 14878, timeout 2282
   Requests/sec:   8002.80
   Transfer/sec:      2.66MB
   
   
   
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.11.0
   - OS (cmd: `uname -a`):centos 7
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] HelloBug0 commented on issue #5966: doc: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
HelloBug0 commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1033698209


   Does this PR mean apisix can generate flame diagrm audomatically? How can I trigger it? @tzssangglass 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] xianshun163 commented on issue #5966: doc: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1006367442


   > 
   
   @juzhiyuan ok,  I can do it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] xianshun163 closed issue #5966: request help: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
xianshun163 closed issue #5966:
URL: https://github.com/apache/apisix/issues/5966


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] juzhiyuan commented on issue #5966: request help: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1006105454


   Hi @xianshun163, may I know if you like to add @membphis's comment to the Benchmark page? then others could also see it :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #5966: request help: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1004579227


   @xianshun163 `./wrk -t200 -c5000 -d30s http://172.16.11.13:9080/hello`
   
   if you want to run the benchmark with 5000 connections, you need to update the https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L238 .
   
   Connections exceeding this number will become short connections.
   
   more doc: http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] xianshun163 commented on issue #5966: doc: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1015394525


   > @xianshun163 `./wrk -t200 -c5000 -d30s http://172.16.11.13:9080/hello`
   > 
   > if you want to run the benchmark with 5000 connections, you need to update the https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L238 .
   > 
   > Connections exceeding this number will become short connections.
   > 
   > more doc: http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
   
   @membphis  ,  do you  know  how to  get the  "Flame diagram",?
   I  use  openresty-systemtap-toolkit  to  do it , but  I can not get the  right  lua parameter, the err  like  this: 
     
   
   [root@k8s_test1 xs]# ./openresty-systemtap-toolkit/ngx-sample-lua-bt -p 44121 --luajit51 -t 20 > tmp.bt
   Unknown option: luajit51
   Usage:
       ngx-sample-lua-bt [optoins]
   
   Options:
       -a <args>           Pass extra arguments to the stap utility.
       -d                  Dump out the systemtap script source.
       -h                  Print this usage.
       -l <count>          Only output <count> most frenquent backtrace samples.
                           (Default to 1024)
       --lua51             Specify that the Nginx is using the standard Lua 5.1.
                           interpreter.
       --luajit20          Specify that the Nginx is using LuaJIT 2.0.
       -p <pid>            Specify the nginx process pid.
       -t <seconds>        Specify the number of seconds for sampling.
   
   Examples:
       ngx-sample-lua-bt --lua51 -p 12345 -t 10
       ngx-sample-lua-bt --luajit20 -p 12345 -t 5 -a '-DMAXACTION=100000'
   [root@k8s_test1 xs]# ./openresty-systemtap-toolkit/ngx-sample-lua-bt -p 44121 --lua51 -t 20 > tmp.bt
   The --lua51 option is specified but seen the LuaJIT library: /usr/local/openresty/luajit/lib/libluajit-5.1.so.2.1.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] xianshun163 commented on issue #5966: request help: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1005605262


   I close the issue now, thanks  every one。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #5966: request help: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1004490842


   ref: https://github.com/apache/apisix/discussions/5950
   
   hi, @laughingyear It seems to be the same confusion and we can merge the discussions here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] HelloBug0 commented on issue #5966: doc: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
HelloBug0 commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1035699064


   > > Does this PR mean apisix can generate flame diagrm audomatically? How can I trigger it? @tzssangglass
   > 
   > this PR is in progress
   
   I see. I will follow it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] xianshun163 commented on issue #5966: request help: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
xianshun163 commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1005604381


   > @xianshun163 `./wrk -t200 -c5000 -d30s http://172.16.11.13:9080/hello`
   > 
   > if you want to run the benchmark with 5000 connections, you need to update the https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L238 .
   > 
   > Connections exceeding this number will become short connections.
   > 
   > more doc: http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
   
   ok, I get it, thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #5966: doc: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1033709498


   > Does this PR mean apisix can generate flame diagrm audomatically? How can I trigger it? @tzssangglass
   
   this PR is in progress


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #5966: doc: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1015454834


   You can refer to this PR: https://github.com/apache/apisix/pull/6136


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] juzhiyuan commented on issue #5966: request help: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1003948317


   Hi @xianshun163, here has one benchmark case from @membphis https://gist.github.com/membphis/137db97a4bf64d3653aa42f3e016bd01
   
   For your question, let's wait for more replies.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] juzhiyuan commented on issue #5966: doc: benchmark results is not so good,what is the problem,help

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #5966:
URL: https://github.com/apache/apisix/issues/5966#issuecomment-1006368241


   Assign to you :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org