Return-Path: X-Original-To: apmail-giraph-dev-archive@www.apache.org Delivered-To: apmail-giraph-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0B8811EB1 for ; Tue, 10 Jun 2014 00:47:04 +0000 (UTC) Received: (qmail 31104 invoked by uid 500); 10 Jun 2014 00:47:04 -0000 Delivered-To: apmail-giraph-dev-archive@giraph.apache.org Received: (qmail 30892 invoked by uid 500); 10 Jun 2014 00:47:04 -0000 Mailing-List: contact dev-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@giraph.apache.org Delivered-To: mailing list dev@giraph.apache.org Received: (qmail 30881 invoked by uid 500); 10 Jun 2014 00:47:04 -0000 Delivered-To: apmail-incubator-giraph-dev@incubator.apache.org Received: (qmail 30878 invoked by uid 99); 10 Jun 2014 00:47:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2014 00:47:04 +0000 Date: Tue, 10 Jun 2014 00:47:03 +0000 (UTC) From: "Sergey Edunov (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GIRAPH-842) option to dump histogram of memory usage when heap is low on memory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GIRAPH-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14025989#comment-14025989 ] Sergey Edunov commented on GIRAPH-842: -------------------------------------- Hey Pavan, this is great feature, here are some comments on implementation: 1) Please assign your thread some meaningful name, it can be helpful in debugging stack traces. 2) Stop flag has to be volatile, otherwise your thread may never see the change 3) I would let the thread die if you get InterruptedException. 4) runtime.freeMemory() might give you false alarms if you run job with different values of Xmx and Xms. This is because freeMemory only counts free bytes currently allocated to JVM. If your Xmx setting is bigger than Xms you can go low on freeMemory before JVM allocates another chunk. To get more accurate results you can do (maxMemory - totalMemory + freeMemory) > option to dump histogram of memory usage when heap is low on memory > ------------------------------------------------------------------- > > Key: GIRAPH-842 > URL: https://issues.apache.org/jira/browse/GIRAPH-842 > Project: Giraph > Issue Type: Bug > Reporter: Pavan Kumar > Assignee: Pavan Kumar > Priority: Minor > Attachments: GIRAPH-842.patch, master-stderr, worker-stderr > > > Currently we are left in blind for jobs that OOM, it would be helpful if we can do a jmap -histo dump when heap has very little free space left. -- This message was sent by Atlassian JIRA (v6.2#6252)