Setting JVM Parameters for Collectors
Windows
The following procedure uses Windows 11 and rda-collector-server as an example.
- Navigate to the location of the startup script.
Go to the Edge installation directory (C:\Edge by default) and find .\tools\plugins\collectors\rda-collector-server\bin\start.bat. rda-collector-server can be replaced with the collector you want to configure. The supported collectors include:
Database collector rda-collector-database
Container collector rda-collector-kubernetes
Platform collector rda-collector-platform
Server collector rda-collector-server
Storage collector rda-storage-collector
- Set the JVM parameters.
- In the Edge installation directory (C:\Edge by default), edit .\tools\plugins\collectors\rda-collector-server\bin\start.bat.
- Add the following JVM parameters after -jar in the second statement.
-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 start.bat. The JVM parameters are configured for the server collector.
- Restart the collector.
The JVM parameters will be applied after the collector is restarted.
- Go to the Edge installation directory (C:\Edge by default) and run .\tools\plugins\collectors\rda-collector-server\bin\stop.bat as the administrator.
- Run the collector startup script start.bat in the same directory.
- Query the JVM parameters of the collector.
- 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.
- Find rda-collector-server.exe and check its 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 1 Command prompt
Linux
The following procedure uses CentOS 8 and rda-collector-server as an example.
- Navigate to the location of the startup script.
Go to the Edge installation directory. The default directory is /opt/cloud/Edge. Find /tools/plugins/collectors/rda-collector-server. rda-collector-server can be replaced with the collector you want to configure. The supported collectors include:
Database collector rda-collector-database
Container collector rda-collector-kubernetes
Platform collector rda-collector-platform
Server collector rda-collector-server
Storage collector rda-storage-collector
Big data collector bigdata-migration
- Set the JVM parameters.
- In the Edge installation directory (/opt/cloud/Edge by default), edit /tools/plugins/collectors/rda-collector-server.
- Create the start.sh file and add the following information to the file:
nohup java -jar -Xms256M -Xmx512M rda-collector-server.jar >/dev/null 2>&1 &
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 start.bat. The JVM parameters are configured for the server collector.
- Restart the collector.
The JVM parameters will be applied after the collector is restarted.
- Run the following command to view the PID of the collector:
ps -ef|grep java
- Enter the following command and press Enter to stop the collector.
Kill -9 PID
- Enter the following command to run the new startup script start.sh:
sh start.sh
- Run the following command to view the PID of the collector:
- Query the JVM parameters of the collector.
Run the following command to view the JVM parameters of the collector:
ps -ef|grep java
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