gsInstance and more memory

Hello Folks, I wonder if somebody can help me out with this:

I am trying to start up a space via the "gsInstance" script. I use gsInstance.sh instead of gsServer.sh since the jini lookup service is launched already as a seperate process.

The space I want to run needs quite a lot of memory to hold all of its entries so my script looks a bit like this:

+... export JAVA_OPTIONS="-Xmx1024m" export LOOKUPGROUPS="test" ... .../GigaSpacesEE-5.2/bin/gsInstance.sh '/./mySpaceA' '' '' ...+

To my surprise, it looked like the property JAVA_OPTIONS was ignored. ( +it was not -Xmx512m was added up in the command line+ ) A quick inspection on gsInstance.sh followed by setenv.sh showed me the following:

setenv.sh

{code}

***********************

This script is used to initialize common environment to GigaSpaces Server.

#

It sets the following variables:

#

JAVA_HOME - Location of the JDK version used to start GigaSpaces

Server.

Note that YOU MUST SUPPLY A JAVA_HOME environment variable.

JAVACMD - The Java command-line

*# JAVA_OPTIONS - Java command-line options for running the server,

Including: The Java args to override the standard memory arguments passed to java,

- Arg specifying the JVM to run. (i.e. -server, -hotspot, -jrocket etc.)

- GC, profiling and management options.*# JAVA_VENDOR

- Vendor of the JVM (i.e. All, BEA, HP, IBM, Sun, etc.)

- Default is ALL, meaning general settings

RMI_OPTIONS

- Additional RMI optional properties.

# ... ...

Set up JVM options base on value of JAVA_VENDOR

if [ "$PRODUCTION_MODE" = "true" ]; then case $JAVA_VENDOR in BEA) JAVA_OPTIONS="${JAVA_OPTIONS} -server -showversion -Xmx512m" #-Xgc:gencon" ;; HP) JAVA_OPTIONS="${JAVA_OPTIONS} -server -showversion -Xmx512m" ;; IBM) JAVA_OPTIONS="${JAVA_OPTIONS} -showversion -Xmx512m" ;; Sun) JAVA_OPTIONS="${JAVA_OPTIONS} -server -showversion -Xmx512m" ;; *) JAVA_OPTIONS="${JAVA_OPTIONS} -showversion -Xmx512m" ;; esac else case $JAVA_VENDOR in BEA) JAVA_OPTIONS="${JAVA_OPTIONS} -server -showversion -Xmx256m -Xgcreport -Xmanagement -verbose:memory,cpuinfo" ;; HP) JAVA_OPTIONS="${JAVA_OPTIONS} -server -showversion -Xmx256m" ;; IBM) JAVA_OPTIONS="${JAVA_OPTIONS} -showversion -Xmx256m -verbose:gc -Xquickstart" ;; Sun) JAVA_OPTIONS="${JAVA_OPTIONS} -server -showversion -Xmx256m" ;; *) JAVA_OPTIONS="${JAVA_OPTIONS} -showversion -Xmx256m" ;; esac fi export JAVA_OPTIONS ... {code}

So that's it: when I was running gsInstance my command line was looking like this:

{color:blue}java -Xmx1024m -showVersion -Xmx512m ... {color}

that's bizzarre. I must be missing something. How come I can't set up more than 512m of memory for my space/gsInstance application ? I have +temporarily+ changed gigaspaces' "setenv.sh" and I have been able to start up gsInstance with the correct amount of memory and it has worked. Can somebody please tell me that I don't have to modify "setenv.sh" but I am just missing some simple trick ?

Many Thanks Lorenzo

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2135]{quote}

asked 2007-05-18 13:06:03 -0600

lorenzo gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete