org.mentaqueue.test.messages
Class TestAll

java.lang.Object
  extended by org.mentaqueue.test.messages.TestAll

public class TestAll
extends Object

To run:

 java -Xms1g -Xmx4g -XX:NewSize=512m -XX:MaxNewSize=1024m -DtestNonBatchingQueues=true -cp target/classes org.mentaqueue.test.messages.TestAll 20 5 50 1000 1024
 
 format: java -Xms1g -Xmx4g -XX:NewSize=512m -XX:MaxNewSize=1024m -DtestUncheckedQueues=true -DtestNonBatchingQueues=true -cp target/classes org.mentaqueue.test.messages.TestAll IGNORE OUTLIERS RUNS MESSAGES BUFFER_SIZE
 IGNORE => How many initial runs will be ignored when calculating the average (warmup runs)?
 OUTLIERS => How many best and worst to remove?
 RUNS => How many times to run the test?
 MESSAGES => How many messages to send to the other thread? (in thousands)
 BUFFER_SIZE => How many messages can the buffer hold? (in multiples of 1024)
 

Latest results:

 ******************************************************************
   LINUX
 ******************************************************************
 
 Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
 One physical processor with 6 logical processors
 Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
 Linux soliveira-linux 2.6.32-30-generic x86_64 GNU/Linux
 
 Final results:
 
 1: BrokenFastQueue => 550,000,000 messages/sec
 2: AtomicQueue => 125,892,857 messages/sec
 3: VolatileQueue => 73,901,098 messages/sec (1.7x)
 4: SynchronizedQueue => 47,294,371 messages/sec (2.66x)
 5: LockedQueue => 20,779,463 messages/sec (6.06x)
 6: AtomicQueue (*) => 19,067,488 messages/sec (6.6x)
 7: VolatileQueue (*) => 14,705,882 messages/sec (8.56x)
 8: ConcurrentLinkedQueue => 7,908,385 messages/sec (15.92x)
 9: ConcurrentLinkedQueue (*) => 7,355,664 messages/sec (17.12x)
 10: SynchronizedQueue (*) => 5,606,576 messages/sec (22.45x)
 11: BlockingLinkedQueue => 3,751,337 messages/sec (33.56x)
 12: LockedQueue (*) => 3,261,586 messages/sec (38.6x)
 13: BlockingLinkedQueue (*) => 3,169,477 messages/sec (39.72x)
 14: ConcurrentArrayQueue => 2,469,454 messages/sec (50.98x)
 15: ConcurrentArrayQueue (*) => 2,056,815 messages/sec (61.21x)
 
 (*) => Non-batching mode
 
 Test details:
 
 Warmup iterations per queue: 20
 Outliers ignored (worst and best): 10
 Total number of iterations: 50 (considered: 20)
 Total number of messages sent to the other thread: 1,000,000
 Queue buffer size: 1,048,576
 Also test unchecked queues: false
 Also test non-batching queues: true
 
 ******************************************************************
   MAC OSX
 ******************************************************************
 
 MacBook Pro Intel Core 2 Duo 2.53 GHz
 One physical processor with 2 logical processors
 Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
 Darwin soliveira.local 10.8.0 Darwin Kernel Version 10.8.0 root:xnu-1504.15.3~1/RELEASE_I386 i386
 
 1: BrokenFastQueue => 408,333,333 messages/sec
 2: AtomicQueue => 52,105,262 messages/sec
 3: VolatileQueue => 29,327,730 messages/sec (1.78x)
 4: SynchronizedQueue => 24,825,013 messages/sec (2.1x)
 5: AtomicQueue (*) => 24,779,912 messages/sec (2.1x)
 6: VolatileQueue (*) => 18,675,750 messages/sec (2.79x)
 7: LockedQueue => 17,051,431 messages/sec (3.06x)
 8: ConcurrentLinkedQueue (*) => 6,686,979 messages/sec (7.79x)
 9: ConcurrentLinkedQueue => 6,351,515 messages/sec (8.2x)
 10: SynchronizedQueue (*) => 5,335,418 messages/sec (9.77x)
 11: LockedQueue (*) => 4,251,766 messages/sec (12.25x)
 12: ConcurrentArrayQueue => 3,205,216 messages/sec (16.26x)
 13: BlockingLinkedQueue (*) => 3,101,286 messages/sec (16.8x)
 14: BlockingLinkedQueue => 2,774,668 messages/sec (18.78x)
 15: ConcurrentArrayQueue (*) => 2,261,947 messages/sec (23.04x)
 
 (*) => Non-batching mode
 
 Test details: 
 
 Warmup iterations per queue: 20
 Outliers ignored (worst and best): 10
 Total number of iterations: 50 (considered: 20)
 Total number of messages sent to the other thread: 1,000,000
 Queue buffer size: 131,072
 Also test unchecked queues: false
 Also test non-batching queues: true
 

Author:
Sergio Oliveira Jr.

Constructor Summary
TestAll()
           
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestAll

public TestAll()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2012. All Rights Reserved.