Sunday 30 September 2012

IMS's HALDBA again

Last time we looked at the first part of Neil Price’s presentation to the Virtual IMS user group back in February. Neil is a Senior DBA and Systems Programmer with TNT Express ICS. Here’s some more highlights from his presentation.

Neil suggested that at his site key-range partitions can be so different from each other that they need to be treated like independent databases. For example if the volume of data in one partition is growing much faster than in the others, it might need a lot more free space so that you don’t have to resize or split it too soon, and you might want to set the free space warning threshold lower, so that you have time to react. Another example is where the average database record length in one partition is much lower than in the others. If you want to be alerted when the record lengths increase, the threshold for this partition would need to be correspondingly lower.

When it comes to tuning – what Neil called “Performance Tweaks” – they have various processes where values are obtained in physical sequential order from the root keys of one database and used to access one or more related databases with the same root key. If the databases involved are all HDAM and use the DFSHDC40 randomizing routine, this works well because the randomizer tends to keep keys in more or less the same sequence regardless of the total number of Root Anchor Points, as long as this is much greater than the number of roots. This means that all the databases are accessed in physical sequential order, which more or less guarantees that each database block is read only once and so minimizes I/O, as well as generating a sequential access pattern that maximizes read hits in disk cache and more recently has enabled them to take advantage of OSAM Sequential Buffering. But once you go to PHDAM, the keys are only kept in this sequence within each partition. Optimal performance is only restored when all the databases involved are HALDBs with identical partitioning arrangements.

Neil Price identified something that he said confuses a lot of people, including some in IBM support, not least because the manuals are unclear. Normally when a KSDS data CI fills up, it split roughly in half. That’s not good for ascending keys such as the timestamps used by most of their HIDAM databases, because the old or “lower” CI will stay half-empty forever. In the same way, a CA split will leave the old CA with half its CIs empty and the rest usually half-empty, in other words only about a quarter full. If the insert rates are high, the KSDS can end up with a very high proportion of unusable free space and might approach the 4GB limit. However if Sequential Mode is used for the inserts, CI and CA splits are done at the point of the insert – which for ascending keys means that it starts a new, empty CI or CA and leaves the old one as it is. This is good for performance – CA splits have been known to take seconds to complete – as well as greatly slowing down the dataset growth.

It’s possible to specify sequential-mode inserts in the IMS buffer pool specification member by coding INSERT=SEQ on the OPTIONS statement, but that would apply to every KSDS. Instead they include a DBD statement for each index they want treated this way and specify FREESPACE=YES, which is the dataset-level equivalent. Sequential-mode inserts also honour the free space specifications for the KSDS. This means that if free space is specified and all inserts are done this way, the free space will never get used and is a complete waste of space. All their inserts are done through the online system, so FREESPACE=YES implies that there should be no free space specified for the cluster!

FREESPACE=YES would work almost as well with constantly descending keys. It might also be beneficial for some indexes whose keys are generally, rather than strictly, ascending or descending, but until they’ve got IMS 12 and can change buffer pool parameters dynamically it’s going to be difficult to determine. Currently they specify FREESPACE=YES for 6 of their PSINDEXes, of which only one has a strictly ascending key and the rest start with a date. There used to be more, but after analysing the VSAM statistics, Neil reverted some to normal inserts and non-zero free space. This reduced the rate of CA splits, ie growth, and also the overall I/O. Neil reminded us that PSINDEX records can be relatively large, which makes the total index much larger than its non-HALDB version. It also means that fewer records are retrieved in one I/O, which is bad for sequential processing.

For Neil’s site, most of their indexes are accessed with a partial key, which in some cases will match hundreds of entries. Neil attempted to minimize the effects by making the VSAM buffer pools bigger, although he knew he wouldn’t be able to get the I/O rates back down to pre-HALDB levels. He reasoned that the buffers ought to hold the same number of VSAM data records as before, so he aimed to increase the number of buffers in line with the increase in the record length. When he calculated the new subpool sizes he discovered that some came out greater than the limit of 32,767 buffers, and in any case there wasn’t enough virtual storage available for such large increases, so he had to scale them all back anyway. But the I/O rates for most of the OSAM subpools are higher than for any of the VSAM ones, so this is maybe not the area with the most potential for I/O reduction.

To sum up, Neil informed the user group that HALDBs can change your life if you’re a DBA! Once you’ve converted your databases, that’s when the fun really begins

You might like to know that the Virtual IMS user group can be found at www.fundi.com/virtualims. The next meeting is on 9 October at 11:30am EDT, when the guest speaker will be Aurora Emanuela Dell’Anno, a Senior Engineering Services Architect with CA Technology, who’ll be talking about “IMS performance – taming the beast”. It will be well worth attending – and being a virtual meeting, there’s no need to leave your desk. See the Web site for more details.

Sunday 23 September 2012

IMS’s HALDBA

The Virtual IMS user group at www.fundi.com/virtualims has a regular virtual meetings every other month. In fact, the next one is on 9 October at 10:30 Central Daylight Time. Our guest speaker is Aurora Emanuela Dell'Anno, a Senior Engineering Services Architect with CA Technology, and she will be talking about “IMS performance – taming the beast”. It will be well worth attending – and being a virtual meeting, there’s no need to leave your desk. See the Web site for more details.

Back in February, Neil Price, a Senior DBA and Systems Programmer with TNT Express ICS gave an excellent presentation entitled, “Memoirs of a HALDBA”. Neil first encountered IBM mainframes as a student in 1971 and more recently he has been Chairman of the GSE UK IMS Working Group.

Neil started his presentation by giving the user group a clear idea of what hardware and software TNT Express use. This is relevant because it affects the decisions that Neil and his organization had to make. They have two machines – one hosting the main production LPAR; and the other running the network, testing, and one or two other things. This has a total disk capacity of about 18TB, of which just over 4TB are mirrored to their Disaster Recovery site, about 100 miles away in London.

Neil informed us that they always used OSAM because they believe it’s more efficient. More recently, of course, it gave them the ability to have datasets up to 8GB in size. Very few of their databases ever get disorganized enough to need a reorg unless they’re running out of space. The use of HDAM for all of the most volatile databases is a major factor in this. A few are reorganised weekly, 3 of them in order to remove logically-deleted data with a user exit, and a few quarterly.

In terms of HALDB, Neil told us that since they started investigating and testing HALDB in 2004, they’ve converted 18 HDAM databases, which were getting close to the 8GB OSAM dataset size limit, including the whole of the CCDB (Central Consignment Data Base, consisting of 15 HALDBs of 6 partitions each) and one with an index that was threatening to hit 4GB between weekly reorgs. Just 2 of their HALDBs are partitioned by key range. Most of the HALDBs got up to 16 partitions on model-3 logical volumes over time, but went down to 6 partitions when they moved them to model-9s. Apart from Consignment, each HALDB has at least one index. 5 have 28 indexes between them, and 13 of the indexes are also partitioned.

Neil was pleased to have avoided certain challenges at his site. For example, the DBRC question – they decided to have DBRC forced registration in every system from the very beginning, and, because there’s virtually no DL/I batch, there’s just one copy of each database and it’s permanently online. It didn’t take much thinking to decide that their 14 cloned databases would stay separate when they became HALDBs. Anything else would have involved major application code changes. The databases using a partitioning exit all use the Consignment key, so they’ve effectively had to write only one simple exit routine. They still maintain separate modules, though, just in case they need to vary the logic at any time.

To simplify everything they treat the HALDBs just the same as before except in very exceptional circumstances and haven’t changed their names. In particular, not taking individual partitions offline means that the applications don’t need to handle partitions being unavailable.

In terms of challenges they faced, Neil said that the first database they converted was one using the Consignment key, and it was fairly obvious that they wouldn’t get a predictable spread of data using key ranges. In the end they adapted the example in the IBM Redbook “The Complete IMS HALDB Guide” (SG24-6945) to select a partition based on a portion of the key, in their case the trailing characters of the 9-digit character numeric Consignment number. With equally-spaced “limits”, this has resulted in a very even spread of data across the partitions. They started with 2 digits, but once they went from 10 to 12 and then 16 partitions it seemed sensible to start using 3 digits for a slightly more even spread. Of course the overall physical sequence of records isn’t the same as in HDAM. For databases with key-range partitioning, they used the HALDB Migration Aid utility DFSMAID0 to choose the limits.

When it comes to monitoring challenges, Neil told the group that for non-HALDBs they get a list by e-mail of any thresholds that have been exceeded, for example the number of database records or the number of HDAM roots not stored in their “home” block. This is sent by a simple SAS program that processes a daily report of all metrics and threshold exceptions from their Pointer Checker statistics repository. The statistics are gathered as part of the daily online Image Copy backups. They find the e-mail preferable to having to navigate ISPF panels or a GUI to find out what exceptions have occurred, if any.

HALDB statistics, on the other hand, are written to a completely different repository, which can be viewed through a GUI but didn’t come with facilities to generate reports or e-mails. So they segregated the HALDBs into their own backup jobs, which direct the Pointer Checker report to a file. An additional SAS step then processes the file, writes the results to a SAS database and a summary report, and generates an e-mail if the percentage of usable free space in any partition falls below a hard-coded threshold.

Find out more about Neil Price’s experience next week.

Sunday 16 September 2012

CICS communication history

In the beginning, CICS programmers used conversational transactions – but not any more. Pseudo-conversational coding is less resource-intensive, user think time costs are eliminated, and sites can run more simultaneous transactions. On the down side, programming is more difficult, application design requires re-starting programs, it’s more difficult to debug programs, and programs require an area to store data between tasks.
 

And so we get the Communication Area (COMMAREA). It’s a terminal-based scratchpad that’s dynamic in size (0 to 32,500 bytes), and is private and chained to the terminal. The COMAREA can hold data between pseudo-conversations, has a maximum in size of 32K, can be passed from program to program, can be empty, partially full, or full, and is automatically cleaned up when not used.

However, COMMAREAs have obvious limitations, and so IBM gave us channels and containers. There are no size limitations on data in containers, the number of containers in a channel is unlimited, and there can be separate containers for input and output.
Another way round COMMAREA limitations is to use an XML (eXtensible Mark-up Language) front-end application. Associated with this are:

  • Extensible Stylesheet Language Transformation (XSLT) is the recommended style sheet language of XML.
  • XML namespaces – in XML, element names are defined by a developer.
  • XML schema is an XML document that describes the structure and constrains the contents of other XML documents.
  • XML parser is a program that is invoked by an application to process an XML document, ensure that it meets all the rules of XML as well as the syntax of the DTD or schema, making the data available to the calling application.

With the introduction of Services Oriented Architecture (SOA), programmers now use CICS Web services. A Web service is a collection of operations that are network accessible through standardized XML messaging. The Web services architecture is based on interactions between three components: a service provider, which is the platform that hosts access to the service; a service requester, which is the application that is looking for and invoking or initiating an interaction with a service; and service registry, which is a place where service providers publish their service descriptions, and where service requesters find them.


Universal Description, Discovery and Integration (UDDI) is a specification for distributed Web-based information registries of Web services. The service provider “owns” the service, creates the WSDL (Web Service Description Language – see below), publishes the WSDL, and processes the requests. The service requester “finds” the service, binds to the service, and invokes the service using the WSDL. The service registry hosts the service description and is optional for statically bound requesters.


WSDL is an XML application for describing Web services. WSDL comprises:

  • Types – the data types in the form of XML schemas
  • Message – an abstract definition of the data in the form of a message
  • PortType – an abstract set of operations mapped to one or more end points
  • Binding – the concrete protocol and data formats for the operations
  • Service – a collection of related end points.

Simple Object Access Protocol (SOAP) is an XML-based protocol for the exchange of information in a distributed environment. A SOAP message is encoded as an XML document.
 

The CICS Web services assistant is a set of batch utilities that can help users transform existing CICS applications into Web services and to enable CICS applications to use Web services provided by external providers. The CICS Web services assistant comprises two utility programs:
  • DFHLS2WS generates a Web service binding file from a language structure. This utility also generates a Web service description.
  • DFHWS2LS generates a Web service binding file from a Web service description. This utility also generates a language structure that you can use in your application programs.

You can use Rational Developer for System z for Web services and XML development. A CICS pipeline is responsible for dealing with SOAP headers. It’s implemented as a series of programs, and can be configured by end users by using message handlers. A message handler is a program in which you can perform your own processing of Web service requests and responses.

Sunday 9 September 2012

Back-ups, archives, and Pogoplug

Storage is always an issue. Whether you’ve got petabytes of it on your mainframe or just 16GB on your smartphone or tablet, the issues are always the same. You want speedy access to the data you’re using, and you want somewhere to store the data you’re not using at the moment – but might want to use it later.

Speeding access to data can be helped in a number of ways – storing the data contiguously, using indexes to speed up access to individual fields, using shorter paths from the storage medium to the processor, keeping recently used data in cache storage in the likelihood it will be used again. Human ingenuity has come up with lots of workarounds to ensure that you get the data as quickly as possible.

But there’s more of an issue with archived data. I could have immediate access to it, but then it would cost as much to store as live data. I could store it on some cheap medium and find it takes a week to get it back to a state that I can use. And something along those lines is used by many archiving organizations. Those tapes are stored inside a mountain somewhere, and the data can be restored – but not quickly.

Depending on the kind of business you’re in, someone has made a decision about costs and storage retrieval speed. If your company is in banking or insurance, that data might get back much faster than if your organization doesn’t promise its customers fast access to old data.

The advent of cloud computing added another layer of complexity to storage. You could store your data on the cloud – which, in psychology terms, is called a nominalization. You call it something, which seems to have meaning, but isn’t a concrete real thing – you can’t put it in a wheel barrow. You hear politicians use nominalizations all the time. I’ll vote for prosperity and world peace – but what does that actually mean? Prosperity for someone from a third world country might seem quite close to poverty to me! And world peace can always be achieved by having a tank on everyone’s lawn. Your idea of what is meant by a nominalization may be completely different from the idea held by the next person!

Anyway, I digress. So nowadays, you can store your data on the cloud. You don’t know where it’s physically stored you just know how to access it. And I assume much the same models are used for the price of cloud storage – fast access is dearer than slow access. Amazon came up with, what they call, Amazon Glacier. This is a cheap service for archived or backed up data that you don’t access very often. In line with that pricing model, retrieval can take several hours. Amazon Glacier only charges organizations for the storage space they use.

I’ve been using a Pogoplug for over two years and I’ve mentioned it in this blog a few times. A Pogoplug started life as a small device that plugged into your router and allowed you to plug in memory sticks that you could access from a browser anywhere. The company has recently expanded its cloud offerings and has done a deal with Amazon to offer cloud storage at a very competitive rate. The solution isn’t for mainframers, but makes sense for individuals and small companies.

The Pogoplug Web site at http://pogoplug.com gives all the price plans they’re offering. So, a small organization would be able to back up files from their computers, smartphones, and tablets to one secure location. All the company has to do is buy a Pogoplug device or download the Pogoplug Server software and run it on a Windows or Mac. They can then back-up and archive their files – and we’re talking terabytes of space. Users can continuously copy all or part of their data to Pogoplug’s secure offsite cloud. Any changes they make to their original folder will be synchronized automatically.

It seems like a useful addition to the all-important back-up and restore choices a company has to make.

Sunday 2 September 2012

IBM's big baby

IBM has traditionally announced powerful mainframes in alternative years to more affordable models. Last year saw the z114, so this year we were expecting IBM to deliver something big – and that’s what it’s done with the zEnterprise EC (Enterprise Class) 12.

The zEC12 has a hexa-core design that runs at an eye-watering 5.5GHz and is pretty unique in supporting transactional execution. That means it treats system resources in much the same way as a transactional database system and so eliminates the overhead of software locking systems. You can expect to hear more about this Transaction Execution Facility. The z12 chip is implemented in a 32 nanometer high-K metal gate process – its predecessor (z11) used a 45 nanometer process.

The top end machines can take 120 cores, and the processors include an Enhanced DAT2 facility, which allows languages to exploit 2GB page frames. The processors also have a decimal-floating-point zoned conversion facility that will be supported by the next release of PL/I.

The zEC12 also supports Flash Express memory, which is used by systems that anticipate bursts of activity. And IBM claims this is one of the most secure enterprise systems ever with its Common Criteria Evaluation Assurance Level 5+ security classification. It even has a tamper-resistant cryptographic co-processor, which is called the Crypto Express 4s.

IBM said the new mainframe was the product of over $1bn in research and development investment and work was carried out in 18 IBM labs around the world and with IBM’s clients.

And as well as being the mainframe for the cloud computing generation, it also provides hybrid computing support. So not only can it run z/OS, users can consolidate their Linux workloads with Linux on System z (using SUSE Enterprise Server or Red Hat Enterprise Linux), and run other z/ operating systems – z/VM, z/VSE, and z/TPF. And the IBM zEnterprise BladeCenter Extension (zBX) lets users combine workloads designed for mainframes with those for POWER7 and x86 chips, Microsoft Windows Server.

The zEC12 increases the performance of analytic workloads by 30 percent compared to its predecessor. It seems that support for the DB2 Analytics Accelerator enables clients to run complex business analytics and operational analytics on the same platform. There are also IT systems analytics capabilities. It analyses internal system messages to provide a near real-time view of the system’s health, including any potential problems. Called IBM zAware, the technology learns from the messages to recognize patterns and quickly pinpoint any deviations, using the information to identify unusual system behaviour and minimize its impact.

Unusually, sites will be able to run the zEC12 without a raised data centre floor using new overhead power and cabling support. And for ‘green’ sites, zEC12 can deliver 25 percent more performance and 50 percent more capacity with the same energy footprint as its predecessor.

In a statement of direction, IBM said the zEC12 will be the last high-end System z server to offer support for zAAP specialty engine processors. Although IBM will continue to support running zAAP workloads on zIIP processors (zAAP on zIIP). This is intended to help simplify capacity planning and performance management, while still supporting all the currently eligible workloads.

The new processors should be available from about the end of September. It looks like a very powerful piece of kit with a number of interesting features that should keep mainframe users happy for a year or two.