[concurrency-interest] ConcurrentLinkedBlockingQueue vs LinkedBlockingQueue

Gregg Wonderly gregg at cytetech.com
Mon Apr 2 11:14:39 EDT 2007


One of the key issues with -server vs -client is that the number of method 
entries needed before the JIT will compile code.  -client is 1500 while -server 
is usually like 30000.  You can, of course specify -XX:CompileThreshold=100 or 
some such smaller value to get things compiled faster.  That may, or may not 
actually help show you the performance possibilities depending on the JITs analysis.

Gregg Wonderly

Peter Kovacs wrote:
> Hi,
> 
> Dual Xeon, Windows Server 2003:
> 
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> -------------------------------
> LBQ/CLBQ: 0.798385
> -------------------------------
> 
> java version "1.6.0_01"
> Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
> Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
> -------------------------------
> LBQ/CLBQ: 1.68951
> -------------------------------
> 
> Full log files attached.
> 
> Should the "-server" switch not have been specified?
> 
> Thanks
> Peter
> 
> 
> On 4/2/07, Hanson Char <hanson.char at gmail.com> wrote:
> 
>> > Note that Hanson's
>> > ConcurrentLinkedBlockingQueue performs good as well, in fact, I think,
>> > it performs slightly better than the LinkedBlockingQueue.
>>
>> Based on a recent test on Windows XP Professional with 1 CPU,
>> ConcurrentLinkedBlockingQueue performs 83% faster than
>> LinkedBlockingQueue.  Unfortunately I don't have access to a more
>> powerful box (with multi-processors) to do more testings.
>>
>> If anyone does and is interested in the comparison, please download
>> the jar from:
>>
>>     http://beanlib.sourceforge.net/clbq/070401/q-test.jar
>>
>> and run (using jdk6 or jdk5):
>>
>> java -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
>> -XX:+DisableExplicitGC -jar q-test.jar
>>
>> Thanks in advance!
>>
>> (Only if I could gain access to a powerful box with jdk6 installed for
>> 5 minutes!)
>>
>> Hanson Char
>>
>> PS:
>>
>> 1) The source jar of the test harness can be downloaded from
>> http://beanlib.sourceforge.net/clbq/070401/q-test-sources.jar
>> 2) Note the test is based on the SVN revision 168 of
>> ConcurrentLinkedBlockingQueue.java at
>> http://svn.sourceforge.net/viewvc/*checkout*/beanlib/trunk/beanlib/src/net/sf/beanlib/util/concurrent/ConcurrentLinkedBlockingQueue.java?revision=168 
>>
>> 3) I inadvertently introduced a serious flaw in revision 166.  My 
>> apology.
>>
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest


More information about the Concurrency-interest mailing list