This blog is one of a series of blog posts about performance topics on z/OS. This post is about synchronous I/O technology which reduces I/O time from milliseconds down to microseconds.
Some protocols are very chatty. For example when you download a television program to your television, you see it as one download. Under the covers the software sees this television program as many parts, and there will be a conversation like “Here is part 1, the first 10 MBs”… “ok got that – please send the next”. Within this conversation is TCP/IP chatter, “here is packet 4013” … “ok got that” etc.
40 years ago the I/O to disks was a bit like the following conversation between the mainframe and the disk controller. Imaging this as a series of phone calls. The “Hello” is where they initiate a new call, and “Bye” is where they hang up
- Mainframe: Hello storage controller, I want to read from disk with volume label A1USR1
- Storage controller: Sorry, it is in use, please try later. Bye.
- Mainframe : Hello? the telephone line is busy, I’ll retry.
- Mainframe: Hello, is disk A1USR1 available now?
- Storage controller: yes. I’ve reserved it for you
- Mainframe: Please move the disk read heads so they are under cylinder 61
- Storage controller: OK will do. Bye.
- Storage controller: Hello. OK the heads are under cylinder 61
- Mainframe: Read from head 4 (track 4) third record
- Storage controller: OK will do. Bye.
- Storage controller: Hello. OK, done that – here is the data
- Mainframe: Thank you, I’ve finished with the volume A1USR1.
- Storage controller: You’re welcome – that took 25 milliseconds. Bye.
Today’s conversation is much faster, as mostly data is in the storage controller’s cache. There are still a few phone calls.
Today’s synchronous I/O
With the new synchronous I/O technology (zHyperLink) the conversation is more like the following. (Using the new premium support phone number)
- Mainframe: Hello Storage controller, I want to read from disk with volume label A1USR1 Cylinder 61 track 4.
- Storage controller: Just a second – we have it in cache, here is the data. Bye.
Or perhaps the conversation goes like.
- Mainframe: Hello Storage controller, I want to read from disk with volume label A9SYS1 Cylinder 995 track 2.
- Storage controller: Just a second – I’m sorry we do not have it in cache. Please use the old way of doing it, using the old customer support number. Bye.
With the old way of doing I/O there were multi asynchronous requests coming back from the Storage Controller. It needed CPU to start the I/O ( Start subchannel) then suspend the program until the I/O completed and then resume the program. The program could have been re-dispatched on a different CPU, so its data was not in the processor cache.
Sometimes the amount of CPU used was more than the duration of I/O request! With the coupling facility(CF), came technology to issue an I/O request synchronously. With this the “Issue CF request” was one mainframe instruction which started the I/O, waited for the response and then resumed. There was no z/OS interrupt, and there was no dispatcher involved. Generally this used less CPU than the asynchronous request, and was faster.
The duration of the synchronous request depends on the work being done in the CF. The more work it does, the longer the instruction takes. For example the CF is doing some work on some data for a different processor, and locks a resource. This will delay other users of the data, who get locked out. Also as the physical distance between the CF and the mainframe increased, the overall duration increased (due to the speed to light).
At some point it is more efficient to use the asynchronous request; send the request; suspend until it has completed; rather than the send the request and wait.
The CF code has logic to determine if the request should be synchronous or asynchronous. Even though the recent requests have all been asynchronous, it will periodically try a synchronous request to see if it is worth switching to synchronous mode.
For the mainframe to support this synchronous I/O it needs additional hardware.
- It continues to need the FIbreCONnection (FICON) today for those requests that do not support synchronous I/O.
- It needs new zHyperLink cables connected from the mainframe to the Storage Controller. You need a direct connection, not via a switch.
- The CF and mainframe need to be closer than 150 meters.
- You can have duplexed CFs which both have to be within 150 meters.