Frequently Asked Questions

Increasing JAVA heap memory on Supervisor
Last Updated 3 years ago

A Niagara Supervisor is typically installed on a PC or server with much more available resource than Niagara has on a JACE. However by default a supervisor installation is not configured to allow a running station to take full advantage of the PC/servers available memory. It is common for a growing or large supervisor to fail due to running out of JAVA heap memory when this is left as the default setting.

To increase the maximum allowed JAVA heap memory on a supervisor, you must first check to see what memory is actually available on the host. In Windows this can be done by looking at the performance tab of the task manager (CTRL+ALT+DEL > Task Manager). On Windows 10 and Server 2012 for example, the performance tab looks something like this:

image

This shows that I have plenty of physical memory free to allocate for the Niagara station to use if need be. It is important that you do not over allocate memory to a system, so make sure you check the real memory usage first!

Editing nre.properties
The maximum JAVA heap setting is contained in a file names 'nre.properties', on a standard Niagara install this is located in the 'lib' folder of your Niagara install. For example, in my case the path to the file is 'C:\Niagara\Niagara-3.8.41\lib\nre.properties'.

Open the nre.properties file with a text editor such as notepad and look for the following part/line:

'java.options=-Xmx256M -XX:MaxPermSize=128M -Dfile.encoding=UTF-8 -Xss256K'

The first value here 'Xmx' is the maximum memory value for the JAVA virtual machine in which the supervisor station runs. Increase this value as required but conservatively, simply increasing it to a huge value can have undesired effects. In my case, I have several GB of free memory and my current max heap size is only 256MB. If my supervisor station was running out of memory, I could safely increase this value to 512M or 1024M, allowing the station much more headroom. (NOTE: Do NOT do this on a JACE, resources are extremely limited and tightly controlled on embedded hardware)

Make your change and save the file, taking care not to change the file name extension. Once saved, you must restart the Niagara platform and station. It is best to stop the station manually using the Niagara application director on the platform, the platform can then be restarted by locating 'Niagara' in the Windows services list and clicking restart, (Start > Run > services.msc).

Once the platform has restarted, remember to start the station again through the Application director.

Your supervisor station should now be able to take advantage of more of the physical memory in the host PC/Server.

Please Wait!

Please wait... it will take a second!