hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13819) Make RPC layer CellBlock buffer a DirectByteBuffer
Date Wed, 23 Mar 2016 07:15:25 GMT

    [ https://issues.apache.org/jira/browse/HBASE-13819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207999#comment-15207999

Anoop Sam John commented on HBASE-13819:

5 GB max direct memory is what given I believe..  Ya as I said, if there is no controlling
of the asyn reqs and if the response is on slower side, we may face issues even if it is on
heap also..  As on heap size is bigger, they might not see it as such..   So that sort of
a solution they need to work on for sure.
But here as you can see, they do have many BBs in pool. Like 2000+  And after some time run
the avg running size become 512 KB.  On avg, they do not need more than 16 KB per row and
so per request response..  Still we will use all these bigger sized BBs and those are permanent
pinned in off heap space.
There is one more serious issue.  When the pool has grown to its max capacity wrt max #BBs
in it, still when there are reqs for BB to pool and it can not see a free BB (all are occupied
by other thread's response CellBlock), it will create a BB that too on off heap!   Ya we may
not be pooling this later.   Still IMO these on demand BB creation should not be on off heap
area.   And another reason why [~dvdreddy] test went into out of direct memory space.
So we need  correct this part also IMO..   When we make cell block, try to get a BB from pool.
If not available in pool  (and pool's max BB capacity already reached), make it an on heap
BB.  That is temp and will be thrown away after the socket write..
For this we need 1st make the BB pool with fixed sized BB

> Make RPC layer CellBlock buffer a DirectByteBuffer
> --------------------------------------------------
>                 Key: HBASE-13819
>                 URL: https://issues.apache.org/jira/browse/HBASE-13819
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Scanners
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 2.0.0, 1.3.0
>         Attachments: HBASE-13819.patch, HBASE-13819_branch-1.patch, HBASE-13819_branch-1.patch,
> In RPC layer, when we make a cellBlock to put as RPC payload, we will make an on heap
byte buffer (via BoundedByteBufferPool). The pool will keep upto certain number of buffers.
This jira aims at testing possibility for making this buffers off heap ones. (DBB)  The advantages
> 1. Unsafe based writes to off heap is faster than that to on heap. Now we are not using
unsafe based writes at all. Even if we add, DBB will be better
> 2. When Cells are backed by off heap (HBASE-11425) off heap to off heap writes will be
> 3. When checked the code in SocketChannel impl, if we pass a HeapByteBuffer to the socket
channel, it will create a temp DBB and copy data to there and only DBBs will be moved to Sockets.
If we make DBB 1st hand itself, we can  avoid this one more level of copying.
> Will do different perf testing with changed and report back.

This message was sent by Atlassian JIRA

View raw message