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`:  While with this PR:  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: us...@infra.apache.org With regards, Apache Git Services