Channel Performance Reporting

(Originally posted 2009-11-22.)

Our channel reporting has consisted forever of a single chart. Before I tell you what the chart looked like I’ll hazard that your channel reporting was about as bad. 🙂

See, it’s not something people tend to put much effort into.

Our one-chart report basically listed the top channels, from the perspective of the z/OS system under study, ranked by total channel utilisation descending – as a bar chart. The raw data for this is SMF Type 73. Actually there were two refinements people had made over the decades:

  • Someone acknowledged the existence of the (then-called) EMIF capability to share channels between LPARs in the same machine. So stacked on top of this partition’s busy they added other partitions’ busy.
  • Someone supported FICON by using the new FICON instrumentation to derive channel utilisation. (Of course if the channel’s not FICON we still use the old calculation: with some smart copying involved.)

And that’s where we left it until I got my hands on the code…

  • The first thing I did, some months ago, was to add the channel path acronym (for example “FC_S” for “FICON Switched”). This is also in SMF 73.
  • The second thing was much more significant:

    The “other partitions’ busy” number is all other partitions’ use of the channel, without breaking down which other partitions these are.

  • The third thing was a nice “fit and finish” item: Listing which controllers were attached to which channel.

Which LPARs Share This Channel

Each z/OS image can create its own SMF 73 records. For me I’m hostage to which systems my clients send in data for. Also I have to cut down the potential LPARs in the data. I do this using the following rules:

  • The channel number (in Type 73) has to match.
  • For multiple Logical Channel Subsystem (LCSS) machines (System z9 and System z10) the LCSS number must match. (This can be gleaned from Type 73. Actually Type 70 as well – as each LPAR has only one LCSS.)
  • The machine serial number has to match. (Machine serial number isn’t in Type 73. You have to go to the Type 70 for it.)
  • (I do a “belt and braces” check that the Channel Path Acronym (in Type 73) matches.)

So that set of checks tells you which LPARs really share the channel. And so you can then stack up their utilisations to gain a better picture of the channel. It’s quite nice when you do.

One other thing: Because I don’t necessarily see all the LPARs sharing a channel I compute an “Other Busy” number and add that to the stacked bar. In fact my test data showed all the major channels were missing LPARs’ contributions.

Which Controllers Are Accessed Using This Channel

To me a channel isn’t really interesting until you know what’s attached to it. (In my current set of data my test LPAR’s data shows one group of four channels attached to five controllers and another group of eight attached to two controllers.)

Working out which controllers are attached is quite fiddly:

  1. Use SMF 78 Subtype 3 (I/O Queuing) records to list the Logical Control Units (LCUs) attached to this channel.
  2. Use some magic code we have to relate LCUs to Cache Controller IDs. Basically it does clever stuff with SMF 74-5 (Cache) and 74-1 (Device) records to tie the two together.

I made a design decision not to annotate the graph with LCU names as there are usually many in a Cache Controller. It would be very cluttered if I had. (I do have another report that lists them and the channels attached to them.) Instead I list the Cache Controller IDs. You can probably relate to Controller IDs. If we’ve done our homework (and as we use your cache controller serial numbers we generally have) you’ll recognise the IDs.

So, if you’re one of my customers and I throw up a chart that shows channels and systems sharing them and the controllers attached it may look serene and slick. But believe me, there’s a lot of furious paddling that’s gone on under the surface. 🙂

But I tell you all this in case you’re wondering about how to improve your channel reporting. And I still think there’s more I can do in this area – particularly with the (more exotic) SMF 74-7 record, which brings FICON Director topology into play. And everything I’ve said above applies equally to whichever tools you use to crunch RMF SMF, I’m quite sure.

A Few Thoughts On Parallel Sysplex Test Environments

(Originally posted 2009-11-09.)

There’s a pattern I’ve seen over a number of test Parallel Sysplex environments over the past few years, a couple of them in situations this year:

It’s not much use drawing performance inferences from test environments if they’re not set up properly for performance tests.

Sounds obvious, doesn’t it?

There are two problem areas I want to draw your attention to:

  1. Shared Coupling Facility Images

    If you run a performance test in an environment with shared coupling facility images you stand to get horrendous request response times and the vast majority of requests going async (given a chance). I’ve even seen environments where XCF refuses to use coupling facility structures and routes ALL the traffic over CTCs. (And I’ve seen a couple of environments where there are no CTCs to route it over and XCF traffic is then reduced to a crawl.)
  2. "Short Engine" z/OS Coupled Images

    In a recent customer situation I saw the effect of this: The customer was testing DB2 Loads where actually it was a bunch of SQL inserts. They were also duplexing the LOCK1 structure for the data sharing group. The Coupling Facility setup was perfect, but still response times became really bad once duplexing was established for the LOCK1 structure. Two salient facts: Because of duplexing all the LOCK1 requests were async. XCF list structure request response times were always awful.

    The answer to why this problem occurred lies in understanding how async requests are handled: The coupled z/OS CPU doesn’t spin in the async case. In the "low LPAR weight relative to logical engines online" case the z/OS LPAR’s logical engines were but rarely dispatch on physical engines. This meant there was a substantial delay in z/OS detecting the completion of an async request. Hence the elongated async response times. As I said, the LOCK1 structure went async once it was duplexed.

    As it happens the physical machine wasn’t all that busy: Allowing the LPAR to exceed share – using a soaker job – ensured logical engines remained dispatched on physical engines longer. And, perhaps paradoxically, the async request response times went right down. This, I hope, reassured the customer that in Production (with "longer-engine" coupled z/OS LPARs) async coupling facility response times ought to be OK.

Now, this is just Test. But it could unnecessarily freak people out. But, hopefully, it’s easy to see why Test Parallel Sysplex environments might perform much worse tan Production ones.

(I’m guessing you’re going "duh, I knew Test would be worse than Prod". 🙂 But these two cases are specifics of why Test might be even worse compared to Prod than expected.)

Anyhow, I thought they were interesting. And I have seen 1. quite a few times now. 2. not so much, in fact only once so far.

DDF Performance – Version 3 – but still highly relevant

(Originally posted 2009-11-08.)

I’ve just submitted a set of slides to Slideshare. They’re not mine, they’re not new, they’re not even in a modern format. But they are a very good presentation worth preserving…

In 1993 Curt Cotner presented a set of slides on the new DDF Inactive Thread support in Version 3 of DB2. It’s still highly relevant and this support was the base on which the Version 4 WLM classification line item was built.

You can find the slides here.

I’d also recommend you went on to read John Arwe’s paper on Preemptible-Class SRBs.

European System z Tech Conference – Brussels 4-8 May 2009

(Originally posted 2009-05-07.)

I’m reporting what I’m learning (or I think is significant) in conference sessions on Twitter. My Id is “MartinPacker” and I’m using the Hashtag “#zOS09” to tag my posts. Feel free to follow along. In principle you don’t even need to sign up to Twitter to do this.

It seems more immediate than posting here.

Oh, and feel free to comment on Twitter using the same tag.

Javascript on z/OS For Beginners – Getting It To Run

(Originally posted 2009-04-26.)

Here’s another “For Beginners” post to encourage people to just leap in and try it…

Javascript is a language popularly used for such things as web pages with some programming in them (and that includes frameworks like dojo), building Firefox extensions, and the Adobe AIR (desktop) runtime. As it happens I’m pretty familiar with Javascript anyway – having done all 3 of the above. This post shows how I got it to run on z/OS using Mozilla’s Rhino…

Mozilla’s Rhino project is a javascript interpreter written in java. (Java 6 does in fact have a general-purpose scripting interface – with javascript as a prime target.) It’s important to note that Rhino requires Java 5.

So here’s what I did…

  1. Downloaded the Rhino package to my PC from here.
  2. Unpacked it on my PC using a Zip tool (in my case 7-Zip).
  3. Tested it out on my PC – just to get comfortable with how it worked (and that was well worth the half an hour it took).
  4. FTP’ed binary the included js.jar file to an HFS file (in my case /u//rhino/js.jar). The file was under 1MB in size.
  5. Adjusted my CLASSPATH to point additionally to js.jar (including js.jar explicitly, not just the directory it was in).
  6. Invoked Rhino in interactive mode:
    java org.mozilla.javascript.tools.shell.Main
  7. Typed in a few javascript statements such as
    print(1+2)
  8. Quit by typing “quit()”

You can pass the name of a javascript file to Rhino by adding eg “test.js” to the command to invoke it.

In my case I also used the “.profile” startup script to adjust my CLASSPATH and to alias “js” to mean “run the Rhino javascript interpreter”.

So, it’s actually VERY straightforward to run Javascript under z/OS – thanks to Rhino. (And I suspect anyone with Java 6 installed would find it even easier.)

As always, if you know better please feel free to comment here. Remember, I’m learning as I go, and I just want to encourage others to try a few things.

z/OS Unix System Services For Beginners – Java Hello World

(Originally posted 2009-04-25.)

In this post (and any others in a similar vein) I'm going to be displaying a great deal of ignorance – but I think I'm doing it in a good cause.

I know a fair amount about things like Java, XML and C++ – but NOT on z/OS. So I'm determined to learn and present what I learn as "For Beginners" posts here.

The idea is that I'll encourage other people with more traditional z/OS skills to try some simple new things, such as java. So, if you've not done these things before do have a go. Stuff is remarkably straightforward to do.

Here's how I created a simple "Hello World" java application in Unix System Services.

  1. Log onto TSO with a region of 64MB (64000 in the logon panel). When I tried this with 32000 I got a "JVMDBG001" message, complaining of not being able to GETMAIN enough memory to start the JVM (but the JVM started anyway).
  2. Type OMVS. (If your userid has been set up to use Unix System Services it should start you in a directory (mine being "/u/userid").
  3. Create a subdirectory using "mkdir javatest".
  4. Change to this subdirectory using "cd javatest".
  5. List what's in this subdirectory (actually nothing) using "ls".
  6. Create a new java source file using "oedit Hello.java".
  7. While in the (ISPF) Editor add the following lines:
    
    public class Hello{
      public static void main(String args[]){
        System.out.println("Welcome!");
      }
    }
    
    
  8. Press PF3 to save. (Treat the resulting dialog as any "leaving ISPF" dialog.)
  9. Compile the resulting java with "javac Hello.java".
  10. Run the compiled java bytecode with "java Hello".

And that's all there is to it. One note – if you're not familiar with java: Case is significant. Mismatches would cause problems.

The java book I used to get started (and then some) was Deitel & Deitel's "Java How To Program" but there are lots of them to choose from.

If you're more experienced at this than me please feel free to comment as you see fit. But remember this is a "For Beginners" post. I'm trying to encourage people to GET STARTED.

DB2 Data Sharing and XCF Job Name

(Originally posted 2009-04-25.)

Back in z/OS R.9 RMF Parallel Sysplex New Fields (in 2007) I mentioned a new field: R742MJOB (XCF Member Job Name.)

At the time I had no real customer data so I could only espouse the HOPE that this field would be useful. (When I asked for it to be added to the SMF 74 Subtype 2 record it seemed to me it probably would be.)

Now that z/OS R.9 is “mainstream” I’m seeing lots of data at this level. And so, because it’s mainstream, I think it’s time to talk some more about this field (and to tell you what I’m seeing in customer data). I think you’ll like it.

But first some preliminaries:

XCF Groups and Members

Before there was Parallel Sysplex there was Sysplex. And the main ingredient of (base) Sysplex was XCF signalling. Applications that use XCF consist of groups and members. A group is essentially an application. So the “SYSGRS” group is the GRS application. Members are address spaces participating in the application.

XCF’s job is to pass messages within members of the same group, whether on one system or several within the Sysplex.

Instrumentation

Since the advent of XCF we’ve had group names, member names and messages sent and received in the 74-2 record. But there’s a problem here, best illustrated by the example of DB2 Data Sharing:

A DB2 Data Sharing group comprises, amongst other Coupling Facility structures, a “LOCK1” structure. It’s a Lock structure and it’s called the “LOCK1” structure because its name is always “_LOCK1”. We can easily identify this structure and the group it belongs to. Associated with the LOCK1 structure are 2 XCF groups:

  • IXCLOnnn – which is a particularly unhelpful name as ALL Lock structures have such an XCF group associated with them. (There usually being several other Lock structures in a single Parallel Sysplex – such as GRS Star and VSAM RLS’s Lock structure.) The member name, by the way, would be something equally unhelpful like “M102”.

    The purpose of this group is to resolve potential “False Contention” situations in the Lock1 structure (possibly caused by too small a lock table).

  • DXRabcd – where the “abcd” is the Data Sharing Group Name. This is slightly better but it doesn’t help that the member name is e.g. “DXRDPG0$$IPB1003”.

    This XCF group is used by the various IRLM address spaces in the group to resolve locking conflicts from DB2’s perspective. (IXCLOnnn group traffic resolves to either a False Contention or an XES contention, the latter having to be resolved to either a lock being granted or IRLM negotiation causing the requester to wait.)

So, it would be really handy to isolate these two types of traffic for a particular DB2 Data Sharing group (and perhaps to work on reducing it). As you can see, it’s rather hard to do that without more useful information. This is where 74-2 XCF Jobname comes in…

It turns out that for BOTH the IXCLOnnn group and the DXRabcd group the job name is the IRLM address space name. So, if you know the IRLM job name (hopefully because you’ve given it a name close to that of the Data Sharing group it supports) you can easily tell which XCF groups relate to that Data Sharing group. And then perhaps you can do something about the traffic.

Perhaps I’m displaying my ignorance of DB2 here but in the test case I’m looking at right now I see 2 IRLM address spaces in one system and one in the other, all sharing the same XCF groups – both IXCLOnnn and DXRabcd. I didn’t know one could run 2 IRLMs in the same DB2 Data Sharing group in the same LPAR. I’ll admit I’m not really sure what to make of that.

But what about other XCF groups? It turns out that they also have good mnemonic address space names. But then for most other groups it’s obvious what the XCF group is anyway.

Glancing over a friend’s shoulder at a modern RMF XCF Activity Report I didn’t see the job name in the report (but rather the member name). But then I, and I expect most other people, don’t often look at RMF Postprocessor reports all that often.

What is REMOVECC?

(Originally posted 2009-04-10.)

To whoever (In the USA I think) Googled “what is REMOVECC” and got to this blog let me give you my thoughts on the matter. (And yes I know, it being a search, you might never come back to read this.)

To understand REMOVECC you have to understand that the “CC” refers to ASA (American Standards Association) Carriage Control, described here.

ASA (formerly ANSI) control characters appear in Position 5 for variable-length records (just after the Record Descriptor Word (RDW)). So a EBCDIC “1” in Position 5 would tell a printer to start a new page, and a “0” would tell it to skip a line.

Originally OUTFIL was used to create PRINTABLE reports. So these kinds of control characters were needed. But more modern (perhaps more complex) uses often don’t require ASA CC characters. So coding REMOVECC on the OUTFIL statement suppresses the control characters.

In this blog entry I used OUTFIL REMOVECC because my output is HTML. No HTML reader (such as a web browser) is going to tolerate ASA control characters. So I removed them.

I hope that clears this up. And I know the question was asked because my Firefox Extension has a “Referer URL” reporting element that tells me things like the Google searches that got people to my blog. I’d be flattered to think it was someone who was trying to understand the referenced blog post.

Update 10 April 2009

Perhaps I should also mention the relatively recent BLKCCH1, BLKCCH2 and BLKCCT1 OUTFIL options:

These replace the page eject carriage control character “1” with a blank in HEADER1, HEADER2 and TRAILER1 respectively. (HEADER3, TRAILER2 and TRAILER3 don’t need equivalent options.) Replacing with a blank still shifts the output to the right by 1 character, so REMOVECC may still be the best choice.

The PTFs for this enhancement appeared in April, 2006 (UK90006 / UK90007).

DFSORT Sorting Without Sorting Header / Trailer Lines

(Originally posted 2009-04-10.)

For whoever got to my blog with this Google search here’s how you sort data without a header:

First you need to be using z/OS DFSORT Release 10 or to have applied the PTFs for UK90013 (July 2008).

Second, the vehicle for doing this is ICETOOL rather than DFSORT itself.

Use the new DATASORT operator. Here’s an example:

If you code

DATASORT FROM(DD1) TO(DD) FIRST(3) USING(CTL1)

and code a CTL1CNTL like

//CTL1CNTL DD *  SORT FIELDS=(1,8,CH,A,9,4,BI,D)

ICETOOL will sort everything after the first 3 records, leaving the first 3 records unchanged. (In this case the sorted lines are, obviously, collated on two distinct fields.)

In the CTL1CNTL set of control statements you can code an OUTFIL statement (or several) if you want to. There are some restrictions on what statements you can code in the CTL1CNTL data set (and these are documented here.)

As well as being able to avoid sorting header records (FIRST,FIRST(n),HEADER,HEADER(n)) you can also avoid sorting the last few records with LAST, LAST(n), TRAILER or TRAILER(n).