Issue #1989 remove high memory mode, reorganize wrapper.conf
Change-Id: I41f0ccbd37a491ee47ea1406d99aa35986d8822f Former-commit-id:7059967ae9
[formerlycaf414bab0
] [formerly148b20f57c
[formerly 19d32f4ffee269e244b77988f908a8e263374430]] Former-commit-id:148b20f57c
Former-commit-id:72ed3e21b3
This commit is contained in:
parent
c6af8b4d7c
commit
47d2bf99b9
11 changed files with 55 additions and 106 deletions
|
@ -97,7 +97,6 @@ CONSOLE_FLAG=on
|
||||||
CONSOLE_LOGLEVEL=DEBUG
|
CONSOLE_LOGLEVEL=DEBUG
|
||||||
DEBUG_FLAG=off
|
DEBUG_FLAG=off
|
||||||
PROFILE_FLAG=off
|
PROFILE_FLAG=off
|
||||||
HIGH_MEM_FLAG=off
|
|
||||||
CONF_FILE="wrapper.conf"
|
CONF_FILE="wrapper.conf"
|
||||||
RUN_MODE=
|
RUN_MODE=
|
||||||
for arg in $@
|
for arg in $@
|
||||||
|
@ -105,13 +104,12 @@ do
|
||||||
case $arg in
|
case $arg in
|
||||||
-b|-d|--debug|-db|-bd) DEBUG_FLAG=on;;
|
-b|-d|--debug|-db|-bd) DEBUG_FLAG=on;;
|
||||||
-p|--profiler) PROFILE_FLAG=on;;
|
-p|--profiler) PROFILE_FLAG=on;;
|
||||||
-h|--highmem) HIGH_MEM_FLAG=on;;
|
-h|--highmem) ;; # does nothing, only here to prevent issues if someone still uses -h
|
||||||
-noConsole) CONSOLE_FLAG=off;;
|
-noConsole) CONSOLE_FLAG=off;;
|
||||||
*) RUN_MODE=$arg;;
|
*) RUN_MODE=$arg;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
export HIGH_MEM_FLAG
|
|
||||||
export EDEX_RUN_MODE=$RUN_MODE
|
export EDEX_RUN_MODE=$RUN_MODE
|
||||||
|
|
||||||
if [ $CONSOLE_FLAG == "off" ]; then
|
if [ $CONSOLE_FLAG == "off" ]; then
|
||||||
|
|
|
@ -84,41 +84,47 @@ wrapper.jvm.parameter.order.LAST=-classpath
|
||||||
# sets the Maximum Permanent Generation memory size
|
# sets the Maximum Permanent Generation memory size
|
||||||
wrapper.java.additional.3=-XX:MaxPermSize=${MAX_PERM_SIZE}
|
wrapper.java.additional.3=-XX:MaxPermSize=${MAX_PERM_SIZE}
|
||||||
|
|
||||||
# turn on JMX access to basic JVM instrumentation
|
# disables JMX in Camel and speeds up EDEX startup and performance
|
||||||
wrapper.java.additional.4=-Dcom.sun.management.jmxremote
|
wrapper.java.additional.4=-Dorg.apache.camel.jmx.disabled=true
|
||||||
|
|
||||||
# Enforces GMT to be used as the timezone
|
# Enforces GMT to be used as the timezone
|
||||||
wrapper.java.additional.5=-Duser.timezone=GMT
|
wrapper.java.additional.5=-Duser.timezone=GMT
|
||||||
|
|
||||||
wrapper.java.additional.6=-XX:+UseConcMarkSweepGC
|
# garbage collection settings
|
||||||
|
wrapper.java.additional.gc.1=-XX:+UseConcMarkSweepGC
|
||||||
|
wrapper.java.additional.gc.2=-XX:+CMSIncrementalMode
|
||||||
|
|
||||||
wrapper.java.additional.7=-XX:+CMSIncrementalMode
|
# use qpid binding URL instead of default address string format
|
||||||
|
wrapper.java.additional.qpid.1=-Dqpid.dest_syntax=BURL
|
||||||
|
|
||||||
wrapper.java.additional.8=-Djava.net.preferIPv4Stack=true
|
# hibernate.cfg.xml cannot read from ENV variables but can read from Java system properties
|
||||||
wrapper.java.additional.9=-Ddb.addr=${DB_ADDR}
|
wrapper.java.additional.db.1=-Ddb.addr=${DB_ADDR}
|
||||||
wrapper.java.additional.10=-Ddb.port=${DB_PORT}
|
wrapper.java.additional.db.2=-Ddb.port=${DB_PORT}
|
||||||
|
wrapper.java.additional.db.3=-Ddc.db.name=${DC_DB_NAME}
|
||||||
|
wrapper.java.additional.db.4=-Dfxa.db.name=${FXA_DB_NAME}
|
||||||
|
wrapper.java.additional.db.5=-Dhm.db.name=${HM_DB_NAME}
|
||||||
|
wrapper.java.additional.db.6=-Dih.db.name=${IH_DB_NAME}
|
||||||
|
wrapper.java.additional.db.7=-Ddb.metadata.pool.min=${METADATA_POOL_MIN}
|
||||||
|
wrapper.java.additional.db.8=-Ddb.metadata.pool.max=${METADATA_POOL_MAX}
|
||||||
|
|
||||||
wrapper.java.additional.12=-Ddc.db.name=${DC_DB_NAME}
|
# site ID of EDEX for localization and site aware services
|
||||||
wrapper.java.additional.13=-Dfxa.db.name=${FXA_DB_NAME}
|
wrapper.java.additional.site.1=-Daw.site.identifier=${AW_SITE_IDENTIFIER}
|
||||||
wrapper.java.additional.14=-Dhm.db.name=${HM_DB_NAME}
|
|
||||||
wrapper.java.additional.15=-Dih.db.name=${IH_DB_NAME}
|
|
||||||
wrapper.java.additional.16=-Daw.site.identifier=${AW_SITE_IDENTIFIER}
|
|
||||||
|
|
||||||
wrapper.java.additional.20=-Ddb.metadata.pool.min=${METADATA_POOL_MIN}
|
# determines which architecture.properties file to use
|
||||||
wrapper.java.additional.21=-Ddb.metadata.pool.max=${METADATA_POOL_MAX}
|
wrapper.java.additional.arch.1=-Dedex.arch=${EDEX_BITS}-bit
|
||||||
|
|
||||||
wrapper.java.additional.30=${PROFILER_PARAM_1}
|
wrapper.java.additional.log.1=-Dlog4j.configuration=${LOG4J_CONF}
|
||||||
|
|
||||||
wrapper.java.additional.31=-Dlog4j.configuration=${LOG4J_CONF}
|
# used by uengineWeb page
|
||||||
|
wrapper.java.additional.web.1=-Dweb.port=8080
|
||||||
|
wrapper.java.additional.web.2=-Dconfidential.port=8443
|
||||||
|
|
||||||
wrapper.java.additional.38=-DHighMem=${HIGH_MEM_FLAG}
|
# notifies SerializationManager to initialize hibernatables, can be removed IF Hibernatables code
|
||||||
|
# is removed from SerializationManager
|
||||||
|
wrapper.java.additional.misc.1=-DinitializeHibernatables=true
|
||||||
|
|
||||||
wrapper.java.additional.40=-Dqpid.dest_syntax=BURL
|
# enables yourkit profiling, determined by flag to start.sh
|
||||||
wrapper.java.additional.41=-Dweb.port=8080
|
wrapper.java.additional.profile.1=${PROFILER_PARAM_1}
|
||||||
wrapper.java.additional.42=-Dconfidential.port=8443
|
|
||||||
wrapper.java.additional.44=-Dedex.arch=${EDEX_BITS}-bit
|
|
||||||
wrapper.java.additional.52=-DinitializeHibernatables=true
|
|
||||||
wrapper.java.additional.53=-Dorg.apache.camel.jmx.disabled=true
|
|
||||||
|
|
||||||
# Initial Java Heap Size (in MB)
|
# Initial Java Heap Size (in MB)
|
||||||
wrapper.java.initmemory=${INIT_MEM}
|
wrapper.java.initmemory=${INIT_MEM}
|
||||||
|
|
|
@ -20,12 +20,7 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
export INIT_MEM=512 # in Meg
|
export INIT_MEM=512 # in Meg
|
||||||
|
|
||||||
if [ $HIGH_MEM_FLAG == "on" ]; then
|
|
||||||
export MAX_MEM=1536 # in Meg
|
export MAX_MEM=1536 # in Meg
|
||||||
else
|
|
||||||
export MAX_MEM=896 # in Meg
|
|
||||||
fi
|
|
||||||
|
|
||||||
export METADATA_POOL_MIN=10
|
export METADATA_POOL_MIN=10
|
||||||
export EDEX_DEBUG_PORT=5009
|
export EDEX_DEBUG_PORT=5009
|
||||||
|
|
|
@ -20,12 +20,8 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
export INIT_MEM=512 # in Meg
|
export INIT_MEM=512 # in Meg
|
||||||
|
|
||||||
if [ $HIGH_MEM_FLAG == "on" ]; then
|
|
||||||
export MAX_MEM=1536 # in Meg
|
export MAX_MEM=1536 # in Meg
|
||||||
else
|
|
||||||
export MAX_MEM=896 # in Meg
|
|
||||||
fi
|
|
||||||
export METADATA_POOL_MIN=10
|
export METADATA_POOL_MIN=10
|
||||||
export EDEX_DEBUG_PORT=5010
|
export EDEX_DEBUG_PORT=5010
|
||||||
export EDEX_JMX_PORT=1621
|
export EDEX_JMX_PORT=1621
|
||||||
|
|
|
@ -35,15 +35,10 @@ export PROFILER_PARAM_1=""
|
||||||
export PROFILER_PARAM_2=""
|
export PROFILER_PARAM_2=""
|
||||||
export PYPIES_MAX_CONN=50
|
export PYPIES_MAX_CONN=50
|
||||||
|
|
||||||
if [ $HIGH_MEM_FLAG == "on" ]; then
|
|
||||||
export SERIALIZE_POOL_MAX_SIZE=16
|
export SERIALIZE_POOL_MAX_SIZE=16
|
||||||
export SERIALIZE_STREAM_INIT_SIZE_MB=2
|
export SERIALIZE_STREAM_INIT_SIZE_MB=2
|
||||||
export SERIALIZE_STREAM_MAX_SIZE_MB=6
|
export SERIALIZE_STREAM_MAX_SIZE_MB=6
|
||||||
else
|
|
||||||
export SERIALIZE_POOL_MAX_SIZE=8
|
|
||||||
export SERIALIZE_STREAM_INIT_SIZE_MB=1
|
|
||||||
export SERIALIZE_STREAM_MAX_SIZE_MB=5.5
|
|
||||||
fi
|
|
||||||
|
|
||||||
export LOG4J_CONF=log4j.xml
|
export LOG4J_CONF=log4j.xml
|
||||||
export MGMT_PORT=9600
|
export MGMT_PORT=9600
|
||||||
|
|
|
@ -20,12 +20,7 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
export INIT_MEM=512 # in Meg
|
export INIT_MEM=512 # in Meg
|
||||||
|
|
||||||
if [ $HIGH_MEM_FLAG == "on" ]; then
|
|
||||||
export MAX_MEM=896 # in Meg
|
export MAX_MEM=896 # in Meg
|
||||||
else
|
|
||||||
export MAX_MEM=896 # in Meg
|
|
||||||
fi
|
|
||||||
|
|
||||||
export METADATA_POOL_MIN=10
|
export METADATA_POOL_MIN=10
|
||||||
export EDEX_DEBUG_PORT=5006
|
export EDEX_DEBUG_PORT=5006
|
||||||
|
|
|
@ -19,11 +19,7 @@
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
export INIT_MEM=128 # in Meg
|
export INIT_MEM=128 # in Meg
|
||||||
if [ $HIGH_MEM_FLAG == "on" ]; then
|
|
||||||
export MAX_MEM=1024 # in Meg
|
export MAX_MEM=1024 # in Meg
|
||||||
else
|
|
||||||
export MAX_MEM=256 # in Meg
|
|
||||||
fi
|
|
||||||
|
|
||||||
export JMS_POOL_MIN=4
|
export JMS_POOL_MIN=4
|
||||||
export JMS_POOL_MAX=16
|
export JMS_POOL_MAX=16
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
export INIT_MEM=128 # in Meg
|
export INIT_MEM=128 # in Meg
|
||||||
if [ $HIGH_MEM_FLAG == "on" ]; then
|
|
||||||
if [ "$EDEX_ARCH" == "64-bit" ]; then
|
if [ "$EDEX_ARCH" == "64-bit" ]; then
|
||||||
export MAX_MEM=2048 # in Meg
|
export MAX_MEM=2048 # in Meg
|
||||||
else
|
else
|
||||||
|
@ -28,12 +27,7 @@ if [ $HIGH_MEM_FLAG == "on" ]; then
|
||||||
export SERIALIZE_POOL_MAX_SIZE=24
|
export SERIALIZE_POOL_MAX_SIZE=24
|
||||||
export SERIALIZE_STREAM_INIT_SIZE_MB=2
|
export SERIALIZE_STREAM_INIT_SIZE_MB=2
|
||||||
export SERIALIZE_STREAM_MAX_SIZE_MB=8
|
export SERIALIZE_STREAM_MAX_SIZE_MB=8
|
||||||
else
|
|
||||||
export MAX_MEM=512 # in Meg
|
|
||||||
export SERIALIZE_POOL_MAX_SIZE=8
|
|
||||||
export SERIALIZE_STREAM_INIT_SIZE_MB=2
|
|
||||||
export SERIALIZE_STREAM_MAX_SIZE_MB=8
|
|
||||||
fi
|
|
||||||
|
|
||||||
export JMS_POOL_MIN=16
|
export JMS_POOL_MIN=16
|
||||||
export JMS_POOL_MAX=32
|
export JMS_POOL_MAX=32
|
||||||
|
|
|
@ -138,12 +138,9 @@ public class Executor {
|
||||||
|
|
||||||
EdexModesContainer emc = getModeFilter(confDir);
|
EdexModesContainer emc = getModeFilter(confDir);
|
||||||
String modeName = System.getProperty("edex.run.mode");
|
String modeName = System.getProperty("edex.run.mode");
|
||||||
String highMem = System.getProperty("HighMem");
|
|
||||||
boolean highMemEnabled = "on".equals(highMem);
|
|
||||||
|
|
||||||
if (modeName != null && modeName.length() > 0) {
|
if (modeName != null && modeName.length() > 0) {
|
||||||
System.out.println("EDEX run configuration: " + modeName
|
System.out.println("EDEX run configuration: " + modeName);
|
||||||
+ ", High Memory Mode: " + highMemEnabled);
|
|
||||||
} else {
|
} else {
|
||||||
System.out
|
System.out
|
||||||
.println("No EDEX run configuration specified, defaulting to use all discovered spring XML files");
|
.println("No EDEX run configuration specified, defaulting to use all discovered spring XML files");
|
||||||
|
@ -151,7 +148,7 @@ public class Executor {
|
||||||
System.out.println("EDEX site configuration: "
|
System.out.println("EDEX site configuration: "
|
||||||
+ System.getProperty("aw.site.identifier"));
|
+ System.getProperty("aw.site.identifier"));
|
||||||
|
|
||||||
EdexMode edexMode = emc.getMode(modeName, highMemEnabled);
|
EdexMode edexMode = emc.getMode(modeName);
|
||||||
|
|
||||||
if (edexMode != null && edexMode.isTemplate()) {
|
if (edexMode != null && edexMode.isTemplate()) {
|
||||||
throw new UnsupportedOperationException(modeName
|
throw new UnsupportedOperationException(modeName
|
||||||
|
|
|
@ -36,6 +36,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 22, 2010 njensen Initial creation
|
* Apr 22, 2010 njensen Initial creation
|
||||||
|
* May 29, 2013 1989 njensen Removed high mem mode
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -62,24 +63,9 @@ public class EdexModesContainer {
|
||||||
this.modes = modes;
|
this.modes = modes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EdexMode getMode(String name, boolean highMemoryEnabled) {
|
public EdexMode getMode(String name) {
|
||||||
EdexMode ret = null;
|
EdexMode ret = null;
|
||||||
if (highMemoryEnabled) {
|
|
||||||
// check for high memory name
|
|
||||||
String highMemName = name + "HighMem";
|
|
||||||
for (EdexMode m : modes) {
|
|
||||||
if (m.getName().equalsIgnoreCase(highMemName)) {
|
|
||||||
ret = m;
|
|
||||||
if (!ret.isInited()) {
|
|
||||||
ret.init();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// no high memory mode or no high memory mode name found
|
|
||||||
if (ret == null) {
|
|
||||||
for (EdexMode m : modes) {
|
for (EdexMode m : modes) {
|
||||||
if (m.getName().equalsIgnoreCase(name)) {
|
if (m.getName().equalsIgnoreCase(name)) {
|
||||||
ret = m;
|
ret = m;
|
||||||
|
@ -89,7 +75,6 @@ public class EdexModesContainer {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,6 @@ prog="start.sh"
|
||||||
MEM=( `free -g | grep "Mem:"` )
|
MEM=( `free -g | grep "Mem:"` )
|
||||||
TOTAL_MEM=${MEM[1]}
|
TOTAL_MEM=${MEM[1]}
|
||||||
|
|
||||||
HIGH_MEM=off
|
|
||||||
if [ $TOTAL_MEM -gt 4 ]; then
|
|
||||||
HIGH_MEM=on
|
|
||||||
fi
|
|
||||||
|
|
||||||
# determine services to load
|
# determine services to load
|
||||||
if [ -f /etc/rc.d/init.d/edexServiceList ]; then
|
if [ -f /etc/rc.d/init.d/edexServiceList ]; then
|
||||||
. /etc/rc.d/init.d/edexServiceList
|
. /etc/rc.d/init.d/edexServiceList
|
||||||
|
@ -67,9 +62,6 @@ startEDEX() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
EXTRA_ARGS="-noConsole"
|
EXTRA_ARGS="-noConsole"
|
||||||
if [ $HIGH_MEM == "on" ]; then
|
|
||||||
EXTRA_ARGS="${EXTRA_ARGS} -h"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DAEMON="${EDEX_INSTALL}/bin/start.sh ${EXTRA_ARGS} ${1}"
|
DAEMON="${EDEX_INSTALL}/bin/start.sh ${EXTRA_ARGS} ${1}"
|
||||||
EDEXSTARTLOG=${EDEX_INSTALL}/logs/start-edex-${1}-$TODAY.log
|
EDEXSTARTLOG=${EDEX_INSTALL}/logs/start-edex-${1}-$TODAY.log
|
||||||
|
|
Loading…
Add table
Reference in a new issue