Home > Data Center Tips > CICS Newsletter > Taking advantage of the CICS workload dispatch ratio
Data Center Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

CICS NEWSLETTER

Taking advantage of the CICS workload dispatch ratio


Robert Crawford, Contributor
05.20.2008
Rating: -5.00- (out of 5)


IT infrastructure news
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Sometimes the CICS guy has trouble convincing the performance team that CICS needs more CPU because the CICS setup in workload manager (WLM) allows it to get whatever it needs when it needs it. However, a handy figure, called the dispatch ratio can be your guide for telling when CICS or its transactions are waiting in line too long.

For this concept and its use I'm indebted to the late, great CICS guru, Robert ("Arch") Archambeault.

CPU versus dispatch time
Workload dispatching hasn't changed much since multiprogramming hit the scene. Sure, we have WLM to jiggle the priorities, but that just moves the blocks around on the chain.

The diagram below shows the arc of a simplified unit of work (UOW). Typically a task processes until it does something causing a wait, (e.g., I/O). While it waits the UOW is considered non-dispatchable. Then, when the I/O completes, the dispatcher marks the task as dispatchable and puts it back on the chain. However, there is typically another UOW on the chain processing, so the task has to wait a little. After regaining the processor the UOW will execute until it does something to take itself off of the dispatching chain. For the purposes of my discussion, the green areas represent CPU time. Together the yellow and green areas represent dispatch time.

[IMAGE]

This is true for any type of dispatcher, and while priority may change a task's position on the chain it usually does so at the expense of others. In addition, CICS and its task control blocks (TCBs) are dispatchable units of work to the system. Therefore, not only is there a potential wait on CICS' dispatch chains, the TCB it's running under has to fight its way to the top of the multiple virtual storage (MVS) chain as well.

Dispatch ratio
CICS monitoring facility (CMF) records keep track of how long a task is dispatchable as well as the amount of CPU it uses. In fact, there are buckets for dispatch and CPU time for the various TCBs a task may run...

BROWSE BY TAG
CICS Newsletter,   Mainframe operating systems and management,   Server hardware,   Mainframe computers,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
CICS Newsletter
IBM z/OS 1.11 preview: New features and functions
New statistics for CICS Transaction Server 3.2
Manage CICS workloads with transaction classes
Run CICS in batch to beat a shrinking batch window
Ensuring CICS security with the Web Services Security standard
Use DFHLS2WS to expose CICS applications as a Web service
Using IBM IPCS to battle software bugs
CICS and Web services: Ready to go
Using External Call Interface (EXCI) to access CICS
Using CICS event monitoring points (EMPs) for tuning and debugging

Mainframe operating systems and management
Roadmap to mainframe application modernization
Improve CICS Web services security and handle Web transaction requests
Coding a simple mainframe cryptography program
How is CICS prepared for future IT market demands?
Why IBM should listen to Neon Software, customers on zPrime
Aussie financial firms dump Unix, Windows for Linux on the mainframe
Using cryptography on the mainframe: An amateur's guide
How mainframes fit into cloud computing
IBM z/OS 1.11 preview: New features and functions
Neon Software CEO rejects IBM warnings on mainframe licensing issues due to zPrime

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
epoch  (SearchDataCenter.com)
ISPF  (SearchDataCenter.com)
job  (SearchDataCenter.com)
Job Entry Subsystem  (SearchDataCenter.com)
job scheduler  (SearchDataCenter.com)
job step  (SearchDataCenter.com)
MVS  (SearchDataCenter.com)
P/390  (SearchDataCenter.com)
Remote Job Entry  (SearchDataCenter.com)
z/OS  (SearchDataCenter.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


under. Similarly, dispatcher domain TCB mode interval statistics records keep the same information at the system task level.

All this makes it very easy to calculate the dispatch ratio:

dispatch ratio = CPU/dispatch time

This equation yields a percentage that should always be < 100%. The higher the percentage the more quickly tasks are getting to the CPU when they're ready to execute. A lower percentage means work is ready and willing but has to wait for others to get out of the way. In his presentations, Bob Archambeault stated that 80% was the lowest dispatch ratio you want to see. However, a lower ratio may be fine if throughput remains steady and response time is low.

There may be several reasons for low dispatch ratios. The simplest answer is CICS as a whole is running at too low of a priority. In this case you will probably see a low dispatch ratio in both the dispatcher domain statistics and the CMF records. If the TCB mode statistics dispatch ratio is fine, but bad in the CMF records, it may be a task's priority is too low relative to the other transactions in the system. It may also be an indicator that the region is too busy.

This brings us to one of CICS' weaknesses: the quasi-re-entrant task control block (QR TCB). As you probably know, traditional, non-threadsafe CICS applications must run under the QR TCB. While the CICS dispatcher does a good job of sharing the TCB the fact is there is only one and it can never utilize more than 100% of one processor. When the QR TCB approaches the 100% limit the QR dispatch chain will get longer and transactions will have to wait longer to execute. Then it is time to follow the classic CICS solution of creating a new region to run the work under another QR TCB.

This brings up another handy measure for which I owe Dr. Stephen Hitzfelder. It is TCB busy and is calculated as:

TCB busy = CPU/(time of measurement interval)

The denominator depends on the time of measurement. For example, if you cut statistics records every hour you would divide the accumulated CPU time for the TCB by 3,600 seconds. This also gives a percentage, but in this case the lower the better. You might want to start worrying if the busy time exceeds 70%. You may want to substitute the dispatch time for CPU if you think the TCB might use more CPU if it had a chance.

Here are some other situations that might create low dispatch ratios:

  • If the CMF or Dispatcher domain statistics records show a low ratio for the L8 (open) TCBs, it may be time to look those TCBs priority. Remember that CICS gives you the option to run L8 TCBs at a low, equal or higher relative to the QR TCB.
  • If the dispatch ratio is low for individual tasks and the QR TCB, CICS itself may be running at too low of a priority or the LPAR may be out of gas.
A final word of warning: The dispatch ratio calculated from TCB mode statistics for low activity TCBs may be invalid. An example would be the resource owning task control block (RO TCB). Apparently some multiple virtual storage (MVS) timer facilities have trouble measuring CPU in low activity tasks. Don't worry if the calculation yields a percentage greater than 100% because chances are the low use TCB isn't one of your problems.

ABOUT THE AUTHOR: For 24 years, Robert Crawford has worked off and on as a CICS systems programmer. He is experienced in debugging and tuning applications and has written in COBOL, Assembler and C++ using VSAM, DLI and DB2.

Rate this Tip
To rate tips, you must be a member of SearchDataCenter.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



White Papers - Data Center Networking

The Intel IT Technology Center - Power, Performance and Mobility Solutions

HomeNewsTopicsITKnowledge ExchangeTipsBlogsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts