IBM Support

IBM i ACS Memory Usage

Troubleshooting


Problem

The amount of memory used by the IBM i Access Client Solutions (IBM i ACS) base Java package is much higher than with IBM i Access for Windows.

Symptom

This issue might be an issue on a memory constrained environment, like a PC with low internal memory or on Citrix Server environments

Cause

This issue is for IBM i Access Client Solutions (ACS) Base Package, which is Java based. By default the maximum JVM heap storage used is set to 1024mb. Also, the amount of memory being used by the process is different than the amount of memory being used by the JVM heap. That is, Using some Windows tool to see the size of the heap, it is not reporting the size of the JVM heap but rather the size of the heap used by the Windows process, which includes JVM heap as part of it.

Environment

The IBM i Access Client Solutions (IBM i ACS) base Java package, which consolidates the most commonly used tasks for managing your IBM i into one simplified location, like 5250 emulation, Data Transfer, Integrated File System, Printer output.

Resolving The Problem

 A valid suggestion for a memory constrained environment is to have you specify -Xmx on your Java startup to limit the maximum heap size that the JVM can allocate. This change is not something that we normally would ever recommend. As the flip side is that you might receive OutOfMemory exceptions or crash. If that occurs, then slowly increase the value you use until you stop receiving those errors.

 From some experiments, we have done by using -Xmx50m. We were able to start 4 5250 sessions and the fifth one got the OutOfMemory. However, we were starting the session and did not do anything in the session. For example, if We start Screen History with one session, we will soon get the OutOfMemory with just a single 5250 session.

Basically you are free to experiment on your own with your own settings in your own environment and users.

There may be cases with large Data Transfers or Run SQL Scripts usage the default 1024mb maximum JVM Heap size may be exceeded and if the PC resources allow it may be desirable to increase the maximum JVM heap size for the IBM i ACS launch.

You can use -Xmx##m on the Java -jar acsbundle.jar command or even on the acslaunch_win-64.exe or acslaunch_win-32.exe.

Besides the previous information, it certainly helps to use 64-Bit Java if the platform supports 64-Bit, as the Java bitness determines whether ACS runs with 32-Bit or 64-Bit, and not the Windows operating system bitness. And plans to be current on the Java version being used.

Another option would be to create your own scripts with different memory settings to start ACS depending on the need of functions the user is going to use.

As this package is depended on Java, you might set up an environment variable JAVA_OPTIONS, in that variable you can set the memory and any other property.  Be careful with this JAVA_OPTIONS variable, as this setting will be system-wide, so other Java applications running on this system uses that memory value, which might lead to issues with that Java Application.

NOTE:

  If the JVM heap size is modified and an OOM (Out of Memory) or hang is encountered, IBM will not support this Out of Memory issue.

The size of the heap required will depend on what features of ACS are being used, how many are being used, and what the user is doing. So different users might have different heap requirements. When they run out of memory, the JVM crashes and they lose everything they were doing.
The first option should be to buy more memory.
 However, if the JVM is modified, here is an example (for each set of users based on the ACS features they use):
For testing various heap sizes, invoke the environment from the command line.  If the JVM crashes because it was OOM, they see it in the command prompt.  Of course, the JVM might slow down and appear to hang while it tries to keep from crashing.  Either way, the heap is too small.
For example, the following causes an OOM after starting ACS, then starting 3 or 4 emulator sessions.
              C:\iaa_test_m8_internal>Start_Programs\Windows_x86-64\acslaunch_win-64.exe -Xmx50m
                    java.lang.OutOfMemoryError: Java heap space
                    at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
                    at java.awt.image.Raster.createPackedRaster(Raster.java:467)

Here's an example of starting a 5250 display session by using a.hod file...then start several other ACS features from the 5250 session toolbar.
            C:\iaa_test_m8_internal>Start_Programs\Windows_x86-64\acslaunch_win-64.exe -Xmx50m \Users\Bob\Desktop\ut33p23.hod
                 java.lang.OutOfMemoryError: Java heap space
                 at java.desktop/java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
After they figure out what they consider a good JVM heap size, they might modify the desktop shortcut for ACS.

Right-click the ACS icon, select Properties

The Target field should look something like this:
              C:\Users\Windows_User\IBM\ClientSolutions\Start_Programs\Windows_x86-64\acslaunch_win-64.exe

Append to the Target field the heap size you want to use so it looks like:
              C:\Users\Windows_User\IBM\ClientSolutions\Start_Programs\Windows_x86-64\acslaunch_win-64.exe -Xmx50m
If you want to call an ACS plug-in or specific hod file, set the Target like this:
             C:\Users\Windows_User\IBM\ClientSolutions\Start_Programs\Windows_x86-64\acslaunch_win-64.exe -Xmx50m C:\Users\Windows_User\Desktop\ut33p23.hod
If you want a short-cut for different 5250 sessions by using different hod files.  Accordingly, hod files, duplicate the ACS Desktop icon (Create shortcut) for each one and set it.
Do lots of testing before rolling out to your users.

[{"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SSRQKY","label":"IBM i Access Client Solutions"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB66","label":"Technology Lifecycle Services"}}]

Document Information

Modified date:
20 July 2021

UID

ibm10737197