V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Joker123456789
V2EX  ›  Java

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

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