Increase the RAM allocation to the JVM running GeoEvent Server

6175
4
04-18-2017 03:59 PM
RJSunderman
Esri Regular Contributor
7 4 6,175

On both the Linux and Windows platforms, GeoEvent Server is run from within a Java Virtual Machine (JVM) instance. The out-of-the-box default configuration allocates only 4GB of your server's available RAM to this JVM. All GeoEvent Server operations requiring RAM draw from this allocation.

Some reasons you might want to increase the amount of RAM allocated to the GeoEvent Server's JVM include:

  • A need to load a large number of geofences into the GeoEvent Server's geofence manager
  • A need to process a large velocity or large volume of event records (more than a few hundred per second)
  • A need to cache a large amount of information from a secondary enrichment source for event record enrichment
  • An expectation that real-time analytics using Incident Detectors will generate a large number of concurrent incidents
  • An expectation that real-time analytics requiring state (e.g. Track Gap detection and monitoring, or spatial conditions such as ENTER / EXIT) will need to work with a large number of assets with unique track identifiers

System administrators who have determined that their server machine has sufficient available RAM, and who have also determined that their GeoEvent Server deployment has a need to allocate more RAM to the JVM instance running GeoEvent Server, can follow the steps outlined below to increase the memory available to GeoEvent Server by allocating more RAM to the hosting JVM.

  1. Stop GeoEvent Server
    • On a Windows platform, make sure the GeoEvent Server Windows Service and its associated java.exe process are stopped.
  2. Open the ArcGISGeoEvent.cfg configuration file in a text editor
    • On a Windows platform, this file is found in the ...\ArcGIS\Server\GeoEvent\etc folder by default
    • When located beneath C:\Program Files you will need to edit this file as a user with administrative privilege
  3. Locate the block of JVM Parameters in the file
    • Note that at different releases the indexes for the JVM parameters will be different from the illustration below
    • Click the image below for an enlarged view in a new tab / window:

  4. Increase the -Xmx parameter for the Java Heap Size from its default (4096m) to specify a larger allocation
    • For example:   -Xmx8192m
    • Note that the allocation is in megabytes
  5. Save your edits to the ArcGISGeoEvent.cfg file (and dismiss your text editor)
  6. Start GeoEvent Server

Using system administrative tools you should be able to verify that the JVM instance (java.exe process) never consumes more memory than what is allocated by the ArcGISGeoEvent.cfg configuration file, and that more than the default 4GB is now available for GeoEvent Server operations.

4 Comments
KjetilNymoen
New Contributor III

Hi. Thanks for this blog, I had to increase the Java Heap Size, and now the events are flowing fine 🙂 I have a question: The memory used by the java.exe process is never released ? I can see that it continues to use 8GB of RAM.

regards Kjetil Nymoen

ChrisBeyett
Occasional Contributor

Kjetil, 

The java.exe process is used to facilitate many of the processes within GeoEvent, some of which are constantly maintained in memory. Normally when memory is kept allocated, it is because the program sill needs or will need to use that information again in the future. The best example of this is when using geofences, as each node of the polygon is held within the java.exe process memory for future reference. This behavior is actually expected, and isn't considered a memory leak. From what you've indicated you may need to increase the Java Heap Size again to give the process some more head room. However as long as you aren't seeing performance issues at the current level, you should be ok to continue. 

- Chris

KjetilNymoen
New Contributor III

Thanks for the feedback Chris.
And yes I did have some GeoFences (3 polygons).
I deleted them and now the Java.exe process is only consuming 1GB of RAM.

I guess my GeoFences is way to complicated, so I have to look into it.

Thanks

Kjetil N

RJSunderman
Esri Regular Contributor

Something to consider if you want to more precisely specify RAM allocation for the JVM is to include both the maximum and the minimum allocation.

The Java heap size is controlled using the Xms and Xmx switches. Xms is the starting heap size; Xmx is the maximumum heap size.

You can read more about this and why you might want to consider the strategy in the following article ...


https://codecurmudgeon.com/wp/2012/05/java-memory-settings-jvm-heap-size/