我正在做一些ironmq发送500条消息的负载测试,然后消费它们。
到目前为止,我能够在本地机器上使用ironAWSEUWest发送16条消息的pr. sec并消耗(读取/删除)大约5条消息的pr. sec。我使用v. 0.0.18 java客户端sdk。
输出:[l-1) thread #0 - dataset://foo] dataset://foo?produceDelay=5 INFO Sent: 100 messages so far. Last group took: 6066 millis which is: 16,485 messages per second. average: 16,485
[l-1) thread #0 - dataset://foo] dataset://foo?produceDelay=5 INFO Sent: 200 messages so far. Last group took: 6504 millis which is: 15,375 messages per second. average: 15,911
[l-1) thread #0 - dataset://foo] dataset://foo?produceDelay=5 INFO Sent: 300 messages so far. Last group took: 6560 millis which is: 15,244 messages per second. average: 15,682
[thread #1 - ironmq://testqueue] dataset://foo?produceDelay=5 INFO Received: 100 messages so far. Last group took: 17128 millis which is: 5,838 messages per second. average: 5,838
[l-1) thread #0 - dataset://foo] dataset://foo?produceDelay=5 INFO Sent: 400 messages so far. Last group took: 6415 millis which is: 15,588 messages per second. average: 15,659
[l-1) thread #0 - dataset://foo] dataset://foo?produceDelay=5 INFO Sent: 500 messages so far. Last group took: 7089 millis which is: 14,106 messages per second. average: 15,321
[thread #1 - ironmq://testqueue] dataset://foo?produceDelay=5 INFO Received: 200 messages so far. Last group took: 17957 millis which is: 5,569 messages per second. average: 5,7
[thread #1 - ironmq://testqueue] dataset://foo?produceDelay=5 INFO Received: 300 messages so far. Last group took: 18281 millis which is: 5,47 messages per second. average: 5,622
[thread #1 - ironmq://testqueue] dataset://foo?produceDelay=5 INFO Received: 400 messages so far. Last group took: 18206 millis which is: 5,493 messages per second. average: 5,589
[thread #1 - ironmq://testqueue] dataset://foo?produceDelay=5 INFO Received: 500 messages so far. Last group took: 18136 millis which is: 5,514 messages per second. average: 5,574
这是预期吞吐量吗?
当我将负载设置为1000条消息时,我在一次读取一批100条消息时收到零星的错误,然后每次删除一条消息。
[thread #1 - ironmq://testqueue] IronMQConsumer WARN Error occurred during delete of object with messageid : 6033017857819101120. This exception is ignored.. Exchange[Message: <hello>229]. Caused by: [io.iron.ironmq.HTTPException - Message not found]
io.iron.ironmq.HTTPException: Message not found
at io.iron.ironmq.Client.singleRequest(Client.java:194)[ironmq-0.0.18.jar:]
at io.iron.ironmq.Client.request(Client.java:132)[ironmq-0.0.18.jar:]
at io.iron.ironmq.Client.delete(Client.java:105)[ironmq-0.0.18.jar:]
at io.iron.ironmq.Queue.deleteMessage(Queue.java:141)[ironmq-0.0.18.jar:]
似乎delete方法在加载下会失败。
该测试是Ironmq的Camel组件的一部分,可以在这里找到https://github.com/pax95/camel-ironmq
负载测试在这里https://github.com/pax95/camel-ironmq/blob/master/src/test/java/org/apache/camel/component/ironmq/integrationtest/LoadTest.java
网络延迟将与您可以实现的消息速率有很大关系。从AWS数据中心外部来看,您通常会看到每个操作额外花费50-75ms。如果使用并发线程,您将获得更大的吞吐量。此外,我们的公共集群有时会因为负载而变慢,这就是为什么我们的"生产"计划客户转向更快的专业集群的原因。
也就是说,我们对所有集群都进行了非常大的更新,这将显著提高性能和吞吐量。你可以在这里下载一个可安装的版本:http://www.iron.io/mq-enterprise.
乍得