Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 88737 invoked from network); 9 Dec 2008 22:35:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Dec 2008 22:35:10 -0000 Received: (qmail 95555 invoked by uid 500); 9 Dec 2008 22:35:17 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 95491 invoked by uid 500); 9 Dec 2008 22:35:17 -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 95467 invoked by uid 99); 9 Dec 2008 22:35:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 14:35:17 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Tue, 09 Dec 2008 22:33:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 49C5B234C2B8 for ; Tue, 9 Dec 2008 14:34:44 -0800 (PST) Message-ID: <1569759164.1228862084301.JavaMail.jira@brutus> Date: Tue, 9 Dec 2008 14:34:44 -0800 (PST) From: "stack (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-4802) RPC Server send buffer retains size of largest response ever sent In-Reply-To: <828234010.1228679144140.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-4802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654990#action_12654990 ] stack commented on HADOOP-4802: ------------------------------- > I'm still not convinced we should do more than replace the buf.reset() with buf = new ByteArrayOutputStream() and remove the initialization of buf altogether. Above is predicated on our running a 'benchmark'. What would you suggest I run? Why create new objects when it can be avoided (when response < 10k)? > RPC Server send buffer retains size of largest response ever sent > ------------------------------------------------------------------ > > Key: HADOOP-4802 > URL: https://issues.apache.org/jira/browse/HADOOP-4802 > Project: Hadoop Core > Issue Type: Bug > Components: ipc > Affects Versions: 0.18.2, 0.19.0 > Reporter: stack > Attachments: 4802-v2.patch, 4802.patch > > > The stack-based ByteArrayOutputStream in Server.Hander is reset each time through the run loop. This will set the BAOS 'size' back to zero but the allocated backing buffer is unaltered. If during an Handlers' lifecycle, any particular RPC response was fat -- Megabytes, even -- the buffer expands during the write to accommodate the particular response but then never shrinks subsequently. If a hosting Server has had more than one 'fat payload' occurrence, the resultant occupied heap can provoke memory woes (See https://issues.apache.org/jira/browse/HBASE-900?focusedCommentId=12654009#action_12654009 for an extreme example; occasional payloads of 20-50MB with 30 handlers robbed the heap of 700MB). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.