In Java applications, the parameters -Xms and -Xmx are integral to Java Virtual Machine (JVM) memory management.
- -Xms. This parameter dictates the initial heap size allocated by the JVM when the application starts.
- -Xmx. This parameter sets the maximum heap size that the JVM can use for the application during its execution.
Properly configuring these parameters is crucial for optimizing the performance of Java applications, especially when handling extensive datasets or executing complex operations that demand significant memory resources.
Editing -Xms and -Xmx in the sqlquerytuner.ini
To adjust the Java heap size of SQL Query Tuner
- Open File Explorer, and then navigate to C:Program Files\IDERA\SQLQueryTunerxxxx where xxxx is your installed version number.
- Open the Files with Administrator Rights. Right-click your chosen text editor (e.g., Notepad), and then select Run as administrator to ensure necessary privileges for editing files in the Program Files directory.
- Look for the following lines in ini/sqlquerytuner.ini specifying JVM options. These lines are:
-Xms128M
-Xmx768M - Adjust the values of -Xms and -Xmx based on the available system resources. For example:
-Xms1024M
-Xmx4096M
This configuration sets the initial heap size to 1024 megabytes and the maximum heap size to 4 gigabytes. Adjust these values according to your specific needs. - Save your changes made to the ini/sqlquerytuner.ini file.
- After editing the file, restart SQL Query Tuner to apply the changes effectively.
You can view the Heap status by checking the Show Heap Status checkbox from the application preferences (Tools > Preferences menu).