Managing JVM Heap Size
This section discusses how to:
-
Monitor JVM heap.
-
Change JVM heap size.
Monitoring JVM Heap
The JVM heap size is the amount of memory that a particular JRE (Java Runtime Environment) gives to the JVM (Java Virtual Machine) that it creates. The java.exe command on Windows, java on UNIX and beasvc.exe when running WebLogic as a Windows service is the JRE, and the JVM exists within the JRE’s memory space. The primary sources for monitoring the amount of memory that is in use within a JVM are the WebLogic Remote Console and the WebLogic logs.
To monitor the amount of the JVM heap size available and in use with the WebLogic Remote Console:
-
Sign in to the WebLogic Remote Console.
-
Click the Monitoring Tree tile, then select .
-
The General page includes the following information about the JVM heap size and other information:
Field or Control Description Heap Free Current
The current amount of memory (in bytes) that is available in the JVM heap.
Heap Free Percent
Percentage of the maximum memory that is free.
Heap Size Current
The current size (in bytes) of the JVM heap.
Heap Size Max
The maximum free memory that is configured for this JVM.
Java VM Vendor
The JVM vendor.
Java Vendor
The Java vendor.
Java Version
The Java version of the JVM.
Java Vendor Version
The vendor version of Java.
OS Name
The operating system on which the JVM is running.
OS Version
The version of the operating system on which the JVM is running.
Process Cpu Load
CPU load.
Changing the JVM Heap Size
If you need to adjust any of the Java options, most commonly the JVM heap size, you must manually edit that WebLogic domain’s local setEnv script. The parameters, -Xms and -Xmx, control the JVM memory minimum and maximum heap size respectively.
See the following reference for examples of the JVM heap size as specified in setEnv using the JAVA_OPTIONS_OSplatform environment variable. You only need to set the variables that correspond to the operating system where the WebLogic server is running.
See Adjusting the JVM Heap Size.
Note:
If you do adjust any of the Java options, most commonly the JVM heap size, you must restart WebLogic for these changes to take effect.
If you're running WebLogic Server as a Windows service you must rerun the installNTservice script to propagate this change into the Windows registry.
The WebLogic Node Manager does not use the Java options set in setEnv, but instead uses Java options set from the WebLogic console.
To modify the Java options for a WebLogic instance started from the WebLogic Node Manager:
-
Sign in to the WebLogic Remote Console.
-
Select .
Supply the name and password for the WebLogic administrator and the URL for the provider in this format: http://server:9999.
-
Select the provider.
-
Click the Edit Tree tile, then select .
-
Update the Arguments field.
-
Click Save.
Click the Shopping Cart icon to check for pending changes and commit them if necessary.
Related Topics