hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Gregorczyk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6619) Do no unregister and re-register interest ops in RPC
Date Mon, 20 Aug 2012 20:47:38 GMT

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

Michal Gregorczyk commented on HBASE-6619:
------------------------------------------

It is event for which we are waiting on file descriptor. We do reads in asynchronous way.
We have one thread (Listener) waiting on set of file descriptors (connections). Every time
there is something to read from connection we first deregister interest in read operation
on that descriptor and then pass it to another thread to do read. When read operation is done,
the thread parses new data and after queueing new Call object it registers read interest on
that descriptor again. It involves calling SelectionKey.interestOps(int) (which according
to documentation can block, but does not have to - implementation dependent), and waking up
Listener thread. After that we can read from the connection again.

To improve performance we can do 2 things: 
1. do something not to register and deregister interest in read
2. parse new data in handler thread, instead of thread that performs read operation.
                
> Do no unregister and re-register interest ops in RPC
> ----------------------------------------------------
>
>                 Key: HBASE-6619
>                 URL: https://issues.apache.org/jira/browse/HBASE-6619
>             Project: HBase
>          Issue Type: Bug
>          Components: ipc
>            Reporter: Karthik Ranganathan
>            Assignee: Michal Gregorczyk
>
> While investigating perf of HBase, Michal noticed that we could cut about 5-40% (depending
on number of threads) from the total get time in the RPC on the server side if we eliminated
re-registering for interest ops.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message