jdk 1.7 生产虚拟机参数(添加到 catalina.sh中)
#JAVA_OPTS=”-Xmx8000M -Xms8000M -Xmn1024M -XX:PermSize=2048M -XX:MaxPermSize=2048M -Xss256K -XX:+DisableExplicitGC -XX:SurvivorRatio=1 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=0 -XX:+CMSClassUnloadingEnabled -XX:LargePageSizeInBytes=128M -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -Xloggc:/tmp/gc.log”
jdk 1.8 (注意新版本metaspace 代替了旧版本PermGen space)
JAVA_OPTS=”-server -Xmx8g -Xms8g -Xmn2g -XX:MetaspaceSize=2g -XX:MaxMetaspaceSize=2g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Duser.timezone=GMT+8 -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/b2b_interface.dump -Xloggc:/tmp/b2b_interface_gc.log -verbose:gc -Xmixed -XX:-CITime”
JAVA_OPTS=”-server -Xmx100m -Xms100m -Xmn25m -XX:MetaspaceSize=40m -XX:MaxMetaspaceSize=40m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Duser.timezone=GMT+8 -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/b2b_interface.dump -Xloggc:/tmp/b2b_interface_gc.log -verbose:gc -Xmixed -XX:-CITime”
jmap -heap pid
Attaching to process ID 31448, please wait…
Debugger attached successfully.
Server compiler detected.
JVM version is 25.162-b12
using parallel threads in the new generation.
using thread-local object allocation.
Concurrent Mark-Sweep GC
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 104857600 (100.0MB)
NewSize = 26214400 (25.0MB)
MaxNewSize = 26214400 (25.0MB)
OldSize = 78643200 (75.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 41943040 (40.0MB)
CompressedClassSpaceSize = 33554432 (32.0MB)
MaxMetaspaceSize = 41943040 (40.0MB)
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
New Generation (Eden + 1 Survivor Space):
capacity = 23592960 (22.5MB)
used = 19414032 (18.514663696289062MB)
free = 4178928 (3.9853363037109375MB)
82.28739420572917% used
Eden Space:
capacity = 20971520 (20.0MB)
used = 18428176 (17.574478149414062MB)
free = 2543344 (2.4255218505859375MB)
87.87239074707031% used
From Space:
capacity = 2621440 (2.5MB)
used = 985856 (0.940185546875MB)
free = 1635584 (1.559814453125MB)
37.607421875% used
To Space:
capacity = 2621440 (2.5MB)
used = 0 (0.0MB)
free = 2621440 (2.5MB)
0.0% used
concurrent mark-sweep generation:
capacity = 78643200 (75.0MB)
used = 64297224 (61.31861114501953MB)
free = 14345976 (13.681388854980469MB)
81.75814819335938% used
最新评论
mat插件可以检测内存数据
标识接口?
序列化serializabel就是一个标识
就差一个MAC了
mark
除了预置sql查询字段,其他我竟然都没用过
可以,这个问题遇到过
mybatis多个参数: 1. 注解(最常用) 2. 转化为对象或MAP 3. 按顺序(这个最蠢,写的代码看得费劲) 单个参数需要注意得: 1.基本数据类型随便写 2.数组用array,l