How to allocate VM memory to Tomcat ?
long TRUONG (365●4●123●147)
| asked Aug 11 '14, 9:52 p.m.
edited Aug 20 '14, 12:04 p.m. by Stephanie Taylor (241●1●5)
We are using RTC/RRC 4.0.3 on Windows.
VM Memory Usage
and on TEST:
VM Memory Usage
Maximum Memory Allocation 3667 MB
Current Memory Allocation 3015 MB
We have upgraded our TEST VM to match PRD VM at 12 GB memory and 4 CPUs
We are looking to increase the VM memory allocation to Tomcat on TEST to match PRD.
Nobody remember how it was set previously, we can't yet find how to set the allocation for Tomcat yet.
We seem to use same heap size of 4G on both PRD and TEST:
TEST:
D:\IBM\rtc_403\JazzTeamServer\server>p:grep -i mx *.bat
repotools-ccm.bat:set VMARGS=%VMARGS% -Xmx1500M
repotools-jts - Copy.bat:set VMARGS=%VMARGS% -Xmx1500M
repotools-jts.bat:set VMARGS=%VMARGS% -Xmx3000M
server.startup.bat:set JAVA_OPTS=%JAVA_OPTS% -Djazz.connector.algorithm=IbmX509
server.startup.bat:set JAVA_OPTS=%JAVA_OPTS% -Xmx4G
PRD:
D:\IBM\rtc_403\JazzTeamServer\server>p:grep -i mx *.bat
repotools-ccm.bat:set VMARGS=%VMARGS% -Xmx1500M
repotools-jts - Copy.bat:set VMARGS=%VMARGS% -Xmx1500M
repotools-jts.bat:set VMARGS=%VMARGS% -Xmx3000M
server.startup - Copy.bat:set JAVA_OPTS=%JAVA_OPTS% -Djazz.connector.algorithm=IbmX509
server.startup - Copy.bat:set JAVA_OPTS=%JAVA_OPTS% -Xmx4G
server.startup.bat:set JAVA_OPTS=%JAVA_OPTS% -Djazz.connector.algorithm=IbmX509
server.startup.bat:set JAVA_OPTS=%JAVA_OPTS% -Xmx4G
Can't find a way to execute any alternatives given in:
"Assuming that you've downloaded and installed Tomcat as Windows Service Installer exe file from theTomcat homepage, then check the Apache feather icon in the systray (or when absent, run Monitor Tomcat from the start menu). Doubleclick the feather icon and go to the Java tab. There you can configure the memory.
"
And grepping from.../tomcat/bin/*.bat files (both are similar as they are cloned images):
TEST:
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>set|P:grep -i CATALINA
CATALINA_HOME=D:\IBM\rtc_403\JazzTeamServer\server\tomcat
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>set|P:grep -i JAVA
JAVA_OPTS=-agentpath:d:\dlagent\dtagent.dll=name=ApplicationServer_RTC,server=n0
1apl425.tent.trt.csaa.pri:10002
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>set|P:grep -i OPTS
JAVA_OPTS=-agentpath:d:\dlagent\dtagent.dll=name=ApplicationServer_RTC,server=n0
1apl425.tent.trt.csaa.pri:10002
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>P:grep -i OPTS *.bat
catalina.bat:rem CATALINA_OPTS (Optional) Java runtime options used when the
"start",
catalina.bat:rem Include here and not in JAVA_OPTS all options
, that should
catalina.bat:rem JAVA_OPTS (Optional) Java runtime options used when any
command
catalina.bat:rem Include here and not in CATALINA_OPTS all opt
ions, that
catalina.bat:rem Most options should go into CATALINA_OPTS.
catalina.bat:rem JPDA_OPTS (Optional) Java runtime options used when the
"jpda start"
catalina.bat:set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
catalina.bat:set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%
catalina.bat:set DEBUG_OPTS=
catalina.bat:if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
catalina.bat:set JPDA_OPTS=-agentlib:jdwp=transport=%JPDA_TRANSPORT%,address=%JP
DA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
catalina.bat::gotJpdaOpts
catalina.bat:set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
catalina.bat:set CATALINA_OPTS=
catalina.bat:set CATALINA_OPTS=
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorse
d.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALIN
A_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%"
%MAINCLASS% %CMD_LINE_ARGS% %ACTION%
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorse
d.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -
Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%
" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCL
ASS% %CMD_LINE_ARGS% %ACTION%
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -D
java.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.ba
se="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALI
NA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -D
java.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.securi
ty.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CA
TALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPD
IR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
s.bat:set JAVA_OPTS=-agentpath:d:\dlagent\dtagent.dll=name=ApplicationServer_RTC
,server=n01apl425.tent.trt.csaa.pri:10002 %JAVA_OPTS%
service.bat:set JAVA_OPTS=-agentpath:d:\dlagent\dtagent.dll=name=ApplicationServ
er_RTC,server=n01apl425.tent.trt.csaa.pri:10002 %JAVA_OPTS%
startup.bat:set JAVA_OPTS=-agentpath:d:\dlagent\dtagent.dll=name=ApplicationServ
er_RTC,server=n01apl425.tent.trt.csaa.pri:10002 %JAVA_OPTS%
tool-wrapper.bat:rem TOOL_OPTS (Optional) Java runtime options.
tool-wrapper.bat:rem JAVA_OPTS (Optional) Java runtime options.
tool-wrapper.bat:set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apach
e.juli.ClassLoaderLogManager
tool-wrapper.bat:%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_
ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.a
pache.catalina.startup.Tool %CMD_LINE_ARGS%
________________________________________________________________________
PRD
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>set|P:grep -i CATALINA
CATALINA_HOME=D:\IBM\rtc_403\JazzTeamServer\server\tomcat
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>set|P:grep -i JAVA
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>set|P:grep -i OPTS
D:\IBM\rtc_403\JazzTeamServer\server\tomcat\bin>P:grep -i OPTS *.bat
catalina.bat:rem CATALINA_OPTS (Optional) Java runtime options used when th
"start",
catalina.bat:rem Include here and not in JAVA_OPTS all option
, that should
catalina.bat:rem JAVA_OPTS (Optional) Java runtime options used when an
command
catalina.bat:rem Include here and not in CATALINA_OPTS all op
ions, that
catalina.bat:rem Most options should go into CATALINA_OPTS.
catalina.bat:rem JPDA_OPTS (Optional) Java runtime options used when th
"jpda start"
catalina.bat:set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
catalina.bat:set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%
catalina.bat:set DEBUG_OPTS=
catalina.bat:if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
catalina.bat:set JPDA_OPTS=-agentlib:jdwp=transport=%JPDA_TRANSPORT%,address=%J
DA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
catalina.bat::gotJpdaOpts
catalina.bat:set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
catalina.bat:set CATALINA_OPTS=
catalina.bat:set CATALINA_OPTS=
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endors
d.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALI
A_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%"
%MAINCLASS% %CMD_LINE_ARGS% %ACTION%
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endors
d.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager
Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE
" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINC
ASS% %CMD_LINE_ARGS% %ACTION%
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -
java.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.b
se="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATAL
NA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
catalina.bat:%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -
java.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.secur
ty.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%C
TALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMP
IR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
tool-wrapper.bat:rem TOOL_OPTS (Optional) Java runtime options.
tool-wrapper.bat:rem JAVA_OPTS (Optional) Java runtime options.
tool-wrapper.bat:set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apac
e.juli.ClassLoaderLogManager
tool-wrapper.bat:%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA
ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.
pache.catalina.startup.Tool %CMD_LINE_ARGS%
|
Accepted answer
Since you have configured Tomcat as a Windows service, you need to configure JVM in the service control panel, as shown in your attached screen shot. The -Xmx parameter should be in the "Java Options" box, and you should see it if you scroll down (assuming you previously followed the standard instructions https://jazz.net/help-dev/clm/topic/com.ibm.jazz.install.doc/topics/t_run_rqm64_win_service.html). Also, to avoid confusion in the future, if you do have the -Xmx and -Xms parameters in the "Java Options" box, clear the two boxes "Maximum memory pool" and "Initial memory pool".
long TRUONG selected this answer as the correct answer
Comments
long TRUONG
commented Aug 13 '14, 2:16 p.m.
Thx Don.
Tunnel vision! Didn't think about setting up service and did not remember the tomcat7w.exe. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Hi long,