Distributed Queue: Expected performance

611 views
Skip to first unread message

jdj

unread,
Mar 25, 2011, 9:43:10 AM3/25/11
to Hazelcast
I'm testing a basic distributed queue implementation using
Hazelcast.
I just want to confirm if the performance I'm getting is anywhere
close to expected default performance figures without going into micro-
benchmarking in order to determine if the Hazelcast implementation
would be a fit for a specific use case.

Test cluster details:
- All members running on a single host
- Using multicast on loopback interface
- Linux 2.6.35
- Java 6
- Dual-core 2.53Ghz

The cluster members implement basic producer / consumer.
Producer: testQueue.put(new TestData("test", "test", i, 100l));
Consumer: TestData td = testQueue.poll(10, TimeUnit.SECONDS);

TestData is a very basic pojo (2 string fields, 1 integer and 1 long)

Consider the following test scenarios with performance figures (in all
these cases I used a "max-size-per-jvm" of 100,000):
1. 1 producer and no consumers: produce 100,000 objects in 4.87s
(+-20,000 per second!)
2. 1 producer and 1 consumer; but the consumer only joins the cluster
without consuming: produce 100,000 objects in 43.82s (+-2,200 per
second)
3. Rate stays about the same when I repeat test 2 with multiple
"idle" consumers.
4. 1 producer and 1 active consumer: produce and consume 100,000
objects in 273.48s (+-365 per second)
5. Rate stays about the same when I repeat test 4 with multiple
"active" consumers.

I basically see 10x slower performance when adding idle consumers and
a further 6x slower if the consumer(s) are actively consuming as well.
CPU is not under any significant load during these tests.

Could someone indicate if this is more or less expected?

Talip Ozturk

unread,
Mar 29, 2011, 4:17:19 AM3/29/11
to haze...@googlegroups.com
Which version of Hazelcast is this? I have done a similar test with
my laptop (macbook pro). I am using the code in trunk. You can try the
latest snapshot if you haven't already.


> 1.  1 producer and no consumers: produce 100,000 objects in 4.87s
> (+-20,000 per second!)

+- 10,000 per second ... your is much better

> 2.  1 producer and 1 consumer; but the consumer only joins the cluster
> without consuming: produce 100,000 objects in 43.82s (+-2,200 per
> second)

3,000 per second.

> 3.  Rate stays about the same when I repeat test 2 with multiple
> "idle" consumers.

Same.

> 4.  1 producer and 1 active consumer: produce and consume 100,000
> objects in 273.48s (+-365 per second)

1,500 per second

> 5.  Rate stays about the same when I repeat test 4 with multiple
> "active" consumers.

Same.

-talip

Reply all
Reply to author
Forward
0 new messages