# Optimization of CPU Overhead for z/OS Java

**URL:** <https://community.dynatrace.com/t/optimization-of-cpu-overhead-for-z-os-java/56128>\
**Category:** Troubleshooting\
**Tags:** zos, performance, java\
**Created:** [June 11, 2026, 2:54pm UTC](https://community.dynatrace.com/t/optimization-of-cpu-overhead-for-z-os-java/56128 "2026-06-11T14:54:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![moritzwitti](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@moritzwitti](https://community.dynatrace.com/u/moritzwitti)\
**Post date:** [June 11, 2026, 2:54pm UTC](https://community.dynatrace.com/t/optimization-of-cpu-overhead-for-z-os-java/56128/1 "2026-06-11T14:54:59Z")

</div>

## Summary

This article applies to **Dynatrace OneAgent in mainframe (z/OS) environments** and addresses **increased zIIP usage related to SQL and database query processing**. It explains the cause and describes configuration options introduced to reduce CPU overhead and improve SQL processing efficiency.

## Problem

Customers may observe an **increase in zIIP usage** , particularly in environments with **SQL‑ or database‑intensive workloads**. The increase is typically correlated with JDBC-based SQL execution and can raise concerns about higher CPU consumption and performance impact.  
If a customer experiences increase in their zIIP usage especially in the scope of SQL/DB queries, we introduced two features that should result in performance improvements.

## Troubleshooting steps

1. Identify whether the zIIP usage increase correlates with **SQL or database activity**.
2. Verify the **Dynatrace OneAgent version** running in the affected environment.
3. Check whether SQL normalization and PreparedStatements reuse are relevant for the observed workload.

## Resolution

Dynatrace introduced **SQL processing optimizations** to reduce CPU overhead and improve performance in SQL-heavy workloads.  
These optimizations include:

- Improved SQL normalization efficiency through optimized SQL tokenization
- A PreparedStatements cache to reduce repeated parsing and normalization

To enable these optimizations, configure the following settings on the affected OneAgent:

- `jdbc-sql-optimize-tokenization`&nbsp;=&nbsp;`true`
- `jdbc-sql-cache-prepared-statements`&nbsp;=&nbsp;`true`

Both settings are available starting with **OneAgent release 327** &nbsp;and can be set either via

- extending the dtconfig.json with&nbsp;`"jdbc-sql-optimize-tokenization": true`&nbsp;or
- adapting the JVM arguments to include the two arguments such as&nbsp;`-javaagent:/PATH_TO/dynatrace-oneagent-zos-java.jar=jdbc-sql-optimize-tokenization=true,jdbc-sql-cache-prepared-statements=true`

Internal testing shows the most significant improvements in environments where **PreparedStatements are effectively reused**.

# What’s next

- Monitor zIIP and CPU usage to validate the impact
- Review application behavior to ensure PreparedStatements are reused where possible
- Continue performance analysis using Dynatrace to confirm reduced SQL processing overhead

If this article did not help, please open a support ticket, mention that this article was used and provide the following in the ticket:

- description of the error you are seeing
- link to the host and process
