Setting JVM Parameters for the Edge's Tomcat Server
Windows
The following procedure uses Windows 11 as an example.
- Navigate to the location of the startup script.
Go to the Edge installation directory (C:\Edge by default) and find .\tools\SecAs-1.2.29\bin\startup.bat.
- Set the JVM parameters.
- In the Edge installation directory (C:\Edge by default), edit .\tools\SecAs-1.2.29\bin\catalina.bat.
- Add the following information below @echo off in the file:
set "JAVA_OPTS=-Xms512M -Xmx1024M"
In the preceding information, -Xms512M -Xmx1024M are the JVM parameters to be configured. -Xms512M indicates that the initial heap memory allocated to the JVM is 512 MB. -Xmx1024M indicates that the maximum heap memory that can be allocated to the JVM is 1,024 MB. You can add other JVM parameters as required.
- Save and exit catalina.bat. The JVM parameters are configured for the Edge's Tomcat server.
This configuration will be applied if Edge is started using the startup script. It will not be applied if Edge is automatically started upon system or service startup.
- Restart the Edge's Tomcat server.
If Edge is running, stop Tomcat and the pre-installed collectors. After that, restart Edge.
- Stop the Edge's Tomcat server.
- If Edge is automatically started upon system startup or service startup, perform the following steps:
- Press Ctrl, Alt, and Delete and select Task Manager on the displayed page to open it. In the Task Manager dialog box, choose the Details tab.
- Select tomcat9.exe and click End Task.
- If Edge is started using the startup script, close the command prompt window that appears during the script execution.
- Stop the collectors.
- Stop the collectors using the task manager.
- Press Ctrl, Alt, and Delete and select Task Manager on the displayed page to open it. In the Task Manager dialog box, choose the Details tab.
- Select rda-storage-collector.exe, rda-collector-server.exe, rda-collector-platform.exe, rda-collector-kubernetes.exe, and rda-collector-database.exe individually and click End Task.
- Run a script to stop a single collector. rda-storage-collector is used as an example.
- Go to the Edge installation directory, find the collector's directory (C:\Edge\tools\plugins\collectors\rda-storage-collector\bin\stop.bat by default), and run stop.bat.
- Find and stop the other collectors in the .\tools\plugins\collectors directory.
- Restart Edge.
Go to the Edge installation directory (C:\Edge by default) and run .\tools\SecAs-1.2.29\bin\startup.bat. The Edge's Tomcat server and the pre-installed collectors are restarted.
- Query the JVM parameters of the Edge's Tomcat server.
This step requires that the Java development environment be installed on Windows.
- Press Ctrl, Alt, and Delete and select Task Manager on the displayed page to open it. In the Task Manager dialog box, choose the Details tab.
- The following steps depend on how Edge is started.
- If the Edge is automatically started upon system startup or service startup, find tomcat9.exe in Task Manager and check the corresponding PID.
- If Edge is started using the startup script, search for the java.exe program and check the corresponding PID. If there are multiple java.exe programs, do as follows:
- After querying the JVM settings of a Java program, you can determine whether the program is the Edge program based on the value of java_class_path in the command output. If the Edge and tomcat fields are contained, it is the Edge program.
- After obtaining the PID, open Command Prompt as the administrator, enter the following command, and press Enter:
jinfo <PID>
In the preceding command, PID indicates the PID of the Edge program. You can view the effective JVM parameters in the command output.Figure 2 Command prompt
Linux
The following uses CentOS 8 as an example.
- Navigate to the location of the startup script.
Go to the Edge installation directory (/opt/cloud/Edge by default) and find ./scripts/start.sh.
- Set the JVM parameters.
- In the Edge installation directory (/opt/cloud/Edge by default), edit /tools/SecAs-1.2.29/bin/catalina.sh.
- Add the following information at the beginning of the file:
JAVA_OPTS="-Xms512M -Xmx1024M"
In the preceding information, -Xms512M -Xmx1024M are the JVM parameter to be configured. -Xms512M indicates that the initial heap memory allocated to the JVM is 512 MB. -Xmx1024M indicates that the maximum heap memory that can be allocated to the JVM is 1,024 MB. You can add other JVM parameters as required.
- Save and exit catalina.bat. The JVM parameters are configured for the Edge's Tomcat server.
- Restart the Edge's Tomcat server.
If Edge is running, stop Tomcat and the pre-installed collectors.
- Go to the .\script directory in the Edge installation directory (/opt/cloud/Edge by default).
- Run the following command to stop Edge:
sh stop.sh
- Run the following command to start Edge:
sh start.sh
- Query the JVM parameters of the Edge's Tomcat server.
Run the ps -ef|grep java command to check the JVM parameters when Edge is running.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot