Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 93579 invoked from network); 3 Nov 2006 07:09:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Nov 2006 07:09:41 -0000 Received: (qmail 85757 invoked by uid 500); 3 Nov 2006 07:09:52 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 85532 invoked by uid 500); 3 Nov 2006 07:09:51 -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 85523 invoked by uid 99); 3 Nov 2006 07:09:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 23:09:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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 Nov 2006 23:09:39 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C17887142EF for ; Thu, 2 Nov 2006 23:09:18 -0800 (PST) Message-ID: <8046140.1162537758789.JavaMail.root@brutus> Date: Thu, 2 Nov 2006 23:09:18 -0800 (PST) From: "Raghu Angadi (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Commented: (HADOOP-637) ipc.Server has memory leak -- serious issue for namenode server In-Reply-To: <3722659.1161801316587.JavaMail.root@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 [ http://issues.apache.org/jira/browse/HADOOP-637?page=comments#action_12446836 ] Raghu Angadi commented on HADOOP-637: ------------------------------------- I am not sure if we need to use 'allocateDirect' in ipc.Server yet. According to documentation it essentially reduces one copy from native buffer to user buffer. But ipd.Server already copies data from ByteBuffer to local array anyway (in processData()). > ipc.Server has memory leak -- serious issue for namenode server > --------------------------------------------------------------- > > Key: HADOOP-637 > URL: http://issues.apache.org/jira/browse/HADOOP-637 > Project: Hadoop > Issue Type: Bug > Components: ipc > Affects Versions: 0.7.1 > Reporter: Christian Kunz > Assigned To: Raghu Angadi > > In my environment (running a lot of batch processes each of which reads, creates, and deletes a lof of files in dfs) the namenode server can run out of memory rather quickly (in a few hours on a 150 node cluster). The netbeans profiler shows an increasing number of direct byte buffers not garbage collected. The documentation on java.nio.ByteBuffer indicates that their allocation might (and obviously does) happen outside the normal gc-collected heap, and, therefore, it is required that direct byte buffers should only be used for long-lived objects. > ipc.Server seems to use a 4KB direct byte buffer for every connection, but, worse, for every RPC call. If I replace the latter ones with non-direct byte buffers, the memory footprint of the namenode server increases only slowly, but even then it is just a matter of time (since I started it 24 hours ago, it leaked by about 300-400MB). If the performance increase by using direct buffers is a requirement, I would suggest to use a static pool. > Although my environment abuses the namenode server in unusual manner, I would imagine that the memory footprint of the namenode server creeps up slowly everywhere -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira