Remove every unwanted installed application
This will save you startup time, as well as memory used by preloaded servlets. Web-application which comes with tomcat are :
Changes in Server.XML
Set the autodeploy attribute of the tag to false (unless you need any of the default Tomcat applications like Tomcat Manager). Setting autoDeploy and unpackWARS to false as we are not deploying and updating web applications dynamically. We are also not using the default Tomcat applications like Tomcat Manager for dynamically web application deployment.
Changes in context.XML
Setting reloadable attribute to false.
*reloadable*:-Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.
Changes in other web applications (which are not so important to you)
Others
This will save you startup time, as well as memory used by preloaded servlets. Web-application which comes with tomcat are :
- jsp-examples
- balancer
- tomcat-docs
- webdav
- servlets-examples.
- manager
- host-manager
- ROOT
- manager and host-manager :- one can utilize them to upload application dynamically without stopping tomcat server. We need to set autoDeploy to true to make use of manager applications.
- balancer :- it provides clustering and load balancing capabilities that are essential for deploying scalable and robust web applications.
Changes in Server.XML
Set the autodeploy attribute of the tag to false (unless you need any of the default Tomcat applications like Tomcat Manager). Setting autoDeploy and unpackWARS to false as we are not deploying and updating web applications dynamically. We are also not using the default Tomcat applications like Tomcat Manager for dynamically web application deployment.
Changes in context.XML
Setting reloadable attribute to false.
*reloadable*:-Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.
Changes in other web applications (which are not so important to you)
- Commenting
tag from web.xml. This action will not allow to eat our limited memory as soon as tomcat will start. The related servlet will be loaded when the container decides it needs to be loaded - typically on it's first access. - Setting reloadable attribute to false in context.xml file
Others
- If the garbage collector has become a bottleneck, we may be able to improve performance by customizing the generation sizes.
- Turn off JSP development mode in production by setting the development parameter of the jsp servlet to false
Comments