GithubHelp home page GithubHelp logo

wsbench's People

Contributors

buexplain avatar lxzan avatar rfyiamcool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wsbench's Issues

关于改进echo模式的压测逻辑的建议

现在的echo模式压测,相同参数下,每次测试的结果,浮动比较大。
具体请看下面的数据:

4:07PM INF Duration=8.9868487s IOPS=11127 P50=2605ms P90=4930ms P99=6451ms
4:07PM INF Duration=9.5169201s IOPS=10507 P50=2020ms P90=3753ms P99=5262ms
4:07PM INF Duration=9.2686362s IOPS=10789 P50=2769ms P90=5058ms P99=6613ms
4:10PM INF Duration=9.0430895s IOPS=11058 P50=2310ms P90=3342ms P99=4190ms

这种情况下,我尝试过调整参数,我想得到一个:连接数量、消息数量都比较大,但是P99又比较理想的IOPS值。
这种IOPS值比较有参考价值。但是目前的压测逻辑做不到,当然不排除我使用姿势不对的可能。
我建议改动一下压测逻辑:

  1. 通过参数numMessage设置一个总消息量
  2. 每个连接都去抢发送消息的资格,抢到就发送,达到总消息量就退出
  3. 每个连接必须等待上一次发送的消息回来后才能再次抢下一个发送的资格

我按上面的逻辑改了一版后,相同的消息总量下,压测数据如下:

3:51PM INF Duration=11.076374s IOPS=9030 P50=132ms P90=379ms P99=520ms
3:51PM INF Duration=10.7231663s IOPS=9325 P50=135ms P90=334ms P99=551ms
3:51PM INF Duration=10.7231663s IOPS=9325 P50=135ms P90=334ms P99=551ms
4:04PM INF Duration=11.2103891s IOPS=8920 P50=120ms P90=432ms P99=628ms

增加echo模式,增加能效比的计算,增加海量连接测试支持

多数实际场景中单个连接的数据交互没有那么多,像tcpkali那种一边按照固定频率不停发的方式,如果设置的频率过大就被server限流close了,不符合实际场景。

计算单位cpu、mem消耗对应的吞吐,相当于能效比

海量连接数需要多端口,如果测试client配置低不适合每个连接一个协程

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.