帧大小如何改变不同大小消息的吞吐量
在测试 RabbitMQ 的性能时,我发现将消息大小增加到约 250 KB 以上后,吞吐量下降得非常快。然后我将帧大小从 256KB 更改为 5MB,并且吞吐量如预期增加。对于较小大小的消息(即大小为 50 KB 的消息),吞吐量也从每秒 700 条消息增加到 1100 条消息。对于大小为 10,000 KB 的消息,它会从每秒 2 条消息增加到 3 条消息。
我的问题是:有人可以向我解释一下消息如何通过网络从客户端传递到代理,反之亦然。如果消息的大小大于帧的大小,那么我猜将会为该消息创建多个帧(这就是为什么,我认为,当帧大小为 256 KB 并且消息大小从 256 KB 增加时,帧大小大幅下降吞吐量)。但是,如果消息的大小约为帧大小的 1/10,那么每个帧现在将保存 10 条消息(如果 10 条消息准备好传送)。
如果是这样,那么如果 10 条消息尚未准备好,那么框架将等待多长时间才能拥有 10 条消息,这意味着必须有一段时间,之后框架将传递当前的任意数量的消息保持。
我想我已经在问题中提出了所有必需的观察结果。热烈欢迎任何帮助。
While testing the performance of RabbitMQ, I found that after increasing the message size above around 250 KB the throughput was decreasing very quickly. Then I changed the frame_size to 5MB from 256KB and I got, as expected increase in the throughput. This increase was also for the message of smaller size i.e. for message of size 50 KB, throughput increases from 700 to 1100 messages per sec. and that for messages of size 10,000 KB it increases from 2 to 3 messages per sec.
My question is : Can somebody explain me how the messages are passed on wire from client to the broker and vice versa. If the size of message is greater than the size of frame then, I guess multiple frames will be made for that message(that's why, I think, when frame size was 256 KB and message size was increased from 256 KB there was large drop in throughput). But if the size of message is say around 1/10th the size of frame, then is it that each frame will be now holding 10 messages (if 10 messages are ready to be delivered).
If it is so, then say if 10 messages are not ready then for how much time the frame will wait so as to have 10 messages, means there has to be some time out after which the frame will deliver any number of message it is currently holding.
I think I have put all required observations in the question. Any help is warmly welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论