如何测试 rabbitmq 的性能
答案:2 悬赏:40 手机版
解决时间 2021-11-09 06:48
- 提问者网友:龅牙恐龙妹
- 2021-11-08 13:03
如何测试 rabbitmq 的性能
最佳答案
- 五星知识达人网友:行雁书
- 2021-11-08 14:33
测试 rabbitmq 的性能方法如下:
1、声明7个具有不同属性的queue,分别和名为test_exchage的exchange进行绑定(因为exchange为fanout类型,所以测试代码中的routing_key其实是不起作用的);
2、向exchange发送具有persistent属性的消息(delivery_mode=2);
3、创建7个消费者分别从上述7个queue中获取消息;
4、测试结果如下
1、声明7个具有不同属性的queue,分别和名为test_exchage的exchange进行绑定(因为exchange为fanout类型,所以测试代码中的routing_key其实是不起作用的);
2、向exchange发送具有persistent属性的消息(delivery_mode=2);
3、创建7个消费者分别从上述7个queue中获取消息;
4、测试结果如下
全部回答
- 1楼网友:举杯邀酒敬孤独
- 2021-11-08 14:52
rabbitmq发送:持久化
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:1 cost:10587 count:200000 all_tps:18891 per_thread_tps:2361
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:1 cost:11507 count:200000 all_tps:17380 per_thread_tps:1086
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:40 cost:18128 count:200000 all_tps:11032 per_thread_tps:1379
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:40 cost:20078 count:200000 all_tps:9961 per_thread_tps:622
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:1024 cost:20367 count:200000 all_tps:9819 per_thread_tps:1227
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:1024 cost:35198 count:200000 all_tps:5682 per_thread_tps:355
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:4096 cost:32366 count:200000 all_tps:6179 per_thread_tps:772
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:4096 cost:30131 count:200000 all_tps:6637 per_thread_tps:414
rabbitmq发送:内存
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:1 cost:15237 count:200000 all_tps:13125 per_thread_tps:1640
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:1 cost:25250 count:200000 all_tps:7920 per_thread_tps:495
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:40 cost:21659 count:200000 all_tps:9234 per_thread_tps:1154
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:40 cost:29767 count:200000 all_tps:6718 per_thread_tps:419
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:1024 cost:23179 count:200000 all_tps:8628 per_thread_tps:1078
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:1024 cost:25697 count:200000 all_tps:7783 per_thread_tps:486
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:4096 cost:33315 count:200000 all_tps:6003 per_thread_tps:750
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:4096 cost:44626 count:200000 all_tps:4481 per_thread_tps:280
rabbitmq接收:持久化
rabbitmq receive perf,queue:queue_durable concurrency:8 prefetchCount:1 cost:9732 count:200000 all_tps:20550 per_thread_tps:2568
rabbitmq receive perf,queue:queue_durable concurrency:8 prefetchCount:50 cost:51346 count:200000 all_tps:3895 per_thread_tps:486
rabbitmq receive perf,queue:queue_durable concurrency:8 prefetchCount:1000 cost:54912 count:200000 all_tps:3642 per_thread_tps:455
rabbitmq receive perf,queue:queue_durable concurrency:16 prefetchCount:1 cost:45727 count:200000 all_tps:4373 per_thread_tps:273
rabbitmq receive perf,queue:queue_durable concurrency:16 prefetchCount:50 cost:47320 count:200000 all_tps:4226 per_thread_tps:264
rabbitmq receive perf,queue:queue_durable concurrency:16 prefetchCount:1000 cost:48504 count:200000 all_tps:4123 per_thread_tps:257
rabbitmq接收:内存
rabbitmq receive perf,queue:queue_memory concurrency:8 prefetchCount:1 cost:59068 count:200000 all_tps:3385 per_thread_tps:423
rabbitmq receive perf,queue:queue_memory concurrency:8 prefetchCount:50 cost:59263 count:200000 all_tps:3374 per_thread_tps:421
rabbitmq receive perf,queue:queue_memory concurrency:8 prefetchCount:1000 cost:64494 count:200000 all_tps:3101 per_thread_tps:387
rabbitmq receive perf,queue:queue_memory concurrency:16 prefetchCount:1 cost:62567 count:200000 all_tps:3196 per_thread_tps:199
rabbitmq receive perf,queue:queue_memory concurrency:16 prefetchCount:50 cost:64184 count:200000 all_tps:3116 per_thread_tps:194
rabbitmq receive perf,queue:queue_memory concurrency:16 prefetchCount:1000 cost:64630 count:200000 all_tps:3094 per_thread_tps:193
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:1 cost:10587 count:200000 all_tps:18891 per_thread_tps:2361
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:1 cost:11507 count:200000 all_tps:17380 per_thread_tps:1086
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:40 cost:18128 count:200000 all_tps:11032 per_thread_tps:1379
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:40 cost:20078 count:200000 all_tps:9961 per_thread_tps:622
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:1024 cost:20367 count:200000 all_tps:9819 per_thread_tps:1227
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:1024 cost:35198 count:200000 all_tps:5682 per_thread_tps:355
rabbitmq send perf,exchange:exchange_durable concurrency:8 bodySize:4096 cost:32366 count:200000 all_tps:6179 per_thread_tps:772
rabbitmq send perf,exchange:exchange_durable concurrency:16 bodySize:4096 cost:30131 count:200000 all_tps:6637 per_thread_tps:414
rabbitmq发送:内存
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:1 cost:15237 count:200000 all_tps:13125 per_thread_tps:1640
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:1 cost:25250 count:200000 all_tps:7920 per_thread_tps:495
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:40 cost:21659 count:200000 all_tps:9234 per_thread_tps:1154
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:40 cost:29767 count:200000 all_tps:6718 per_thread_tps:419
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:1024 cost:23179 count:200000 all_tps:8628 per_thread_tps:1078
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:1024 cost:25697 count:200000 all_tps:7783 per_thread_tps:486
rabbitmq send perf,exchange:exchange_memory concurrency:8 bodySize:4096 cost:33315 count:200000 all_tps:6003 per_thread_tps:750
rabbitmq send perf,exchange:exchange_memory concurrency:16 bodySize:4096 cost:44626 count:200000 all_tps:4481 per_thread_tps:280
rabbitmq接收:持久化
rabbitmq receive perf,queue:queue_durable concurrency:8 prefetchCount:1 cost:9732 count:200000 all_tps:20550 per_thread_tps:2568
rabbitmq receive perf,queue:queue_durable concurrency:8 prefetchCount:50 cost:51346 count:200000 all_tps:3895 per_thread_tps:486
rabbitmq receive perf,queue:queue_durable concurrency:8 prefetchCount:1000 cost:54912 count:200000 all_tps:3642 per_thread_tps:455
rabbitmq receive perf,queue:queue_durable concurrency:16 prefetchCount:1 cost:45727 count:200000 all_tps:4373 per_thread_tps:273
rabbitmq receive perf,queue:queue_durable concurrency:16 prefetchCount:50 cost:47320 count:200000 all_tps:4226 per_thread_tps:264
rabbitmq receive perf,queue:queue_durable concurrency:16 prefetchCount:1000 cost:48504 count:200000 all_tps:4123 per_thread_tps:257
rabbitmq接收:内存
rabbitmq receive perf,queue:queue_memory concurrency:8 prefetchCount:1 cost:59068 count:200000 all_tps:3385 per_thread_tps:423
rabbitmq receive perf,queue:queue_memory concurrency:8 prefetchCount:50 cost:59263 count:200000 all_tps:3374 per_thread_tps:421
rabbitmq receive perf,queue:queue_memory concurrency:8 prefetchCount:1000 cost:64494 count:200000 all_tps:3101 per_thread_tps:387
rabbitmq receive perf,queue:queue_memory concurrency:16 prefetchCount:1 cost:62567 count:200000 all_tps:3196 per_thread_tps:199
rabbitmq receive perf,queue:queue_memory concurrency:16 prefetchCount:50 cost:64184 count:200000 all_tps:3116 per_thread_tps:194
rabbitmq receive perf,queue:queue_memory concurrency:16 prefetchCount:1000 cost:64630 count:200000 all_tps:3094 per_thread_tps:193
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯