win10查看并设置tomcat的jvm堆内存参数
查看
进入命令行
通过Win+r命令输入cmd进入命令行页面
进入到jdk的bin目录
D:
cd D:\Y4ECSRUN\WGQ4 Java jdk1.8.0 131\bin
执行jps查看进程pid
D:\Y4ECSRUN\WGQ4 Java jdk1.8.0 131\bin>jps
16528 Jps
6868 Bootstrap
通过jmap查看jvm堆内存参数
D:\Y4DCSRUN\WGQ4Java jdk1.8.0 131bin>jmap -heap 6868
Attaching to process ID 6868, please wait...
Debugger attached successfully.
Client conpiler detected.
JVM version is 25.131-b11
using thread-local object allocation.
Mark Sweep Conpact GC
Heap Configuration:
MinHeapFreeRatio = 40
WaxHeanFreeRatio = 70
MaxHeapSizeNewSize = 268435456 (256.0MB)
设置JVM参数
修改catalina.bat文件并重启
Windows环境下修改“%TOMCAT_HOME%\bin\catalina.bat”文件,在文件开头增加如下设置:
set JAVA_OPTS=-Xms512m -Xmx512m
修改完成后重启tomcat进程生效