Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 56081 invoked from network); 6 Aug 2008 07:57:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Aug 2008 07:57:45 -0000 Received: (qmail 30723 invoked by uid 500); 6 Aug 2008 07:57:42 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 30691 invoked by uid 500); 6 Aug 2008 07:57:42 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 30676 invoked by uid 99); 6 Aug 2008 07:57:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 00:57:42 -0700 X-ASF-Spam-Status: No, hits=-1999.8 required=10.0 tests=ALL_TRUSTED,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 07:56:47 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7427A234C193 for ; Wed, 6 Aug 2008 00:56:44 -0700 (PDT) Message-ID: <146705768.1218009404474.JavaMail.jira@brutus> Date: Wed, 6 Aug 2008 00:56:44 -0700 (PDT) From: "dhruba borthakur (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-3856) Asynchronous IO Handling in Hadoop and HDFS In-Reply-To: <993434911.1217374291781.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620166#action_12620166 ] dhruba borthakur commented on HADOOP-3856: ------------------------------------------ Since this is a very core piece of the datanode, it would be nice if the new code can be developed so that it can be switched on/off on demand. > Asynchronous IO Handling in Hadoop and HDFS > ------------------------------------------- > > Key: HADOOP-3856 > URL: https://issues.apache.org/jira/browse/HADOOP-3856 > Project: Hadoop Core > Issue Type: New Feature > Components: dfs, io > Reporter: Raghu Angadi > Assignee: Raghu Angadi > > I think Hadoop needs utilities or framework to make it simpler to deal with generic asynchronous IO in Hadoop. > Example use case : > Its been a long standing problem that DataNode takes too many threads for data transfers. Each write operation takes up 2 threads at each of the datanodes and each read operation takes one irrespective of how much activity is on the sockets. The kinds of load that HDFS serves has been expanding quite fast and HDFS should handle these varied loads better. If there is a framework for non-blocking IO, read and write pipeline state machines could be implemented with async events on a fixed number of threads. > A generic utility is better since it could be used in other places like DFSClient. DFSClient currently creates 2 extra threads for each file it has open for writing. > Initially I started writing a primitive "selector", then tried to see if such facility already exists. [Apache MINA|http://mina.apache.org] seemed to do exactly this. My impression after looking the the interface and examples is that it does not give kind control we might prefer or need. First use case I was thinking of implementing using MINA was to replace "response handlers" in DataNode. The response handlers are simpler since they don't involve disk I/O. I [asked on MINA user list|http://www.nabble.com/Async-events-with-existing-NIO-sockets.-td18640767.html], but looks like it can not be done, I think mainly because the sockets are already created. > Essentially what I have in mind is similar to MINA, except that read and write of the sockets is done by the event handlers. The lowest layer essentially invokes selectors, invokes event handlers on single or on multiple threads. Each event handler is is expected to do some non-blocking work. We would of course have utility handler implementations that do read, write, accept etc, that are useful for simple processing. > Sam Pullara mentioned that [xSockets|http://xsocket.sourceforge.net/] is more flexible. It is under GPL. > Are there other such implementations we should look at? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.