hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-2910) Throttle IPC Client/Server during bursts of requests or server slowdown
Date Mon, 17 Mar 2008 23:39:24 GMT

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

Doug Cutting commented on HADOOP-2910:
--------------------------------------

On second thought, it won't cause busy-wait, but rather, since the key is removed from the
selector, readAndProcess() won't be called again until more data arrives for that connection.
 Instead, the connection should be re-registered when the callQueue size is back within range.
 So perhaps we need a queue of connections that have unread input that we put things into
when the call queue is full, then pop them off later when the queue empties.  Of course, that
would defeat the purpose of this patch...

Also, shouldn't we avoid accepting new connections when the queue is full too?


> Throttle IPC Client/Server during bursts of requests or server slowdown
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-2910
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2910
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 0.16.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.17.0
>
>         Attachments: callQueue.patch
>
>
> I propose the following to avoid an IPC server being swarmed by too many requests and
connections
> 1. Limit call queue length or limit the amount of memory used in the call queue. This
can be done by including the size of a request in the header and storing unmarshaled requests
in the call queue. 
> 2. If the call queue is full or queue buffer is full, stop reading requests from sockets.
So requests stay at the server's system buffer or at the client side and thus eventually throttle
the client. 
> 3. Limit the total number of connections. Do not accept new connections if the connection
limit is exceeded. (Note: this solution is unfair to new connections.) 
> 4. If receive out of memory exception, close the current connection. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message