Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 83464 invoked from network); 10 Sep 2009 22:50:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Sep 2009 22:50:30 -0000 Received: (qmail 37413 invoked by uid 500); 10 Sep 2009 22:50:29 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 37370 invoked by uid 500); 10 Sep 2009 22:50:29 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 37360 invoked by uid 99); 10 Sep 2009 22:50:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Sep 2009 22:50:29 +0000 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; Thu, 10 Sep 2009 22:50:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 84BA0234C498 for ; Thu, 10 Sep 2009 15:49:57 -0700 (PDT) Message-ID: <2019786034.1252622997542.JavaMail.jira@brutus> Date: Thu, 10 Sep 2009 15:49:57 -0700 (PDT) From: "ryan rawson (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Updated: (HBASE-1687) bin/hbase script doesn't allow for different memory settings for each daemon type In-Reply-To: <310811795.1248314354788.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ryan rawson updated HBASE-1687: ------------------------------- Attachment: HBASE-1687-ryan.patch here is my implementation of this, modelled after how hadoop does it. In my setup I end up with this: 14682 ? SNl 3:25 /usr/java/jdk1.6.0_14/bin/java -Xmx4000m -Xmx1000m -XX:+DoEscapeAnalysis -XX:+AggressiveOpts -XX:+UseConcMarkSweepGC .... and jmap says: $ jmap -heap 14682 Attaching to process ID 14682, please wait... Debugger attached successfully. Server compiler detected. JVM version is 14.0-b13 using parallel threads in the new generation. using thread-local object allocation. Concurrent Mark-Sweep GC Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 1048576000 (1000.0MB) NewSize = 67108864 (64.0MB) MaxNewSize = 67108864 (64.0MB) OldSize = 201326592 (192.0MB) NewRatio = 7 SurvivorRatio = 8 PermSize = 21757952 (20.75MB) MaxPermSize = 88080384 (84.0MB) so java uses the last listed Xmx as the one to use. > bin/hbase script doesn't allow for different memory settings for each daemon type > --------------------------------------------------------------------------------- > > Key: HBASE-1687 > URL: https://issues.apache.org/jira/browse/HBASE-1687 > Project: Hadoop HBase > Issue Type: Bug > Reporter: Fernando > Fix For: 0.20.1 > > Attachments: hbase, HBASE-1687-ryan.patch, hbase-script.diff > > > bin/hbase assumes that all daemon types ( master, regionserver ), all use the same memory settings.. (HBASE_HEAPSIZE). > 1) I propose adding daemon specific OPTS much like hadoop already has ( HBASE_MASTER_OPTS, HBASE_REGIONSERVER_OPTS ). > So in bin/hbase, we would merge in the daemon specific opts within the case statement as such: > elif [ "$COMMAND" = "master" ] ; then > CLASS='org.apache.hadoop.hbase.master.HMaster' > HBASE_OPTS="$HBASE_OPTS $HBASE_MASTER_OPTS" > elif [ "$COMMAND" = "regionserver" ] ; then > CLASS='org.apache.hadoop.hbase.regionserver.HRegionServer' > HBASE_OPTS="$HBASE_OPTS $HBASE_REGIONSERVER_OPTS" > the new environment variables can then be added to hbase-env.sh as empty: > export HBASE_MASTER_OPTS="" > export HBASE_REGIONSERVER="" > ..etc > 2) I propose changes to that script to allow overriding the default memory ( HBASE_HEAPSIZE ), with daemon specific OPTS (HBASE_MASTER_OPTS, etc ). > Basically at the bottom of the bin/hbase script, it will check to see if the user has already set "-Xmx" in the HBASE_OPTS variable.. if so, then it will ignore the JAVA_HEAP_SIZE variable.. > as such: > # run it > if [[ $HBASE_OPTS == *-Xmx* ]]; then > exec "$JAVA" $HBASE_OPTS -classpath "$CLASSPATH" $CLASS "$@" > else > exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS -classpath "$CLASSPATH" $CLASS "$@" > fi > I will attach the file as I have modified it.. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.