Tomcat performance tuning
Adjust the maximum memory used by JVM
1. Windows version
The following assumption is that the server path you installed is e:\ turbomail. If it is another path, you can modify it accordingly.
1) Uninstall the original WebMail service.
Enter the E:\ turbomail\ web\ bin directory, execute E:\ turbomail\ web\ bin > turbomail_Web.exe-uninstall turbomail_Web (Tomcat5) and then prompt The turbomail_Web (Tomcat5) service was successfully uninstalled. Indicates that the uninstall was successful.
2) modify the installTomcat_x.bat file in the same directory, find-Xms125M-Xmx512M, and change it to the memory size you want to set.
3) reinstall the WebMail service.
Execute the following naming, where e:\ turbomail\ jdk is the jdk directory and e:\ turbomail\ web is the tomcat server directory E:\ turbomail\ web\ bin > installTomcat_x.bat e:\ turbomail\ jdk e:\ turbomail\ web, you will be prompted:
Indicates that the new WebMail service was installed successfully. The additional items are: HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ turbomail_Web (Tomcat5).
2. Unix/Linux version
Open the web/bin/catalina.sh file and add the following line JAVA_OPTS= "- Xmx512m" under the comment line (with "#"), where the specific amount of memory can be determined according to the specific situation of the system.
Adjust tomcat parameters
Open the file web/conf/server.xml to adjust the following parameters:
1. Prohibit DNS lookup
Set the Connector/enableLookups parameter to false, for example:
two。 Adjust the maximum number of threads
Adjust the Connnector/maxThreads parameter to an appropriate value. Generally, this value is 100 to 200 higher than the maximum number of simultaneous visits of the server. For example:
3. Prohibit automatic deployment
Set the autoDeploy parameter of Connector/Engin/Host to false, for example: