Grails(25)Grails Memory/Thread Issue Checking
1. JDK Config
It is said that the grails will auto create classes and out of memory the PermSize.
It is said that we need to to config there to make jdk 1.6 working.
-XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
2. Multi Thread
executorService = new ThreadPoolExecutor(
PUSH_THREAD_POOL_SIZE, // core thread pool size
PUSH_THREAD_POOL_SIZE, // maximum thread pool size
10, // time to wait before resizing pool
TimeUnit.SECONDS,
new LinkedBlockingQueue<Runnable>(),
new ThreadPoolExecutor.DiscardPolicy());
LinkedBlockingQueue is with no size, so we can hold as much task as we can.
3. Connection Remote JMX Tomcat
http://www.mkyong.com/tomcat/jconsole-jmx-remote-access-on-tomcat/
Configurations
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port={port to access}
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname={optional, allow what ip to access this Tomcat}
Not working throw proxy.
References:
JDK Config
http://docs.oracle.com/cd/E13209_01/wlcp/wlss30/configwlss/jvmgc.html
http://stackoverflow.com/questions/3334911/what-does-jvm-flag-cmsclassunloadingenabled-actually-do
http://stackoverflow.com/questions/3717937/cmspermgensweepingenabled-vs-cmsclassunloadingenabled/3720052#3720052
Grails(25)Grails Memory/Thread Issue Checking
猜你喜欢
转载自sillycat.iteye.com/blog/2202885
今日推荐
周排行