
正文
tomcat启动内存修改
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #4324d4; background-color: #dfdbc3}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #4d2f2d; background-color: #dfdbc3; min-height: 19.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #b12513; background-color: #dfdbc3}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #00a3af; background-color: #dfdbc3}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #b7650a; background-color: #dfdbc3}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Courier; color: #4d2f2d; background-color: #dfdbc3}
span.s1 {font-variant-ligatures: no-common-ligatures}
span.s2 {font-variant-ligatures: no-common-ligatures; color: #00a3af}
span.s3 {font-variant-ligatures: no-common-ligatures; color: #4d2f2d}
span.s4 {font-variant-ligatures: no-common-ligatures; color: #b7650a}
span.s5 {font-variant-ligatures: no-common-ligatures; color: #c020bf}
# USE_NOHUP (Optional) If set to the string true the start command will
# use nohup so that the Tomcat process will ignore any hangup
# signals. Default is "false" unless running on HP-UX in which
# case the default is "true"
# -----------------------------------------------------------------------------
JAVA_OPTS='-Xms256m -Xmx256m'
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
darwin=false
os400=false
hpux=false
case "`uname`" in
CYGWIN*) cygwin=true;;
JAVA_OPTS='-Xms512m -Xmx1024m
linux 下调整tomcat的内存设置
修改bin目录下catalina.sh文件
在cygwin=false之上
添加以下语句
JAVA_OPTS="-Xms1024m -Xmx4096m -Xss1024K -XX:PermSize=512m -XX:MaxPermSize=2048m"
其中-xms为jvm初始化堆的大小,-xmx为jvm堆的最大值







