Database Management
Increase DPA heap memory to monitor large numbers of instances
This article describes how to increase the amount of heap memory that is allocated to DPA. Additional memory allows DPA to monitor a large number of instances. The default memory max heap is 1024 MB for DPA 2020.2 and earlier. It is 2048 for DPA 2020.4 and later.
First published date
Last published date
Overview
This article describes how to increase the amount of heap memory that is allocated to DPA. Additional memory allows DPA to monitor a large number of instances.
Product section
Resolution
Task 1: Determine the appropriate value
The default maximum Java heap setting enables DPA to monitor up to 20 database instances. Use the following table to determine the appropriate setting for your environment.
Note: These estimates are based on testing done with an average of 2-3 active sessions per monitored instance. If you have busy instances being monitored with more than 2-3 average active sessions, please adjust accordingly.
| MONITORED INSTANCES | MAX JAVA HEAP SIZE (64-BIT) |
|---|---|
| 0 - 20 | 4096 MB |
| 21 - 50 | 8192 MB |
| 51 - 100 | 16384 MB |
| 101 - 250 | 32768 MB |
Note: Do you plan to monitor more than 250 database instances? Consider using more than one SolarWinds DPA servers and Link together separate DPA servers.
Task 2: Increase the maximum heap size
Increase the size when DPA is running as a Windows service
When DPA is running as a Windows service, complete the following steps to increase the maximum:
- Open the following file in a text editor:
<installDir>\iwc\tomcat\ignite_config\idc\server.properties - Update the maximum heap setting (the default for DPA 2020.4 and later is 2048 MB):
windows.service.java.heap.max.size=- The value is set in Megabytes. For example, setting the value to 4096 increases the maximum to 4 GB.
- See the previous section for recommendations.
- See Scale DPA for the number of databases being monitored and the number of custom metrics for information about other property settings that you can change to scale DPA.
- Recreate the Ignite PI Server service by running two batch files:
- C:\Program Files\SolarWinds\DPA\removeWindowsService.bat
- C:\Program Files\SolarWinds\DPA\createWindowsService.bat
Note: To run the batch files on most Windows servers, it works best to open a command prompt as an admin, change directory to the path that has the batch files, and then execute them. If you simply click on the .bat files to execute them, it's possible that the .bat file will not run because of user access control settings, or it will appear to run but the memory setting won't be changed.
Increase the size when DPA is running from a command line (Linux)
When DPA is running on Linux, complete the following steps to increase the maximum:
- Open the following file in a text editor:
<installDir>/iwc/tomcat/ignite_config/idc/server.properties - Open the following file in a text editor:
java.max.heap.size=- The default for DPA 2020.4 and later is 2048m which means 2048 MB.
- See the previous section for recommendations. For example, set it to 4096m to increase the maximum to 4 GB.
- See Scale DPA for the number of databases being monitored and the number of custom metrics for information about other property settings that you can change to scale DPA.
- Note: That on Linux there is an 'm' after the value in megabytes. Not adding the m here can result in DPA not starting up. The 'm' is not required in the windows lines for the service. This can also be seen in the comments of the system.properties file.
- Restart DPA by running two scripts:
- shutdown.sh
- startup.sh
Task 3: Verify the change
Verify the change when DPA is running as a Windows service
When the files are run in a command prompt, the following shows a successful change to 4096 MB max memory.
RemoveWindowsService.bat Output:
CreateWindowsService.bat Output:
Verify the change in log files on both Windows and Linux
To verify the increase of Java heap memory in either Windows or Linux in DPA versions older than 12.0:
- Open the following file in a text editor:
<installDir>\iwc\tomcat\logs\system.log - Search for the following setting and verify the value:
-Xmx
The following example is from a Windows installation. The setting is in red:
InputArguments: -Dcatalina.home=C:\Program Files\SolarWinds\DPA\iwc\tomcat -Dcatalina.base=C:\Program Files\SolarWinds\DPA\iwc\tomcat -Djava.endorsed.dirs=C:\Program Files\SolarWinds\DPA\iwc\tomcat\endorsed -Djava.io.tmpdir=C:\Program Files\SolarWinds\DPA\iwc\tomcat\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Program Files\SolarWinds\DPA\iwc\tomcat\conf\logging.properties exit -Xms256m -Xmx4096m -Xss256k
To verify the increase of Java heap memory in either Windows or Linux in DPA versions newer than 12.0:
In DPA 12.0 and later the output was moved. Open the following file in a text editor:
<installDir>\iwc\tomcat\logs\diagnostics\diagnosticSystem.json- Search for the following setting and verify the value:
-Xmx - The value will be in a section for "inputArguments"
"runtimeBean" : {
"vmName" : "OpenJDK 64-Bit Server VM",
"vmVendor" : "Oracle Corporation",
"vmVersion" : "14+36-1461",
"uptime" : "4d 16h 54m 53s",
"specName" : "Java Virtual Machine Specification",
"specVendor" : "Oracle Corporation",
"inputArguments" : [ "-Dcatalina.home=C:\\Program Files\\SolarWinds\\DPA\\iwc\\tomcat", "-Dcatalina.base=C:\\Program Files\\SolarWinds\\DPA\\iwc\\tomcat", "-Djava.io.tmpdir=C:\\Program Files\\SolarWinds\\DPA\\iwc\\tomcat\\temp", "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager", "-Djava.util.logging.config.file=C:\\Program Files\\SolarWinds\\DPA\\iwc\\tomcat\\conf\\logging.properties", "exit", "abort", "-Xms256m", "-Xmx4096m", "-Xss256k" ],
Warning: Max Java Heap Size can be set too high.
The Max Java Heap Size setting can be set too high for your operating system. For example, Windows requires contiguous memory space. Since Windows loads DLLs that can easily fragment memory, higher Max Java Heap Size settings can be difficult to attain.
Problems can occur if DPA is running on a VM and there is dynamic memory in use with no reservation set on the memory.
For example:
DPA is running on a VM with dynamic memory set to 10 GB RAM and the default Java heap memory setting of 2048 MB. The above steps are taken to scale DPA to use 6 GB memory (6144 MB of memory). However, at the time of the adjustment, the VM isn't using or does not have a reserve on the memory from the host. In this situation, DPA might not restart.