hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai Zheng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9955) RPC idle connection closing is extremely inefficient
Date Fri, 13 Sep 2013 05:42:57 GMT

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

Kai Zheng commented on HADOOP-9955:
-----------------------------------

The patch looks great. Could I have some minors or questions:

1. Regarding the following codes, "disconnecting client" could be "disconnected client".
{code}
+          if (c.timedOut(currentTime) && closeConnection(c)) {
             if (LOG.isDebugEnabled())
               LOG.debug(getName() + ": disconnecting client " + c.getHostAddress());
-            closeConnection(c);
}
{code}
2. *numConnections* might not be necessary now in current approach. Instead, connectionSet.size()
could be employed when necessary.
3. *connections* might be a better name for *connectionSet* since we might not need to change
it again when we need to change its type in future as this does.
                
> RPC idle connection closing is extremely inefficient
> ----------------------------------------------------
>
>                 Key: HADOOP-9955
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9955
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: ipc
>    Affects Versions: 2.0.0-alpha, 3.0.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>         Attachments: HADOOP-9955.patch
>
>
> The RPC server listener loops accepting connections, distributing the new connections
to socket readers, and then conditionally & periodically performs a scan for idle connections.
 The idle scan choses a _random index range_ to scan in a _synchronized linked list_.
> With 20k+ connections, walking the range of indices in the linked list is extremely expensive.
 During the sweep, other threads (socket responder and readers) that want to close connections
are blocked, and no new connections are being accepted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message