netty/netty

Reduce memory footprint of Recyclers

Opened this issue · 4 comments

Currently Recycler(s) uses mpsc queues from JCTools, which:

  • could not be used at all and just relies on the local array queue (it is what happen if the chunk size capacity is good enough - which is 32 by default (see
    pooledHandles = (MessagePassingQueue<DefaultHandle<T>>) newMpscQueue(chunkSize, maxCapacity);
    )
  • being allocated using padded variant of JCTools

I believe things could be improved by both making the allocations of such queues lazy AND using atomic unpadded or unpadded unsafe variant, while allocated.

We just need a new release of JCTools (from the dear @nitsanw) in order to have both the unpadded flavours in (if unsafe isn't present).

Will get to it next week

If I can help and learn how to roll the release I will, Nitsan, just ping me on Gmail/github

jctools was upgraded to 4.0.5 in #14096

Isn't this ticket a duplicate of #12496?