Comments (14)
在压测代码和接口代码没问题的情况下,不应存在这种情况。目前提供的信息不足以定位问题。
from boomer.
刚才又试了下,
两个slave的情况下,其中一个slave和master放在同一台服务器,另外一个slave在一台机器,此时tps:60-70
如果master在一台独立服务器上,另外两个slave分别放在另外两台服务器上,此时tps:120-130
from boomer.
如果一个slave情况下,slave和master放在同一台服务器,此时tps:120-130.
代码应该没问题,方便的话,您也可以试一下上述场景是否存在类似问题
from boomer.
你看看是不是两个 slave 都收到了压测指令。如果下发了 10 个并发,应该每个 slave 都启动 5 个 goroutine。
from boomer.
都收到了压测指令
A slave:
2018/11/27 15:53:35 Boomer is built with gomq support.
2018/11/27 15:53:35 Boomer is connected to master(192.168.110.28:5557|5558) press Ctrl+c to quit.
2018/11/27 15:54:18 Hatching and swarming 5 clients at the rate 5 clients/s...
B slave(master也在这台机器):
2018/11/27 15:44:33 Boomer is built with gomq support.
2018/11/27 15:44:33 Boomer is connected to master(192.168.110.28:5557|5558) press Ctrl+c to quit.
2018/11/27 15:44:44 Hatching and swarming 5 clients at the rate 5 clients/s...
from boomer.
会不会和这个bind-host有关?
locust -f dummy.py --master --master-bind-host=192.168.110.28 --master-bind-port=5557
go run bankprepay.go --master-host=192.168.110.28 --master-port=5557
from boomer.
关系不大,只要 slave 能连上去就好。可否麻烦在你的环境跑一下,看看是否存在同样的问题。
https://github.com/myzhan/boomer/blob/master/examples/main.go
这个应该是最小例子。
另外,看看是不是有 failure 的情况,因为 failure 不算在 RPS 里面。
from boomer.
可以改一下 boomer 的代码,在这里 https://github.com/myzhan/boomer/blob/master/runner.go#L352 把 data 打印出来,看看 slave 上报的数据是否正常。
from boomer.
使用main.go跑也存在同样问题
机器A:
2018/11/27 16:22:07 Boomer is connected to master(192.168.110.28:5557|5558) press Ctrl+c to quit.
data: map[errors:map[] user_count:0 stats:[] stats_total:map[total_content_length:0 num_reqs_per_sec:map[] method: last_request_timestamp:1543306914 start_time:1543306914 num_requests:0 max_response_time:0 name:Total num_failures:0 total_response_time:0 min_response_time:0 response_times:map[]]]
data: map[stats:[] stats_total:map[start_time:1543306917 num_requests:0 num_failures:0 max_response_time:0 response_times:map[] name:Total method: last_request_timestamp:1543306917 num_reqs_per_sec:map[] total_response_time:0 min_response_time:0 total_content_length:0] errors:map[] user_count:0]
data: map[stats:[] stats_total:map[method: num_reqs_per_sec:map[] total_response_time:0 max_response_time:0 min_response_time:0 name:Total last_request_timestamp:1543306920 start_time:1543306920 num_requests:0 num_failures:0 total_content_length:0 response_times:map[]] errors:map[] user_count:0]
data: map[stats_total:map[last_request_timestamp:1543306923 num_requests:0 total_response_time:0 max_response_time:0 min_response_time:0 total_content_length:0 num_reqs_per_sec:map[] name:Total method: start_time:1543306923 num_failures:0 response_times:map[]] errors:map[] user_count:0 stats:[]]
data: map[stats_total:map[min_response_time:0 total_content_length:0 response_times:map[] num_reqs_per_sec:map[] last_request_timestamp:1543306926 start_time:1543306926 num_failures:0 total_response_time:0 max_response_time:0 name:Total method: num_requests:0] errors:map[] user_count:0 stats:[]]
data: map[stats_total:map[method: last_request_timestamp:1543306929 total_response_time:0 max_response_time:0 total_content_length:0 response_times:map[] num_reqs_per_sec:map[] name:Total start_time:1543306929 num_requests:0 num_failures:0 min_response_time:0] errors:map[] user_count:0 stats:[]]
data: map[user_count:0 stats:[] stats_total:map[method: start_time:1543306932 num_requests:0 num_failures:0 total_response_time:0 min_response_time:0 name:Total last_request_timestamp:1543306932 max_response_time:0 total_content_length:0 response_times:map[] num_reqs_per_sec:map[]] errors:map[]]
data: map[stats:[] stats_total:map[num_reqs_per_sec:map[] method: last_request_timestamp:1543306935 num_requests:0 num_failures:0 max_response_time:0 total_content_length:0 response_times:map[] name:Total start_time:1543306935 total_response_time:0 min_response_time:0] errors:map[] user_count:0]
data: map[user_count:0 stats:[] stats_total:map[name:Total last_request_timestamp:1543306938 num_requests:0 num_failures:0 response_times:map[] num_reqs_per_sec:map[] method: start_time:1543306938 total_response_time:0 max_response_time:0 min_response_time:0 total_content_length:0] errors:map[]]
data: map[stats:[] stats_total:map[name:Total method: start_time:1543306941 total_response_time:0 max_response_time:0 total_content_length:0 last_request_timestamp:1543306941 num_requests:0 num_failures:0 min_response_time:0 response_times:map[] num_reqs_per_sec:map[]] errors:map[] user_count:0]
2018/11/27 16:22:25 Hatching and swarming 5 clients at the rate 5 clients/s...
data: map[stats_total:map[num_reqs_per_sec:map[1543306945:14 1543306946:20] method: start_time:1543306945 num_requests:34 num_failures:51 min_response_time:100 total_content_length:340 response_times:map[100:34] name:Total last_request_timestamp:1543306946 total_response_time:3403 max_response_time:101] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[name:bar error:udp error occurences:51 method:udp]] user_count:5 stats:[map[response_times:map[] num_reqs_per_sec:map[] name:bar num_failures:51 max_response_time:0 total_content_length:0 total_response_time:0 min_response_time:0 method:udp last_request_timestamp:1543306946 start_time:1543306946 num_requests:0] map[name:foo method:http last_request_timestamp:1543306946 num_failures:0 max_response_time:101 num_reqs_per_sec:map[1543306945:14 1543306946:20] start_time:1543306946 num_requests:34 total_response_time:3403 min_response_time:100 total_content_length:340 response_times:map[100:34]]]]
data: map[user_count:5 stats:[map[num_failures:90 total_response_time:0 max_response_time:0 min_response_time:0 num_reqs_per_sec:map[] total_content_length:0 response_times:map[] name:bar method:udp last_request_timestamp:1543306947 start_time:1543306947 num_requests:0] map[num_requests:60 total_content_length:600 name:foo start_time:1543306947 num_failures:0 total_response_time:6006 max_response_time:101 min_response_time:100 response_times:map[100:60] num_reqs_per_sec:map[1543306947:20 1543306948:20 1543306949:20] method:http last_request_timestamp:1543306949]] stats_total:map[method: last_request_timestamp:1543306949 total_content_length:600 response_times:map[100:60] num_reqs_per_sec:map[1543306948:20 1543306949:20 1543306947:20] name:Total num_requests:60 num_failures:90 total_response_time:6006 max_response_time:101 min_response_time:100 start_time:1543306947] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:90]]]
data: map[user_count:5 stats:[map[response_times:map[] num_reqs_per_sec:map[] start_time:1543306950 num_requests:0 num_failures:90 total_response_time:0 min_response_time:0 total_content_length:0 name:bar method:udp last_request_timestamp:1543306950 max_response_time:0] map[num_requests:60 total_response_time:6012 max_response_time:101 min_response_time:100 name:foo method:http start_time:1543306950 response_times:map[100:60] num_reqs_per_sec:map[1543306950:20 1543306951:20 1543306952:20] last_request_timestamp:1543306952 num_failures:0 total_content_length:600]] stats_total:map[max_response_time:101 response_times:map[100:60] num_reqs_per_sec:map[1543306950:20 1543306951:20 1543306952:20] last_request_timestamp:1543306952 num_failures:90 total_response_time:6012 num_requests:60 min_response_time:100 total_content_length:600 name:Total method: start_time:1543306950] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[name:bar error:udp error occurences:90 method:udp]]]
data: map[stats:[map[last_request_timestamp:1543306955 start_time:1543306953 num_requests:60 total_response_time:6008 min_response_time:100 response_times:map[100:60] num_reqs_per_sec:map[1543306953:20 1543306954:20 1543306955:20] name:foo method:http num_failures:0 max_response_time:101 total_content_length:600] map[method:udp last_request_timestamp:1543306953 start_time:1543306953 num_requests:0 total_response_time:0 min_response_time:0 name:bar num_failures:90 max_response_time:0 total_content_length:0 response_times:map[] num_reqs_per_sec:map[]]] stats_total:map[num_requests:60 num_failures:90 max_response_time:101 total_content_length:600 num_reqs_per_sec:map[1543306953:20 1543306954:20 1543306955:20] name:Total last_request_timestamp:1543306955 start_time:1543306953 total_response_time:6008 min_response_time:100 response_times:map[100:60] method:] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:90]] user_count:5]
2018/11/27 16:22:37 Recv stop message from master, all the goroutines are stopped
data: map[errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:33]] user_count:5 stats:[map[last_request_timestamp:1543306956 start_time:1543306956 num_failures:33 max_response_time:0 response_times:map[] num_reqs_per_sec:map[] name:bar method:udp num_requests:0 total_response_time:0 min_response_time:0 total_content_length:0] map[max_response_time:101 min_response_time:100 response_times:map[100:22] num_reqs_per_sec:map[1543306956:20 1543306957:2] name:foo num_requests:22 num_failures:0 total_response_time:2205 total_content_length:220 method:http last_request_timestamp:1543306957 start_time:1543306956]] stats_total:map[last_request_timestamp:1543306957 num_requests:22 total_response_time:2205 min_response_time:100 total_content_length:220 method: start_time:1543306956 num_failures:33 max_response_time:101 response_times:map[100:22] num_reqs_per_sec:map[1543306956:20 1543306957:2] name:Total]]
data: map[stats:[] stats_total:map[num_failures:0 max_response_time:0 min_response_time:0 name:Total method: last_request_timestamp:1543306959 start_time:1543306959 num_requests:0 total_content_length:0 num_reqs_per_sec:map[] total_response_time:0 response_times:map[]] errors:map[] user_count:5]
机器B:
data: map[stats:[] stats_total:map[method: last_request_timestamp:1543306368 total_response_time:0 max_response_time:0 response_times:map[] total_content_length:0 num_reqs_per_sec:map[] name:Total start_time:1543306368 num_requests:0 num_failures:0 min_response_time:0] errors:map[] user_count:0]
2018/11/27 16:12:52 Hatching and swarming 5 clients at the rate 5 clients/s...
data: map[user_count:5 stats:[map[name:bar last_request_timestamp:1543306372 start_time:1543306372 total_response_time:0 total_content_length:0 response_times:map[] method:udp num_requests:0 num_failures:48 max_response_time:0 min_response_time:0 num_reqs_per_sec:map[]] map[num_requests:32 max_response_time:101 min_response_time:100 response_times:map[100:32] num_failures:0 total_response_time:3210 total_content_length:320 num_reqs_per_sec:map[1543306372:12 1543306373:20] name:foo method:http last_request_timestamp:1543306373 start_time:1543306372]] stats_total:map[name:Total method: last_request_timestamp:1543306373 start_time:1543306372 response_times:map[100:32] num_reqs_per_sec:map[1543306372:12 1543306373:20] num_requests:32 num_failures:48 total_response_time:3210 max_response_time:101 min_response_time:100 total_content_length:320] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:48]]]
data: map[stats:[map[num_requests:0 total_response_time:0 min_response_time:0 total_content_length:0 num_failures:90 max_response_time:0 response_times:map[] num_reqs_per_sec:map[] name:bar method:udp last_request_timestamp:1543306374 start_time:1543306374] map[name:foo start_time:1543306374 max_response_time:101 min_response_time:100 num_reqs_per_sec:map[1543306374:20 1543306375:20 1543306376:20] method:http last_request_timestamp:1543306376 num_requests:60 num_failures:0 total_response_time:6013 total_content_length:600 response_times:map[100:60]]] stats_total:map[num_failures:90 total_content_length:600 response_times:map[100:60] num_reqs_per_sec:map[1543306374:20 1543306375:20 1543306376:20] method: last_request_timestamp:1543306376 start_time:1543306374 num_requests:60 total_response_time:6013 max_response_time:101 min_response_time:100 name:Total] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:90]] user_count:5]
data: map[stats:[map[method:udp last_request_timestamp:1543306377 total_response_time:0 total_content_length:0 name:bar num_requests:0 num_failures:90 max_response_time:0 min_response_time:0 response_times:map[] num_reqs_per_sec:map[] start_time:1543306377] map[num_requests:60 total_response_time:6019 max_response_time:101 min_response_time:100 total_content_length:600 response_times:map[100:60] num_reqs_per_sec:map[1543306378:20 1543306379:20 1543306377:20] method:http last_request_timestamp:1543306379 start_time:1543306377 num_failures:0 name:foo]] stats_total:map[total_response_time:6019 max_response_time:101 total_content_length:600 num_reqs_per_sec:map[1543306379:20 1543306377:20 1543306378:20] method: last_request_timestamp:1543306379 start_time:1543306377 num_failures:90 name:Total num_requests:60 min_response_time:100 response_times:map[100:60]] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:90]] user_count:5]
data: map[stats:[map[start_time:1543306380 num_requests:0 total_response_time:0 num_reqs_per_sec:map[] name:bar method:udp last_request_timestamp:1543306380 total_content_length:0 response_times:map[] num_failures:90 max_response_time:0 min_response_time:0] map[min_response_time:100 total_content_length:600 name:foo last_request_timestamp:1543306382 start_time:1543306380 total_response_time:6017 max_response_time:101 method:http num_requests:60 num_failures:0 response_times:map[100:60] num_reqs_per_sec:map[1543306382:20 1543306380:20 1543306381:20]]] stats_total:map[response_times:map[100:60] last_request_timestamp:1543306382 start_time:1543306380 num_requests:60 min_response_time:100 max_response_time:101 total_content_length:600 num_reqs_per_sec:map[1543306380:20 1543306381:20 1543306382:20] name:Total method: num_failures:90 total_response_time:6017] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:90]] user_count:5]
2018/11/27 16:13:04 Recv stop message from master, all the goroutines are stopped
data: map[stats_total:map[method: last_request_timestamp:1543306384 max_response_time:101 min_response_time:100 total_content_length:240 num_reqs_per_sec:map[1543306383:20 1543306384:4] name:Total start_time:1543306383 num_requests:24 num_failures:36 total_response_time:2406 response_times:map[100:24]] errors:map[52ebbeaa7f58867461fbcbec253ddd03:map[method:udp name:bar error:udp error occurences:36]] user_count:5 stats:[map[total_content_length:0 num_reqs_per_sec:map[] start_time:1543306383 num_failures:36 max_response_time:0 num_requests:0 total_response_time:0 min_response_time:0 response_times:map[] name:bar method:udp last_request_timestamp:1543306383] map[method:http last_request_timestamp:1543306384 start_time:1543306383 num_requests:24 min_response_time:100 total_content_length:240 response_times:map[100:24] name:foo num_failures:0 total_response_time:2406 max_response_time:101 num_reqs_per_sec:map[1543306383:20 1543306384:4]]]]
data: map[stats_total:map[start_time:1543306386 max_response_time:0 response_times:map[] num_reqs_per_sec:map[] name:Total last_request_timestamp:1543306386 num_failures:0 total_response_time:0 min_response_time:0 total_content_length:0 method: num_requests:0] errors:map[] user_count:5 stats:[]]
data: map[stats:[] stats_total:map[total_content_length:0 response_times:map[] method: last_request_timestamp:1543306389 start_time:1543306389 min_response_time:0 max_response_time:0 num_reqs_per_sec:map[] name:Total num_requests:0 num_failures:0 total_response_time:0] errors:map[] user_count:5]
from boomer.
你有一台施压机的系统时间不对,其实 slave 是有上报结果的,但是 master 会忽略掉系统时间和自身系统时间差太多的结果。
那个有问题的施压机分了 5 个 goroutine,但是它上报的结果被丢弃了。
其实两种情况,你接口处理的 TPS 都是 120-130 左右。
from boomer.
恩,确实是这个原因
from boomer.
环境因素
from boomer.
环境因素
from boomer.
环境因素
from boomer.
Related Issues (20)
- [Question]请问boomer目前是否为按照func顺序执行? HOT 2
- 请问下在Locust内是支持顺序执行接口的,在boomer中是不支持的吗? HOT 1
- 无论locust使用的是什么版本均提示worker版本过低无法连接 HOT 4
- 多个接口在一个func里执行时能否分开展示在locust中? HOT 4
- 负载变化时导致并发突增 HOT 4
- 运行mian.go文件显示一名旧的(2.0之前的)工作人员试图连接(wei_CD3CE23358F7494BF15286E9573C25D)。那是行不通的 HOT 5
- Standalone mod 运行,控制台输出没有数据 HOT 1
- 能不能加个run-time 运行时间呢 HOT 3
- 求助: UI界面设置host参数无效 HOT 1
- 为什么每次spawn之前要先stop所有的job,而不是像python版那样在已有连接上增加呢? HOT 10
- 如何能Subscribe并处理来自Master的自定义Topic HOT 6
- go get github.com/myzhan/boomer报错 HOT 2
- task可以由master通过mq传过来后,再启动slave压测吗? HOT 4
- untime error: index out of range [299] with length 280 HOT 2
- 启动参数只支持默认的 defaultboomer , 不支持自定义的 NewBoomer HOT 1
- 在 locust 发送 stop 消息时,boomer 偶现 panic 的情况 HOT 3
- 能否增加强行Quit的方式? HOT 3
- 有没有考虑过重构boomer HOT 3
- Onboarding command that fails HOT 1
- 现在能支持到locust最新的哪个版本 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boomer.