The IBM zIIP (Integrated Information Processor) is a dedicated specialty processor available on IBM mainframe systems. It is designed to offload specific workloads and processing tasks from the general-purpose processors (CPUs). Work that runs on the zIIP instead of a general-purpose CPU is not charged on your organization’s monthly IBM software bill. So, exploiting the zIIP processors available on your mainframe systems makes sense.
But only specific types of workloads are permitted to be run on zIIPs. To fully exploit the benefits of zIIPs, it is first imperative that developers understand which types of processing are zIIP eligible. After gaining this understanding, the next step is to take measures to write applications and processes that can be run on the zIIP.
As an application developer, you do not really need to know all of the details behind the scenes that must happen for work to run on the zIIP. Of course, the more knowledge you have, the better off you’ll be in terms of understanding what you are doing and why you are doing it! But knowing what can run on the zIIP (as opposed to how it actually does so) is likely all you need to know to write programs that can take advantage of your mainframe’s zIIP processors. And therefore, programs that can run cost-effectively!
What Can You Do as a Developer?
Always keep in mind that the primary purpose of the zIIP is to handle specific types of workloads, and if the workload does not fall into one of the zIIP-eligible categories, it will not run on a zIIP. The first consideration for developers to code for zIIP exploitation comes from understanding the types of Db2 for z/OS processing that can run on the zIIP. Knowing this, developers can write code that improves the chance that the application will be eligible for zIIP execution.
So what are the specific types of Db2 workloads that are zIIP eligible? From a programmer’s perspective, there are four specific areas on which to focus:
1. Programs that run distributed SQLusing DRDA or native REST calls are zIIP-eligible. Up to 60% of this type of processing can be run on zIIPs; therefore, this can be a substantial way for your application to benefit from zIIP processors.
2. Up to 100% of parallel query child processescan be run on zIIPs. Developers can help to encourage parallelism to further zIIP usage by binding packages using DEGREE(ANY) or setting CURRENT DEGREE to ANY. Of course, this should not be done blindly. First, be sure that your application can benefit from parallelism. Parallelism is most beneficial when accessing large data sets, partitioned data, and for analytical queries. If in doubt, ask your DBAs for guidance before moving forward with parallelism. Furthermore, since parallelism can only be used by read-only queries, be sure to tag each read-only cursor as FOR READ ONLY.
3. Up to 100% of XML processingfor XML schema validation and non-validation parsing, as well as for the deletion of unneeded versions of XML documents. So, if you use XML in your Db2 databases and applications, certain processing-intensive XML operations can be run on zIIPs.
4. When writing stored procedures, favor using native SQL stored procedures. Native SQL stored procedures are those coded in SQL, as opposed to COBOL or Java (for example). Native SQL stored procedures maintain their zIIP eligibility when called by a distributed thread, whereas non-native stored procedures do not.
5. Many IBM Db2 utility processes are also zIIP-eligible. Up to 100% of the index maintenance tasks for LOAD, REORG, and REBUILD INDEX are zIIP-eligible. For this reason, it is always a good idea to use Db2 utilities when possible instead of trying to code your own program that performs a similar process. For example, if you need to move data from one table to another, using UNLOIAD and LOAD is likely a better option than writing your own code to do the same thing!
Another opportunity for developers can arise if they have a choice of programming language to write their applications. Of course, zIIP eligibility may not be your primary concern, as there are many key factors that influence the selection of a programming language for application development, such as requirements, developer skill set, performance, scalability, integration, and licensing costs. Nevertheless, if you are looking to improve the chances that your code will run on the zIIP, then your first choice of programming language should be Java. Java programs can run on the zIIP, whereas programs written in COBOL and most other languages generally cannot.
It can also make sense to undertake projects that convert existing COBOL applications to Java to take advantage of the cost reductions that can accrue from running the applications on zIIPs after the conversion.
Although other types of processing are zIIP eligible, the items discussed here are the ones that are the most under the control of application programmers. By following the guidance in this post, Db2 developers and programmers can encourage the usage of zIIP processors in their applications. As you develop your mainframe applications, keeping zIIP eligibility in mind can help you to write code that is more cost-effective for your organization. And in the long run, that is what we all want!