[
https://issues.apache.org/jira/browse/HBASE-21916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771620#comment-16771620
]
Zheng Hu commented on HBASE-21916:
----------------------------------
bq. How do I extract info on how well the allocator is doing? Perhaps I have to
up sizes? Are there logs or metrics I'd look at?
Yeah, I think so, not implement this now, but I filed HBASE-21921 to address
this. will resolve it after finished those high priority sub-tasks.
bq. Should ByteBufferCleaner be doing a 'free' rather than a 'clean' of memory
(Should it have a different name?)
Sounds reasonable, did not think of a better name before. ByteBufferCleaner ->
Deallocator and clean -> free looks good to me.
bq. The return of a Pair with the allocation accompanied by the deallocator
seems unnatural. Why can't I call Allocator#free passing in the allocation to
free?
In fact, for those ByteBuffers allocated from allocator in an allocation, not
all of them need an Allocator#free, only for those ByteBuffers allocated from
ByteBuffPool need an free. no need to track those ByteBuffers from pool any
more if we design to return an pair with buffers and dellocator, because the
dellocator tracks them, the pair also remind dev that those buffers must do a
free explicitly.
bq. For another issues, should we be using a pool at all? On a machine with 48
or more CPUs, having them all stall to go via a synchronization block to get a
bit of memory and then to do cleanup might cost more than it saves?
Got your point. yes, it might be. I'll evaluate and tune this after the patch
of HBASE-21879 can work.
Thanks [~stack]
bq. Sure thing.. This and other sub tasks are in my list of review TODOs.. Its
been so busy these days with some internal work and pls pardon for this week..
I will surely come back to this ASAP.
Take your time please, and looking forward to your feedback about those issues.
> Abstract an ByteBuffAllocator to allocate/free ByteBuffer in ByteBufferPool
> ---------------------------------------------------------------------------
>
> Key: HBASE-21916
> URL: https://issues.apache.org/jira/browse/HBASE-21916
> Project: HBase
> Issue Type: Sub-task
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Fix For: 3.0.0, 2.2.0, 2.3.0, 2.1.4
>
> Attachments: HBASE-21916.v1.patch, HBASE-21916.v2.patch,
> HBASE-21916.v3.patch, HBASE-21916.v4.patch, HBASE-21916.v5.patch
>
>
> Now our read/write path allocate ByteBuffer from the ByteBufferPool, but we
> need consider the minSizeForReservoirUse for better utilization, those
> allocate/free api are some static methods, not so good to use.
> For HBASE-21879, we need an universal ByteBuffer allocator to manage all the
> ByteBuffers through the entire read path, so create this issue.
> Will upload a patch to abstract an ByteBufAllocator.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)