Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 55621 invoked from network); 2 Aug 2007 19:16:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Aug 2007 19:16:16 -0000 Received: (qmail 67295 invoked by uid 500); 2 Aug 2007 19:16:15 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 67272 invoked by uid 500); 2 Aug 2007 19:16:15 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 67263 invoked by uid 99); 2 Aug 2007 19:16:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 12:16:15 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 19:15:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 274597141F5 for ; Thu, 2 Aug 2007 12:15:53 -0700 (PDT) Message-ID: <2263342.1186082153155.JavaMail.jira@brutus> Date: Thu, 2 Aug 2007 12:15:53 -0700 (PDT) From: "dhruba borthakur (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Updated: (HADOOP-1565) DFSScalability: reduce memory usage of namenode In-Reply-To: <11331008.1183661104447.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-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] dhruba borthakur updated HADOOP-1565: ------------------------------------- Status: Patch Available (was: Open) This patch replaces each TreeMap in a directory with an ArrayList. > DFSScalability: reduce memory usage of namenode > ----------------------------------------------- > > Key: HADOOP-1565 > URL: https://issues.apache.org/jira/browse/HADOOP-1565 > Project: Hadoop > Issue Type: Bug > Reporter: dhruba borthakur > Assignee: dhruba borthakur > Attachments: memoryReduction3.patch > > > Experiments have demonstrated that a single file/block needs about 300 to 500 bytes of main memory on a 64-bit Namenode. This puts some limitations on the size of the file system that a single namenode can support. Most of this overhead occurs because a block and/or filename is inserted into multiple TreeMaps and/or HashSets. > Here are a few ideas that can be measured to see if an appreciable reduction of memory usage occurs: > 1. Change FSDirectory.children from a TreeMap to an array. Do binary search in this array while looking up children. This saves a TreeMap object for every intermediate node in the directory tree. > 2. Change INode from an inner class. This saves on one "parent object" reference for each INODE instance. 4 bytes per inode. > 3. Keep all DatanodeDescriptors in an array. BlocksMap.nodes[] is currently a 64-bit reference to the DatanodeDescriptor object. Instead, it can be a 'short'. This will probably save about 16 bytes per block. > 4. Change DatanodeDescriptor.blocks from a SortedTreeMap to a HashMap? Block report processing CPU cost can increase. > For the records: TreeMap has the following fields: > Object key; > Object value; > Entry left = null; > Entry right = null; > Entry parent; > boolean color = BLACK; > and HashMap object: > final Object key; > Object value; > final int hash; > Entry next; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.