Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 48243 invoked from network); 5 Oct 2008 06:22:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2008 06:22:41 -0000 Received: (qmail 5872 invoked by uid 500); 5 Oct 2008 06:22:33 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 5835 invoked by uid 500); 5 Oct 2008 06:22:33 -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 5824 invoked by uid 99); 5 Oct 2008 06:22:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Oct 2008 23:22:33 -0700 X-ASF-Spam-Status: No, hits=-1998.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB 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; Sun, 05 Oct 2008 06:21:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5BF23234C211 for ; Sat, 4 Oct 2008 23:21:44 -0700 (PDT) Message-ID: <820793919.1223187704375.JavaMail.jira@brutus> Date: Sat, 4 Oct 2008 23:21:44 -0700 (PDT) From: "Raghu Angadi (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Created: (HADOOP-4346) Hadoop triggers a "soft" fd leak. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hadoop triggers a "soft" fd leak. ---------------------------------- Key: HADOOP-4346 URL: https://issues.apache.org/jira/browse/HADOOP-4346 Project: Hadoop Core Issue Type: Bug Components: io Affects Versions: 0.17.0 Reporter: Raghu Angadi Starting with Hadoop-0.17, most of the network I/O uses non-blocking NIO channels. Normal blocking reads and writes are handled by Hadoop and use our own cache of selectors. This cache suites well for Hadoop where I/O often occurs on many short lived threads. Number of fds consumed is proportional to number of threads currently blocked. If blocking I/O is done using java.*, Sun's implementation uses internal per-thread selectors. These selectors are closed using {{sun.misc.Cleaner}}. Looks like this cleaning is kind of like finalizers and tied to GC. This is pretty ill suited if we have many threads that are short lived. Until GC happens, number of these selectors keeps growing. Each selector consumes 3 fds. Though blocking read and write are handled by Hadoop, {{connect()}} is still the default implementation that uses per-thread selector. Koji helped a lot in tracking this. Some sections from 'jmap' output and other info Koji collected led to this suspicion and will include that in the next comment. One solution might be to handle connect() also in Hadoop using our selectors. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.