Enabling Use of the zIIP Specialty Engine

In this section:

If your site has a zIIP (System z Integrated Information Processor) specialty engine from IBM, you can offload specific categories of workload from the Central Processors to the zIIP.

The zIIP engine is a restricted version of a Central Processor (CP), also referred to as a General Processor (GP). The capacity of the zIIP engine does not count toward the overall MIPS rating of the mainframe image, so the CPU usage incurred on the zIIP is effectively free. Central Processors are often configured to run at speeds below their maximum rating for cost saving and capacity planning purposes. For Central Processors, 100% capacity typically refers to the maximum MIPS that the processor is allowed to generate at that installation, in accordance with your contract with IBM. In contrast, the zIIP engine always runs at true 100 percent of capacity.

As much as 80 percent of FOCUS processing is enabled to run on the zIIP engine. Typical workloads are expected to offload 30 to 80 percent of CPU processing to the zIIP engine.

To make use of the zIIP enablement feature, FOCUS must run in an authorized state. In some customer environments, certain processes are not allowed to run in an authorized state. If you attempt to run such a process in an authorized state, FOCUS will abend. In those situations, you must call FOCUS from a separate non-authorized environment.

What Is a zIIP Specialty Engine?

Though physically identical to a Central Processor, the zIIP engine is microcoded at installation time to run specific types of workloads. The Central Processor continues to handle the operating system, I/O interrupts and timer interrupts, job initiations, and user interactions with the operating system. The zIIP concentrates on CPU intensive workloads, leaving the Central Processor more time to absorb otherwise queued workloads, thereby achieving some overall performance improvement across all mainframe activity.

Steps to FOCUS zIIP Enablement

Reference:

This section describes steps and requirements for FOCUS use of the zIIP processor.

The steps to FOCUS zIIP enablement are:

  1. Obtain a personalized FLICENSE file that licenses you to use the zIIP feature. For instructions, see the z/OS Installation Guide.
  2. Obtain APF authorization for all load libraries. For instructions, see Obtaining APF Authorization for All Load Libraries.
  3. For Interactive processing, additionally obtain AUTHCMD and AUTHPGM authority. For instructions, see Obtaining AUTHCMD and AUTHPGM Authority for Interactive Processing.
  4. Activate the zIIP feature using the SET ZIIP=ON or SET ZIIP=ON/SIMMAXZIIP command. For instructions, see Activating a Real or Simulated zIIP Environment.

Your site may not allow certain processes to run in an authorized state. Therefore, there may be times when you need to run FOCUS in an unauthorized state. For information about establishing a non-authorized environment after enabling the zIIP feature, see Establishing an Unauthorized Environment After Enabling the zIIP Feature.

Reference: Usage Notes for Use of the zIIP Processor

  • IBM restricts the DB2 DSN command to TMP tasks only. This means that a call to DB2 using the DSN command will not create the authorized environment that is required to invoke an Enclave SRB transaction. Therefore, DSN CMD transactions are not zIIP eligible. This is a DB2 restriction that IBM does not plan to change. Therefore, the following sample JCL for calling FOCUS from DB2 is not zIIP-eligible:
    //SYSTSIN  DD *
    DSN SYSTEM (DS0)
    RUN PROGRAM(FOCUS) PLAN(DSQLTA)
    END
    /*
  • Maximize the blocksizes of data sources that are read or written by FOCUS to reduce the number of I/Os required to access the file. This will reduce the number of switches to non-zIIP mode that FOCUS has to make, thus permitting a greater percentage of zIIP contribution to the request.
  • Move or rewrite functions developed at your site since FOCUS must switch to non-zIIP mode for each call to such routines. You may be able to use one of the following possible solutions:
    • Move the routines from DEFINEs to COMPUTEs to reduce the number of times they are referenced. This tactic must be applied carefully, and only when report results would not change.
    • Rewrite the routines using DEFINE FUNCTION, which executes on the zIIP processor.
    • Confine the routine to a pre-step run with ZIIP=OFF which collects its calculated results, then use those calculations in the next step with ZIIP=ON.

Obtaining APF Authorization for All Load Libraries

Reference:

Authorization in batch is established by two trigger actions:

If you have been running in an authorized state for a while without problems and you suddenly get the 32577 message, something in your environment has changed. You have called a new module that was not called in prior runs, and this module is not authorized. See Troubleshooting Authorization Errors for a technique you can use to find the module that is causing the problem.

Note: Authorization in TSO requires an additional trigger action. This step is described in Obtaining AUTHCMD and AUTHPGM Authority for Interactive Processing.

All libraries that contain load modules must be APF authorized in SYS1.PARMLIB in the PROGxx member.

Example: Establishing an Authorized Environment for Using the zIIP Feature

Use the following sample of SYS1.PARMLIB(PROGxx) entries as a guide for obtaining APF authorization for your load libraries:

APF FORMAT(DYNAMIC)
 /* =============================================================== */
 /*    FOR APF AUTH LIBRARIES                                       */
 /* =============================================================== */
APF ADD DSNAME(hlq_prod.FOCLIB.LOAD)  VOLUME(volser)
APF ADD DSNAME(hlq_prod.FUSELIB.LOAD) VOLUME(volser)

where:

hlq_prod

Is the high-level qualifier for your FOCUS production libraries.

volser

Is the volume serial number of the disk pack containing the library.

Reference: Troubleshooting Authorization Errors

In a typical environment, a site will use its production FOCUS CLIST or JCL to validate the authorization process. Production CLISTs and JCL often allocate a large number of load libraries. This can make it difficult to tell which load libraries are not correctly authorized. Therefore, a good troubleshooting technique if you get the 32577 authorization message is to create a CLIST or JCL procedure that contains only the minimum number of libraries needed to run FOCUS. When that procedure works correctly, you can add other libraries one at a time until you get the 32577 message again. This would indicate that the last library you added to the CLIST or JCL was not authorized.

Note that in order to execute FOCUS, you must allocate the FOCLIB.LOAD, FUSELIB.LOAD, MASTER.DATA, FOCEXEC.DATA, and ERRORS.DATA libraries. You must issue the call to FOCUS from the authorized FOCLIB.LOAD library.

Obtaining AUTHCMD and AUTHPGM Authority for TSO Processing

If you run FOCUS under TSO, you must still APF authorize all load libraries that will be called by the FOCUS module, and the FOCUS module must be linked with the AC/1 attribute.

In addition, your system support staff must authorize the FOCUS program under TSO. To authorize the FOCUS program in TSO, have your system programmer update the IKJTSOxx member of the SYS1.PARMLIB for TSO Interactive (IKJTSO) and TSOBATCH (IKJEFT) programs of your site. They will have to authorize the command and program sections.

IBM restricts recursive calls to ISPF when you are operating in an authorized state. Therefore, if you execute FOCUS from ISPF option 6, you will not be able to issue the TSO ISPF or IEDIT commands from within FOCUS.

CALLs to a library are supported in both TSO and TSOBATCH environments.

RUNs to a library are supported in both TSO and TSOBATCH environments.

Example: Establishing an Authorized Environment for Using the zIIP Feature Under TSO

Use the following sample as a guide for obtaining AUTHCMD and AUTHPGM authority under TSO:

/* *************************************************************** */
/*                    SYS1.PARMLIB(IKJTSOxx)                       */
/* *************************************************************** */
AUTHCMD NAMES(          /* AUTHORIZED COMMANDS      */ +
   FOCUS                /* FOCUS                    */ +

AUTHPGM NAMES(          /* AUTHORIZED PROGRAMS      */ +
   FOCUS                /* FOCUS                    */ +

Activating a zIIP Environment or Projecting zIIP Usage

How to:

The last step in zIIP enablement is to activate the use of the zIIP processor in FOCUS. zIIP enablement is activated by the SET ZIIP command.

The SET ZIIP command has three options:

Syntax: How to Activate the zIIP Enablement Feature

You can issue the SET ZIIP command in FOCPARM or in a batch job stream.

SET ZIIP={ON[/SIMMAXZIIP]|OFF}

where:

ON

Configures FOCUS to offload processing to the zIIP engine.

This setting:

  • Determines if the zIIP processor is accessible to the LPAR in which a job is running.
  • Determines if the FOCUS (Batch or TSO) environment has been properly authorized to run a zIIP workload.

Note: If FOCUS determines that the zIIP processor is not accessible or that the environment has not been authorized correctly, it issues a message describing the reason and continues in ZIIP=OFF mode, which forwards all subsequent work to the Central Processor.

ON/SIMMAXZIIP

Configures FOCUS to either:

  • Project what the zIIP usage would be if FOCUS could offload processing to a zIIP, when FOCUS is operating in an LPAR without a zIIP. This requires that the PROJECTCPU parameter be set to YES.

    The SYS1.PARMLIB member IEAOPTxx contains the PROJECTCPU statement. Activating the PROJECTCPU parameter projects zIIP consumption when a zIIP processor is not yet defined to the LPAR. SMF type 30 records will show the potential calculated zIIP time, so that you can accurately project zIIP usage. This enables you to evaluate the effect of configuring a zIIP processor to be available for FOCUS usage. Your site's Systems Programmer will have access to this data. Use this option for simulation purposes only.

    Since the zIIP engine actually is not present, all zIIP-eligible workload will be diverted to the Central Processor. Thus all of that CPU utilization will be recorded in a FOCUS variable called &FOCZIIPONCP. This is the amount of workload that would have run on the zIIP engine, and would have appeared in &FOCZIIPCPU, had the zIIP been present and accessible to FOCUS work. This information is also recorded in the log file of the FOCUS Utilization Reporting utility (FOCLOG) as well as in IBM SMF type 30 records.

    To use this option, insert the following parameter in SYS1.PARMLIB for your LPAR, and also issue the SET ZIIP=ON/SIMMAXZIIP command:

    PROJECTCPU=YES

    This setting:

    • Determines if the PROJECTCPU=YES command has been set in the LPAR.
    • Determines if the FOCUS (Batch or TSO) environment has been properly authorized to run a zIIP workload.
  • Project zIIP utilization if 100% of eligible FOCUS processing could be offloaded to the zIIP, when FOCUS is running in an LPAR with a zIIP. This lets you determine what you would gain by configuring Workload Manager to give FOCUS a bigger share of zIIP processing.

    IBM Workload Manager (WLM) prioritizes workloads among the Central Processors and zIIP processors at your site based on a complex set of goals and rules established by the system administrator. These rules apply to all workloads from all sources, not just FOCUS. These goals combine to influence the decision to direct FOCUS requests to the zIIP engine at any particular moment.

    Utilizing this setting with a zIIP present can help you determine how much advantage you would get if FOCUS had more of a share of the zIIP processor. To see the difference in actual and projected zIIP usage, run the same job with SET ZIIP=ON and then with SET ZIIP=ON/SIMMAXZIIP and compare the results. For more information about evaluating zIIP usage, see Evaluating zIIP Usage.

    This setting:

    • Determines if the zIIP processor is accessible to the LPAR in which a job is running.
    • Determines if the FOCUS (Batch or TSO) environment has been properly authorized to run a zIIP workload.

Note: If FOCUS determines that the environment has not been authorized correctly, it issues a message describing the reason and continues in ZIIP=OFF mode, which forwards all subsequent work to the Central Processor.

OFF

Configures FOCUS not to offload processing to the zIIP engine. OFF is the default value.

Information Builders Note: Turn off zIIP enablement only when you know for sure that a job will not gain any advantage from using the zIIP processor or if the system operator or administrator requires that you turn it off.

Example: Setting the PROJECTCPU Parameter in SYS1.PARMLIB Member IEAOPTxx

Use the following sample as a guide for setting the PROJECTCPU parameter in SYS1.PARMLIB(IEAOPTxx):

/* **************************************************************** */
/*                    SYS1.PARMLIB(IEAOPTxx)                        */
/* **************************************************************** */
PROJECTCPU=YES

Establishing a Non-authorized Environment After Enabling the zIIP Feature

Your site may not allow certain processes to run in an authorized state. Therefore, there may be times when you need to run FOCUS in an unauthorized state. Some examples of such processes are ENDEAVOR or recursive calls to ISPF.

If you run such processes, you need to have both the authorized and non-authorized FOCUS environments available for use at your site. The authorized FOCUS environment will use the zIIP processor. The non-authorized FOCUS environment will enable you to run processes such as ENDEAVOR, but it will not provide the benefit of offloading FOCUS processing to the zIIP engine.

Example: Establishing a non-Authorized Environment While Using the zIIP Feature

There are two methods you can use to bring up a non-authorized version of FOCUS if you have FOCUS configured to utilize the zIIP, but run into a situation where a program called by FOCUS requires a non-authorized state in order to execute.

Method 1: Calling FOCUS From a Different Library

This method works only if FOCUS processing is run only in batch, not under TSO. For this method, make a copy of the production FOCLIB.LOAD library, call it FOCLIBNA.LOAD, and do not APF authorize this load library. Replace FOCLIB.LOAD with the FOCLIBNA.LOAD library in your batch FOCUS JCL.

Method 2: Calling FOCUS By a Different Name

The second method works in both FOCUS batch and TSO environments. For this method, you need to create a new FOCUS module called FOCUSNA which does not have the AC/1 authorization attribute linked. You can place this module either in the production FOCLIB.LOAD library or in a new load library (for example, FOCLIBNA.LOAD). Change your CALL statement to call FOCUSNA instead of FOCUS from the relevant library.

The JCL to create the FOCUSNA module is distributed as member FOCUSNA in the FOCCTL.DATA library:

  1. Copy the FOCUSNA member to your FOCUS production JCL library.
  2. Make a copy of your FOCLIB.LOAD library and call it FOCLIBNA.LOAD.
  3. Instructions for editing the JCL for your site are included as comments in the FOCUSNA member. Make the recommended edits to the FOCUSNA JCL.
  4. Execute the FOCUSNA JCL.
  5. Check the FOCLIBNA.LOAD library for the presence of the new FOCUSNA module and EDASAFNA alias.

    Please note that the FOCUSNA module will have an authorization attribute of AC/0, which means that the module was not linked with authorization.

The following is a sample CLIST for calling the FOCUSNA program from a new load library named FOCLIBNA.LOAD in TSO:

CONTROL MSG LIST
WRITE *********************************************************
WRITE
WRITE    Sample FOCUS CLIST
WRITE
WRITE *********************************************************
WRITE
FREE FI(USERLIB FOCLIB ERRORS MASTER FOCEXEC)
ALLOC F(USERLIB)  DA('hlq_test.FOCLIBNA.LOAD' -
                    'hlq_prod.FUSELIB.LOAD') SHR REU
ALLOC F(MASTER)   DA('hlq_prod.MASTER.DATA') SHR REU
ALLOC F(FOCEXEC)  DA('hlq_prod.FOCEXEC.DATA') SHR REU
CALL 'hlq_test.FOCLIBNA.LOAD(FOCUSNA)'

where:

hlq_prod

Is the high-level qualifier for your FOCUS production libraries.

hlq_test

Is the high-level qualifier for the new FOCLIBNA.LOAD library that contains the FOCUSNA module. After testing this method, you can move the FOCLIBNA.LOAD library to the production environment along with your other FOCUS production libraries, by copying it to the same high-level qualifier as your FOCLIB.LOAD library.

How FOCUS Takes Advantage of the zIIP Processor

FOCUS diverts eligible workload to the zIIP engine by switching from TCB (Task Control Block) mode for workloads that can run only on a Central Processor to SRB (Service Request Block) mode for execution of enabled workloads on the zIIP engine.

Types of FOCUS processing that are offloaded to the zIIP engine include:

The FOCUS zIIP Monitor detects situations in which the overhead cost of zIIP usage is exceeding the CPU benefits gained. When this threshold is reached, FOCUS may decide to suspend use of the zIIP for the duration of that command. It then resets to make the zIIP processor accessible to the next command.

TABLE, MATCH, and MORE requests may suspend and resume more than once as they progress through logical phases of execution.

In every case, FOCUS attempts to optimize the use of the zIIP and minimize chargeable CPU costs.

Applications that perform significant database I/O, high-volume sorting, or the use of third party tools or user functions during processing require switching out of SRB (zIIP) mode into TCB (non-zIIP) mode to communicate, and then back again to continue processing. Although each switch is miniscule, the cumulative effect can absorb measurable amounts of CPU time on both the zIIP engine and the Central Processor.

In order to diminish this effect, FOCUS buffers the collection of records passed to the system sort utility and some adapters rather than passing one record at a time, thus reducing the number of switches between TCB and SRB modes.

These third party products may themselves be zIIP enabled and may offload some or all of their processing to the zIIP engine independent of FOCUS. FOCUS always calls these products from the Central Processor because it cannot know whether they will perform any processing that is prohibited on the zIIP.

Even though zIIP usage occurs more frequently on non-optimized requests to a relational data source, optimized requests are still inherently more efficient and, therefore, may incur less CPU time. Being zIIP enabled, DB2 may also take advantage of the zIIP processor for FOCUS requests based on the local configuration of DB2 relative to FOCUS.

Requests against some types of data sources whose I/O can be buffered gain a lot of advantage from zIIP enablement. Data sources that gain the most benefit from zIIP processing due to buffered I/O include:

Evaluating zIIP Usage

In order to evaluate FOCUS zIIP processing in a session, you can query three Dialogue Manager variables that accumulate statistics about FOCUS processing:

The FOCLOG and SiteAnalyzer products that monitor FOCUS usage also capture zIIP statistics for a session.


Information Builders