[
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.