You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/12/06 10:04:02 UTC

[GitHub] [activemq-artemis] franz1981 edited a comment on pull request #3370: ARTEMIS-3021 OOM due to wrong CORE message memory estimation

franz1981 edited a comment on pull request #3370:
URL: https://github.com/apache/activemq-artemis/pull/3370#issuecomment-739480817


   @gemmellr I suppose that the Netty ByteBuf behaviour in case the buffer is enlarged can (and should) be fixed for AMQP as well:
   TLDR if you got a 32K msg and write a single byte into it, Netty will enlarge it to be the next power of 2 capacity ie 64K, wasting ~50% of its space in case the message will sit on the queue awaiting it to be sent.
   
   I've "solved" this by forcing Netty to know upfront the desired required capacity and use https://netty.io/4.0/api/io/netty/buffer/ByteBuf.html#capacity-int- to size it upfront (instead of `ensureWritable`)


----------------------------------------------------------------
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:
users@infra.apache.org