GitHub user franz1981 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/981

    ARTEMIS-906 Memory Mapped JournalType

    It adds the memory mapped journal file as a viable option in addition to 
AIO and NIO Journal types.
    
    The implementation is straightforward and pure sync, beside optimisations 
aimed to reduce garbage collection pauses.
    There is by design no support on batch writes/flushes (using a TimedBuffer) 
or async writes (as AIO): async behaviours must (and will) be provided via 
external wrappers, leaving the base implementation simple and single-threaded.
    
    The benchmark (end to end and 
[isolated](https://github.com/franz1981/activemq-artemis/blob/mmap_fix/artemis-journal/src/test/java/org/apache/activemq/artemis/core/io/JournalTptBenchmark.java)
 ) results below shows an advantage in performance of AIO using a default 
configuration with full durable semantics and a huge advantage using MAPPED for 
durable writes with solely process-failure support.
    
    ```text
    ----------------------
    ------END TO END------
    ----------------------
    messageSize = 100 bytes
    
    AIO NO DATA SYNC:                                   925 ops/sec
    MAPPED NO DATA SYNC:                                        9418 ops/sec
    
    AIO with DATA SYNC:                                 710 ops/sec
    MAPPED with DATA SYNC:                                      670 ops/sec
    ```
    [Isolated 
benchmarks](https://github.com/franz1981/activemq-artemis/blob/mmap_fix/artemis-journal/src/test/java/org/apache/activemq/artemis/core/io/SequentialFileTptBenchmark.java)
 on plain SequentialFile implementations show a huge improvement for non 
durable (process failure only) writes while for full durable writes performs on 
par with the AIO version running with default parameters. 
    It leads to the conclusion that the Journal involves the SequentialFile 
implementation in some tasks expecting async behaviours from it and penalizing 
synchronous ones; it will require further investigations.
    
    ```text
    -----------------------
    ----SEQUENTIAL FILE----
    -----------------------
    
    AIO SequentialFile sync writes no datasync:                 1972 ops/sec
    MAPPED SequentialFile sync writes no datasync:              41293903 ops/sec
    
    AIO SequentialFile sync writes with datasync:               1201 ops/sec
    MAPPED SequentialFile sync writes with datasync:    1202 ops/sec
    ```
    Configuration:
    Linux matrix 4.9.3-200.fc25.x86_64 SMP (performance mode)
    Intel® Core™ i7-6820HQ CPU @ 2.70GHz × 8 (Hyper Threading disabled)
    OS's PAGESIZE = 4096 bytes
    SSD: SAMSUNG MZ7LN512HMJP-000L7
    
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/franz1981/activemq-artemis mmap_fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/981.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #981
    
----
commit 846acc715492d10b6846406b5d3fff43c0f18a2b
Author: Francesco Nigro <[email protected]>
Date:   2016-12-16T10:12:22Z

    ARTEMIS-906 Memory Mapped JournalType

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to