Skip navigation

Twins Father

November 18, 2010 Previous day Next day

[Introduction]

Recently we have done one scale backend messaging processing system. Underlying the thread/concurrent design need one Queue implementation. And I found one interest replacement one "Amino Project" "LockFreeBlockQueue". It mentioned this implementation outperformed than jdk "ConcurrentLinkedQueue".http://www.infoq.com/articles/scalable-java-components. So I think maybe it will help us improve the whole system performance. And this project was based one IBM jdk, so I migrated it to SUN jdk.

 

[Lab Environment]

 

Laptop: Dell E6410

CPU: Intel i5  (with 4 core)

Memory: 4G DDR3

JDK: Sun JDK 1.6 u18

 

//Edit: Forget add OS information

OS: windows XP sp3

 

 

[Testing Senario]

 

start 16 threads currently write string (UUID), each thread will write 200 numbers of string,into the underlying single queue instance, and at them same time start 16 threads concurrently reading the string, each thread will read 200 numbers of string,has been inserted from the same underlying single queue instance.

 

I have tested 5 rounds:

Version

Round1

Get

Round2

Get

Round3

Get

Round4

Get

Round5

Get

LinkedBlockingQueue(JDK)

Max: 97384444

Min:  1117

Avg: 249965.7841

Max: 87218068

Min:  1117

Avg: 310944.5438

Max: 78754143

Min:  1117

Avg: 243207.1484

Max: 79043007

Min:  1117

Avg: 225175.4475

Max: 79446969

Min:  1117

Avg: 185973.6063

LockFreeBlockQueue(Amnio)

Max:94351097

Min:1396

Avg:233762.4281

Max: 143679993

Min:  1117

Avg: 520364.2

Max: 87081459

Min:  1117

Avg: 99177.67844

Max: 79612632

Min:  1117

Avg: 223982.8916

Max: 90056697

Min:  1117

Avg: 280250.0991

 

Note: All the results was NanoSeconds. Only calculate the read operations rather than write operations. Later will add the write operation statistics.

 

[Summary]

Doug Lea had done pretty jobs on the LinkedBlockingQueue, it's performance was stable and could meet most kinds of situation even in high concurrent situations.


Amino project wasn't so bad from the performance testing. But it cannot tell have outporformed than the Sun JDK implementation. But I didn't test on the IBM jdk env, maybe the situation will be changed.

 

And one important change had already made into LinkedBlockingQueue but still not includes with latest JDK 1.6 library. 

http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/LinkedBlockingQueue.java?view=log reversion 1.54

move value allocation outside the lock scope.

 

Later we will testing the latest version of Doug lea

 

[Reference]

1. Doug Lea : http://gee.cs.oswego.edu/dl/concurrency-interest/

2. Amino Project: http://sourceforge.net/projects/amino-cbbs/files/cbbs/1.0/amino-java-src-1.0.tar.gz/download?use_mirror=jaist

Filter Blog

By date:
By tag: