Identifying abnormal Java virtual machine (JVM) memory utilization
- Slow transaction response times.
- Low or out of memory alerts appear.
- Some Java applications use a lot of memory compared to native applications.
- Program absorbs more and more system memory as it runs.
- Instance is slow intermitently or sometimes unavailable.
- An object leak or the heap is not big enough to store all of your data.
- The Java heap parameters are not properly set to handle a given object usage pattern.
- The application is not over utilizing objects.
- A native-memory leak or excessive native memory use will cause different problems depending on whether you exhaust the address space or run out of physical memory.
- Doing lots of reflection can cause many access or classes and class loaders to be created. Holding references to the reflecting objects causes these classes to stay alive and continue occupying space.
- Determining the cause is often a process of elimination, which starts by identifying and eliminating long running user transactions, background jobs, or known memory leaks.
Numerous performance metrics for your instance are available and typically accessible from the homepage under ServiceNow Performance. Java Memory and Garbage Collection Floor are examples of two metrics available to you in the form of graphs. These metrics record memory usage, indicate when the instance is running out of memory, and log the efficiency and frequency of garbage collection.
The stats.do page also shows memory usage information for a single moment in time. This page can be viewed by appending stats.do to the instance URL, or by navigating to System Diagnostics > Stats in the navigation menu. Refreshing this page over a period of time reveals memory usage patterns. Memory usage numbers are listed under the Servlet Memory heading.
Memory usage is expected to fluctuate over time and can dip to low percentages for brief periods. This is normal as long as the available memory does not remain low for an extended period of time and the system is able to collect back up to a reasonable percentage. Regular peaks and valleys between 5% and 40% are typically acceptable. Anything lower than 5% can be problematic.
To verify memory usage in your instance:
- Log in to your ServiceNow instance.
- In the homepage banner, click the Home () icon and select Service-now Performance.
- In the Performance Graph Set pane, review the memory graphs:
Normal 1-day memory graph
Note that memory use fluctuates frequently. This indicates that garbage collection is successfully reclaiming used memory.
Signs of memory issues
Note that memory use steadily climbs rather than rapidly fluctuating up and down.
If the issue continues to exist after following the steps in this article:
- Clearly identify the issue or question.
- Visit the ServiceNow product documentation.
- Search the ServiceNow Community.
- Post a question on the ServiceNow Community forums. New users must create an account on the ServiceNow Community in order to post.
- Open an incident via email or the online Technical Support system.
- Contact the Technical Support team.
For more topic related issues, review the following Knowledge Base article: