Product: TIBCO Spotfire®
How to enable garbage collection (GC) logging on TIBCO Spotfire Servers
Garbage collection (GC) logs may be very helpful when investigating performance issues in the TIBCO Spotfire Server or during cluster communication issues caused by long GC pauses.
Note: This logging should only be enabled when requested by TIBCO Support and all changes should be reverted after active investigation and issue capture is complete.
There are two different methods that can be used to enable GC logging in Spotfire. Use method 1 or method 2. If there are multiple TIBCO Spotfire Servers in a cluster, then GC logging must be enabled on each server.
Method 1. Configure settings on Tomcat executable properties dialog
1) From <TSS install dir>\tomcat\bin\ folder, rename the tomcat8w.exe executable to match the service name of the TIBCO Spotfire Server. You can find the service name by going to Services > Right click on the "TIBCO Spotfire Server X.X" service > Properties > General tab > Service Name. For example: This will be like "Tss7140" for version 7.14, so in that case the tomcat8w.exe should be renamed to Tss7140.exe.
2) Right click on the renamed tomcat8w.exe executable (for example, now called Tss7140.exe), and click "Run as Administrator".
Note: If this file name does not match the TIBCO Spotfire Server service name exactly, you will get an "The specified service does not exist as an installed service. Unable to open the service 'tomcat8" error. Please doublecheck the service name and the file name and try again.
3) In the Java tab, add all these properties after the current contents in the "Java Options" section:
-XX:+PrintGCDetails -XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Xloggc:/path/to/gc/logs/GClog-%t.txt
Note that path mentioned for property '-Xloggc' should be a valid path on each server machine, and should be updated accordingly (the example above is for version 7.14). The recommendation is to use the TIBCO Spotfire Server logs (\tomcat\logs\) path itself.
3) Click Apply
4) Restart the TIBCO Spotfire Service.
5) Verify if log file starting with 'gc_log' starts generating in the folder specified in the Xloggc parameter.
Method 2: Configure settings in setenv.bat (Server must be started via startup.bat)
1) Stop the TIBCO Spotfire Server service
2) Backup the existing \tomcat\bin\setenv.bat file, and add below entries to the 'JAVA_OPTS' property:
-XX:+PrintGCDetails -XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Xloggc:/path/to/gc/logs/log.txt
So, if the original JAVA_OPTS settings from setenv.bat are like:
set JAVA_OPTS=-server -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -Xms512M -Xmx4096M
After the change it will look like (for example):
set JAVA_OPTS=-server -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintAdaptiveSizePolicy -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Xloggc:"C:\tibco\tss\10.1\tomcat\logs\gc_log.txt" -Xms512M -Xmx4096MNote that path mentioned for property '-Xloggc' should be a valid path on each server machine, and should be updated accordingly (the example above is for version 10.1). The recommendation is to use the TIBCO Spotfire Server logs (\tomcat\logs\) path itself.
3) Run \tomcat\bin\startup.bat from command prompt. Important: The GC logging will only be used if the Server is started via the startup.bat file.
4) Verify if log file starting with 'gc_log' starts generating in the folder specified in the Xloggc parameter:
External: What Is a Garbage Collection Log and How Can You Enable and Analyze It? External: Enabling and Analyzing the Garbage Collection Log Doc: Starting or stopping Spotfire Server (Windows, no service)
Comments
0 comments
Article is closed for comments.