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

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

                Author: ASF GitHub Bot
            Created on: 22/Jul/20 09:26
            Start Date: 22/Jul/20 09:26
    Worklog Time Spent: 10m 
      Work Description: franz1981 commented on pull request #3223:
URL: https://github.com/apache/activemq-artemis/pull/3223#issuecomment-662347163


   @clebertsuconic The fix seems to work fine, but I'm not very proud of the 
solution: if we want to write 128 bytes and the block size is 4096, 
`bufferControl` allocates (or can reuse) a 4096 sized ByteBuffer without 
zeroing it (that's nice), but the journal record still need to zero `4096 - 
128` bytes to save having garbage data on the journal. If we write enough data 
this optimization can save lot of zeroing but cannot eliminate it.  


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 461926)
    Time Spent: 2h  (was: 1h 50m)

> Eliminate zeroing of buffers while writing the ASYNCIO journal
> --------------------------------------------------------------
>
>                 Key: ARTEMIS-2849
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2849
>             Project: ActiveMQ Artemis
>          Issue Type: Test
>          Components: Broker
>            Reporter: Francesco Nigro
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> By default ASYNCIO using TimedBuffer are zeroing the ByteBuffers used to 
> perform the write on the journal: under load TimedBuffer can be big enough 
> that zeroing would cost the same as copying the actual content into it, hence 
> saving the zeroing is quite beneficial to save CPU time and increase IOPS.
> NIO and MAPPED doesn't need it because they already use directly the 
> TimedBuffer's accumulation buffer to perform writes (that's never zeroed, 
> because it already contains the content that they expect to write into the 
> journal), but changing ASYNCIO need to adjust the same calls on NIO and 
> MAPPED for completeness.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to