在linux上面部署的weblogic,修改了/weblogic/Oracle/Middleware/user_projects/domains/mes_domain/bin/setDomainEnv.sh的文件内容如下
if [ "${JAVA_VENDOR}" = "Sun" ] ; then
WLS_MEM_ARGS_64BIT="-Xms256m -Xmx512m"
export WLS_MEM_ARGS_64BIT
WLS_MEM_ARGS_32BIT="-Xms256m -Xmx512m"
export WLS_MEM_ARGS_32BIT
else
WLS_MEM_ARGS_64BIT="-Xms512m -Xmx4096m"
export WLS_MEM_ARGS_64BIT
WLS_MEM_ARGS_32BIT="-Xms512m -Xmx512m"
export WLS_MEM_ARGS_32BIT
fi
MEM_ARGS_64BIT="${WLS_MEM_ARGS_64BIT}"
export MEM_ARGS_64BIT
MEM_ARGS_32BIT="${WLS_MEM_ARGS_32BIT}"
export MEM_ARGS_32BIT
if [ "${JAVA_USE_64BIT}" = "true" ] ; then
MEM_ARGS="${MEM_ARGS_64BIT}"
export MEM_ARGS
else
MEM_ARGS="${MEM_ARGS_32BIT}"
export MEM_ARGS
fi
MEM_PERM_SIZE_64BIT="-XX:PermSize=512m"export MEM_PERM_SIZE_64BIT
MEM_PERM_SIZE_32BIT="-XX:PermSize=48m"
export MEM_PERM_SIZE_32BIT
if [ "${JAVA_USE_64BIT}" = "true" ] ; then
MEM_PERM_SIZE="${MEM_PERM_SIZE_64BIT}"
export MEM_PERM_SIZE
else
MEM_PERM_SIZE="${MEM_PERM_SIZE_32BIT}"
export MEM_PERM_SIZE
fi
MEM_MAX_PERM_SIZE_64BIT="-XX:MaxPermSize=1024m"export MEM_MAX_PERM_SIZE_64BIT
MEM_MAX_PERM_SIZE_32BIT="-XX:MaxPermSize=128m"
export MEM_MAX_PERM_SIZE_32BIT
其他地方没有修改,因为用此weblogic发布的应用经常处理大批量对象的操作,系统内存一路飙升,并且没有回收。
求教:怎么设置weblogic JVM 的GC回收方法。例如:当weblogi 的空闲内存到达15%的时候,就启动GC。