5 Quick Performance Enhancements in Ignition
With Ignition’s “unlimited everything” licensing, you can encounter performance ceilings with the default configuration after adding a lot of PLCs, tags, and clients to your architecture. It’s not difficult to get better performance out of your existing hardware, you just need to know the right adjustments to make.
Here are the top five typical adjustments we make on Ignition SCADA systems when we build out a new gateway.
1. Update Garbage Collection
As computer programs run, they create objects in your computer's memory. After the objects are no longer used, they will remain in memory until cleaned up by the software. While this cleaning process (typically called garbage collection) is occurring, the program will devote resources to that operation instead of operating the program itself. Different methods of garbage collection will cause applications to behave differently.
Ignition (and Java 8's) default setting for garbage collection is to use the Concurrent Mark Sweep (ConcMarkSweepGC) method. Java 9 now uses Garbage First Garbage Collector (G1GC). While the names don't matter, the way they operate can have a significant impact on your system's performance. ConcMarkSweepGC performs fewer garbage collection operations, freeing up more memory with each one. G1GC performs more frequent garbage collections with less memory freed each time. Inductive Automation recommends changing to G1GC for the performance boost gained by its garbage collection algorithm.
How to Update the Garbage Collection Method
To update your garbage collection method, open your ignition.conf file. In Windows, it’s typically located here: C:\Program Files\Inductive Automation\Ignition\data\ignition.conf
Change the following line under Java Additional Parameters:
wrapper.java.additional.1=-XX:+UseConcMarkSweepGC
to
wrapper.java.additional.1=-XX:+UseG1GC
2. Device Configurations
After configuring your devices (and tags are reading/writing to them), check device statistics to make sure any PLCs or other devices are not a bottleneck. Login to the Ignition gateway and click the Status tab. Under Connections on the left, click Devices, and check the details of each device. If anything has close to or at 100%, or you see 100ms+ response times with the default settings, then its time to make adjustments to that device’s configuration. These adjustments will be specific to each device. However, it’s common to increase the CIP connection size, maximum number of connections for Allen Bradley PLCs. You will also probably want to adjust the timeslice in the PLC to allow for more time for Ignition to communicate with it.
3. Update Memory Allocations
By default, Ignition will not use all the available memory on the system for the gateway or clients. Updating the memory available for the gateway and clients is easy, you only need to know where to look. For the Gateway, go back to your ignition.conf file from item 1, and look for the Initial Java Heap Size setting. The Initial Heap Size is set in the same range as your average usage, and the maximum would be a multiple of that, usually 4x. As a system grows, we would typically increase these values to allow Ignition to use more memory. In those instances, we raise them incrementally to make sure the system remains stable with the new values.
If our average usage were 1GB, we would use the following:
# Initial Java Heap Size (in MB) wrapper.java.initmemory=1024 # Maximum Java Heap Size (in MB) wrapper.java.maxmemory=4096
For clients, look in the Project->Properties menu in the Ignition Designer. Go down to the Client->Launching section of the tree, and adjust the maximum memory available for clients.
NOTE: If you are using 32 bit Java or if IT pushes out auto-updates of Java that overwrite a 64-bit installation of Java, keep this value below 1.5GB. If you set it to more than 1.5GB, your clients will not launch while using 32bit Java on the client machines. If you are confident you will always be using 64 bit Java, any selection here will work.
4. Use Templates and Data Types
Not all performance enhancements are created equal. The first three tips are for the backend architecture, while the next two cover workflow enhancements to help your team develop applications more efficiently. One huge performance enhancement Ignition provides is the ease of using Templates and Data Types for development:
Templates are client-side objects you can use to represent different pieces of equipment, informational displays, buttons, etc.
Data Types are essentially data models for tags you can use to group tags into logical structures instead of having one endless list of every tag in your system.
Learn more about how we use Templates in Ignition Perspective. If you find yourself copying and pasting graphics and updating a ton of tag references rather than making a global change—or copying and pasting tags and updating more than a handful of addresses, then dig into templates and data types. They will save you an enormous amount of time developing your system. You can also use template repeaters and template canvases to streamline screen development further if you want to go Boss Mode.
5. Use Custom Methods on Components and Windows
Similar to tip four above, if you find yourself copying and pasting a function to more than one component's scripting window, STOP! Please use the "Custom Method" field in the scripting window instead!
Define a custom method that you can call from any other component in the window. We typically use this when we want to have a database interaction update the values in a table—and may have a handful of places from which this script needs to be called. When you define the script once, this will save you many lines of code. The real benefit comes from when need to troubleshoot and update something. Rather than doing a find/replace, and probably missing something in 11 different copies of the same function, you only need to update it in the custom method, one time, and it is applied across the entire window.
What Performance Enhancements Will You Implement Next?
If you have any other ideas for performance enhancement we missed in this post, we would love to hear them! We are also continuing to create more specific posts for the nitty gritty details of everything we have encountered in Ignition. So, be on the lookout for those here on the Corso blog!
Power Up Your Performance!
Book a 15-minute call to learn more about how Corso Systems can help with your Ignition SCADA system and beyond.