Java Transformers: Upgrading CAIQD2E from java 8 to Java 17 causes high CPU load on startup.
search cancel

Java Transformers: Upgrading CAIQD2E from java 8 to Java 17 causes high CPU load on startup.

book

Article ID: 430101

calendar_today

Updated On:

Products

OM Spool

Issue/Introduction

We upgraded CAIQD2E from Java 8 to Java 17 yesterday. When business hours began today, the CPU usage immediately spiked to nearly 100%. There was no increase in workload, and reverting the service back to Java 8 resolved the issue. We have this in place in lower environment and did not experience this. 

Environment

OM SPOOL 14, Z/OS, Java 17 64 bit, Java 8 31/32 bit, Java Transformers

Cause

Java 64 bit requires a larger heap than Java 31 bit. In addition, Java 17 uses a different garbage collection process than Java 8. 

Two possible issues could be occurring:

1. The gap between the minimum heap and the maximum heap is too large.
  -  This can cause a CPU spike due to the fact that the heap starts small and then needs to be regrown over and over again.
  -  The heap is grown slowly to avoid over allocation, but this can lead to thousands of cycles of regrowing the heap until it is finally large enough for the application.

2. The maximum heap is not large enough for the application.
  -  This will cause issues because the application will need to freeze until garbage collection can free up enough space to start execution again.

Resolution

In CAIQENVA, set IBM_JAVA_OPTIONS to "-Xgcpolicy:optthruput" "-Xms#G" "-Xmx##G" 

Ensure each option is surrounded by double quotations.

Where # is replaced by your desired initial (Xms) and maximum (Xmx) heap size for the transformers, in gigabytes. In our testing this was set to 5 and 24, but will vary from site to site.

Monitor the task size upon heavy load, and set the initial size of the heap to that value. This will reduce the amount of growth cycles used.