For performance related issue, we need to follow the given rules:
- We can equalize and emphasize the size of xms and xmx for effectiveness.
-Xms2048m -Xmx2048m
- We can also enable the PermGen to be garbage collected.
-XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled
- If the page changes too frequently to make this option logical, try temporarily caching the dynamic content, so that it doesn't need to be regenerated over and over again. Any techniques you can use to cache work that's already been done instead of doing it again should be used - this is the key to achieving the best Tomcat performance.
- If there any database related issue, then can follow sql query perfomance tuning
- rotating the Catalina.out log file,
without restarting Tomcat
.
In details,There are two ways.
The first, which is more direct, is that you can rotate Catalina.out by adding a simple pipe to the log rotation tool of your choice in Catalina's startup shell script. This will look something like:
"$CATALINA_BASE"/logs/catalina.out WeaponOfChoice 2>&1 &
Simply replace
"WeaponOfChoice"
with your favorite log rotation tool.
The second way is less direct, but ultimately better. The best way to handle the rotation of Catalina.out is to make sure it never needs to rotate. Simply set the "swallowOutput" property to true for all Contexts in
"server.xml"
.
This will route
System.err
and System.out
to whatever Logging implementation you have configured, or JULI
, if you haven't configured.- See more at: Tomcat Catalina Out
Original Link: Web application very slow in Tomcat 7
No comments:
Post a Comment