Joker123456789
V2EX  ›  Java

请问 wrk 里的这个指标>0, 如何排查问题

  •  
  •   Joker123456789 · Apr 7, 2021 · 3459 views
    This topic created in 2036 days ago, the information mentioned may be changed or developed.

    用 AIO 做了个 http 服务,wrk 的测试结果如下:

    Running 30s test @  http://127.0.0.1:8088/demo
      12 threads and 400 connections
      Thread Stats   Avg      Stdev     Max   +/- Stdev
        Latency   49.32ms  165.75ms   1.90s    86.66%
        Req/Sec    47.06     30.91   393.00     82.89%
      Latency Distribution
         50%  218.31ms
         75%  520.60ms
         90%  955.08ms
         99%    1.93s 
      4922 requests in 30.06s, 73.86MB read
      Socket errors: connect 0, read 7058, write 0, timeout 0
    Requests/sec:    13478.92
    Transfer/sec:      2.46MB
    

    从结果中可以看出,出现了 Socket errors,read 数量为 7058,特别高。 但是程序一点异常都没报,真的一头雾水。

    有没有大神可以指点一下,可以从哪着手去排查问题?

    6 replies  •  2021-04-08 09:35:52 +08:00
    u2r1Hqo6HExmNsrt
    u2r1Hqo6HExmNsrt
    Apr 7, 2021
    1
    用 wrk 的测试的同时,发个 postman 请求或者 chrome 请求不就知道了吗?
    Joker123456789
    Joker123456789
    OP
    Apr 7, 2021
    2
    @Nillouise 问题就是一点异常都没。 发了也不报错,能正常返回。
    u2r1Hqo6HExmNsrt
    u2r1Hqo6HExmNsrt
    Apr 7, 2021
    3
    @Joker123456789 你在 postman 里看有什么问题呀,不然就是 wrk 出 bug 了呗
    nazor
    nazor
    Apr 7, 2021
    4
    是不是请求没有返回 Connection: close
    InternetExplorer
    InternetExplorer
    Apr 7, 2021
    5
    socket error 应该是 tcp 层的错误吧,连接关闭什么的,把连接数调低点可能就好了
    Joker123456789
    Joker123456789
    OP
    Apr 8, 2021
    6
    @nazor 大老厉害,果然是这个问题。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1901 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:36 · PVG 00:36 · LAX 08:36 · JFK 11:36
    ♥ Do have faith in what you're doing.