DevOps

tomcat-sever.xml中跟性能有关的配置

<Connector>标签下: acceptCount The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.     建议:Don’t set too high, this sets the number of pending requests awaiting processing.  In my opinion it is better …

tomcat-sever.xml中跟性能有关的配置 Read More »

修改Tomcat的运行内存

在catalina.bat中加上红色那行 set _EXECJAVA=%_RUNJAVA% set MAINCLASS=org.apache.catalina.startup.Bootstrap set ACTION=start set SECURITY_POLICY_FILE= set DEBUG_OPTS= set JPDA= set JAVA_OPTS= -Xms512M -Xmx1024M ===JSP中查看当前的内存使用状况= Runtime lRuntime = Runtime.getRuntime(); out.println("*** BEGIN MEMORY STATISTICS ***"); out.println("Free  Memory: "+lRuntime.freeMemory()/1024/1024+"M"); out.println("Max   Memory: "+lRuntime.maxMemory()/1024/1024+"M"); out.println("Total Memory: "+lRuntime.totalMemory()/1024/1024+"M"); out.println("Available Processors : "+lRuntime.availableProcessors()+""); out.println("*** END MEMORY STATISTICS ***");