org.mentaqueue.test.producer
Class TestAll
java.lang.Object
org.mentaqueue.test.producer.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.producer.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.producer.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 => 1 nanoseconds/message
2: AtomicQueue => 6 nanoseconds/message
3: VolatileQueue => 12 nanoseconds/message (2.0x)
4: AtomicQueue (*) => 51 nanoseconds/message (8.5x)
5: VolatileQueue (*) => 71 nanoseconds/message (11.83x)
6: SynchronizedQueue => 79 nanoseconds/message (13.17x)
7: ConcurrentLinkedQueue (*) => 103 nanoseconds/message (17.17x)
8: ConcurrentLinkedQueue => 105 nanoseconds/message (17.5x)
9: LockedQueue => 111 nanoseconds/message (18.5x)
10: BlockingLinkedQueue => 235 nanoseconds/message (39.17x)
11: SynchronizedQueue (*) => 258 nanoseconds/message (43.0x)
12: BlockingLinkedQueue (*) => 272 nanoseconds/message (45.33x)
13: LockedQueue (*) => 274 nanoseconds/message (45.67x)
14: ConcurrentArrayQueue => 403 nanoseconds/message (67.17x)
15: ConcurrentArrayQueue (*) => 448 nanoseconds/message (74.67x)
(*) => 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
Final results:
1: BrokenFastQueue => 3 nanoseconds/message
2: AtomicQueue => 15 nanoseconds/message
3: AtomicQueue (*) => 23 nanoseconds/message (1.53x)
4: VolatileQueue => 27 nanoseconds/message (1.8x)
5: SynchronizedQueue => 36 nanoseconds/message (2.4x)
6: VolatileQueue (*) => 41 nanoseconds/message (2.73x)
7: LockedQueue => 56 nanoseconds/message (3.73x)
8: SynchronizedQueue (*) => 118 nanoseconds/message (7.87x)
9: ConcurrentLinkedQueue (*) => 150 nanoseconds/message (10.0x)
10: ConcurrentLinkedQueue => 170 nanoseconds/message (11.33x)
11: LockedQueue (*) => 174 nanoseconds/message (11.6x)
12: BlockingLinkedQueue (*) => 278 nanoseconds/message (18.53x)
13: ConcurrentArrayQueue => 294 nanoseconds/message (19.6x)
14: BlockingLinkedQueue => 324 nanoseconds/message (21.6x)
15: ConcurrentArrayQueue (*) => 363 nanoseconds/message (24.2x)
(*) => 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
- Author:
- Sergio Oliveira Jr.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestAll
public TestAll()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2012. All Rights Reserved.