You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/02/06 08:26:00 UTC

[jira] [Work logged] (ARTEMIS-2239) Zero-copy NIO/MAPPED TimedBuffer

     [ https://issues.apache.org/jira/browse/ARTEMIS-2239?focusedWorklogId=194977&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-194977 ]

ASF GitHub Bot logged work on ARTEMIS-2239:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Feb/19 08:25
            Start Date: 06/Feb/19 08:25
    Worklog Time Spent: 10m 
      Work Description: franz1981 commented on issue #2522: ARTEMIS-2239 Zero-copy NIO/MAPPED TimedBuffer
URL: https://github.com/apache/activemq-artemis/pull/2522#issuecomment-460938230
 
 
   @michaelandrepearce @clebertsuconic 
   I've manged to obtain the CPU flamgegraphs of the time spent on `TimedBuffer::flushBatch` and I see that the changes of this PR save a visible amount of CPU dependent by the accumulated written bytes into `TimedBuffer`.
   This is the flames of `master`:
   ![image](https://user-images.githubusercontent.com/13125299/52328387-ba3d1a80-29ef-11e9-81d9-7cda890a832b.png)
   While with this PR:
   ![image](https://user-images.githubusercontent.com/13125299/52328364-a396c380-29ef-11e9-91b7-3a626c53621a.png)
   
   The violet part represent the CPU cycles spent zeroing the buffer and it's ~20% of the total time spent on `TimedBuffer::flushBuffer`.
   
   As a note: I've mentioned that a further (important) improvement on NIO/MAPPED would be to allow `fdatasync` and the callbacks to be called on an external thread (dedicated, like ASYNCIO on blockedPoll) and it's correct: with a very fast disk `fdatasync` is not that costy, but waking up threads while executing `OperationContextImpl::done` is one of the dominant costs (the 2 bars on the left).
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 194977)
    Time Spent: 5h 20m  (was: 5h 10m)

> Zero-copy NIO/MAPPED TimedBuffer
> --------------------------------
>
>                 Key: ARTEMIS-2239
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2239
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.6.4
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Major
>          Time Spent: 5h 20m
>  Remaining Estimate: 0h
>
> NIO/MAPPED journal types are currently performing the copy of the buffer used on TimedBuffer to accumulate writes, but this copy (and the zeroing of the new buffer) could be avoided, reducing dramatically the CPU usage and latencies during a burst of writes.
> An added benefit of this change is that isn't necessary anymore to stress the thread pool of the file factory, because there is no need to pool the buffer used to perform the write.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)