[ 
https://issues.apache.org/jira/browse/ARTEMIS-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16151531#comment-16151531
 ] 

ASF GitHub Bot commented on ARTEMIS-1383:
-----------------------------------------

Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1505
  
    @clebertsuconic @tabish121 @gemmellr 
    I've used JMH to perform the burst tests (ie drainInBurst, pollInBurst) and 
an unbounded offer/offerFirst (with pure accumulation, to kill any GC, using a 
huge heap).
    
    ```
    Benchmark                                                              
(qType)   Mode  Cnt         Score           Error   Units
    
    
--------------------------------------------------------------------------------------------------------------------------------
    
    Burst Size 1024
    
    
--------------------------------------------------------------------------------------------------------------------------------
    
    QueueBenchmark.drainInBurst                                       
JcLinkedList  thrpt    5     56196.133 ±      9862.363   ops/s
    QueueBenchmark.drainInBurst:·gc.count                             
JcLinkedList  thrpt    5         4.000                  counts
    QueueBenchmark.drainInBurst:·gc.time                              
JcLinkedList  thrpt    5        17.000                      ms
    
    QueueBenchmark.drainInBurst                                  
ArtemisLinkedList  thrpt    5     41398.925 ±     23173.625   ops/s
    QueueBenchmark.drainInBurst:·gc.count                        
ArtemisLinkedList  thrpt    5         2.000                  counts
    QueueBenchmark.drainInBurst:·gc.time                         
ArtemisLinkedList  thrpt    5         9.000                      ms
    
    QueueBenchmark.drainInBurst                                       
ChunkedQueue  thrpt    5    105927.112 ±     37350.450   ops/s
    QueueBenchmark.drainInBurst:·gc.count                             
ChunkedQueue  thrpt    5           ≈ 0                  counts
    
    QueueBenchmark.drainInBurst                                         
ArrayDeque  thrpt    5    107934.616 ±     32457.204   ops/s
    QueueBenchmark.drainInBurst:·gc.count                               
ArrayDeque  thrpt    5           ≈ 0                  counts
    
    
--------------------------------------------------------------------------------------------------------------------------------
    
    QueueBenchmark.pollInBurst                                        
JcLinkedList  thrpt    5     81885.266 ±     17907.776   ops/s
    QueueBenchmark.pollInBurst:·gc.count                              
JcLinkedList  thrpt    5        13.000                  counts
    QueueBenchmark.pollInBurst:·gc.time                               
JcLinkedList  thrpt    5        10.000                      ms
    
    QueueBenchmark.pollInBurst                                   
ArtemisLinkedList  thrpt    5     63050.521 ±     34661.415   ops/s
    QueueBenchmark.pollInBurst:·gc.count                         
ArtemisLinkedList  thrpt    5        18.000                  counts
    QueueBenchmark.pollInBurst:·gc.time                          
ArtemisLinkedList  thrpt    5        16.000                      ms
    
    QueueBenchmark.pollInBurst                                        
ChunkedQueue  thrpt    5    161280.653 ±     13712.986   ops/s
    QueueBenchmark.pollInBurst:·gc.count                              
ChunkedQueue  thrpt    5           ≈ 0                  counts
    
    QueueBenchmark.pollInBurst                                          
ArrayDeque  thrpt    5    161606.204 ±     16735.474   ops/s
    QueueBenchmark.pollInBurst:·gc.count                                
ArrayDeque  thrpt    5           ≈ 0                  counts
    
    
--------------------------------------------------------------------------------------------------------------------------------
    
    QueueBenchmark.offer                                              
JcLinkedList  thrpt    5   6546939.112 ±  27962028.115   ops/s
    
    QueueBenchmark.offer                                         
ArtemisLinkedList  thrpt    5   7366465.904 ±  31622858.611   ops/s
    
    QueueBenchmark.offer                                              
ChunkedQueue  thrpt    5  41271280.062 ± 155829613.478   ops/s
    
    
--------------------------------------------------------------------------------------------------------------------------------
    
    QueueBenchmark.offerFirst                                         
JcLinkedList  thrpt    5   5911597.446 ±  24163046.423   ops/s
    
    QueueBenchmark.offerFirst                                    
ArtemisLinkedList  thrpt    5   3783064.578 ±  23493857.464   ops/s
    
    QueueBenchmark.offerFirst                                         
ChunkedQueue  thrpt    5  35790062.086 ± 102802329.954   ops/s
    ```
    As can be seen ChunkedQueue performs for fixed sized bursty scenarios like 
an ArrayDeque (ie 1 order of magnitude better than any linked list) and for 
accumulating burst (with no consume involved) one order of magnitude better 
than a linked list (artemis or the Java Collection one).


> Improved Priority queue
> -----------------------
>
>                 Key: ARTEMIS-1383
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1383
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>
> The original PriorityLinkedList implementation is based on a double linked 
> list implementation that suffer of:
> * fragmentation along the heap
> * pointer chasing due to the presence of nodes
> * allocation heavy (ie each add operation forces allocation of nodes)
> * high hidden (ie the nodes) memory footprint that lead to wrong memory 
> estimations
> It is possible to provide a specialized chunked implementation that can 
> address all these issues while providing a better performance (throughput, 
> latency and memory footprint wise).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to