LongEx Mainframe Quarterly - November 2022
I was trained as an engineer: so, I love elegance. I love systems that are simple, and I hate waste. I have more psychological issues, but these come in handy when making things run better: when tuning. But what does 'better' really mean? As a consultant, my clients usually want to do one of two things: make things run faster, or reduce resource used (almost always CPU). Sometimes, my clients would like me to do both. But here's the thing: tuning to make things run faster is different to reducing CPU. Let me explain. The First Difference: TargetWhen doing any tuning, the first step is to figure out why we're tuning: a CICS transaction may be running too slow, a batch stream may not be finishing on time, or we may be using too much CPU. Once we've figured out the why, we then measure to see if there is a problem, and where it is. This is the first place where tuning for performance differs from tuning for CPU usage. If we want things to run faster, then we already have a target: one or more CICS transactions running too slow, batch jobs aren't finishing by a deadline. With CPU, we usually don't have a specific target. In some cases, I may get asked to reduce the CPU used by a job or CICS region. But usually, my scope is far larger. For example: reduce the CPU used by a group of z/OS systems. So, I need to figure out what is using CPU, and then dig down from there. The Second Difference: ToolsWhen doing tuning, I'll use tools to find dig deeper to see if there's anything I can do. Now, there are a few tools that can be used for both CPU reduction and performance improvement. Here are some examples:
Although I could use all of these for both CPU reduction or performance, I usually use sampling tools for CPU reduction, and the other statistics for performance. The Third Difference: Changing ThingsThere's no doubt that some things I change to reduce CPU also improve performance. And vice versa. But this happens less than you think. For example:
Most of my changes to improve performance concentrate on two things:
However, CPU is more about what is using CPU: eliminating loops, reducing the amount of data processed, eliminating unnecessary processing.
A Similarity: MeasurementWhenever I change something, I need to know the effect. So, I'll want to measure the performance before the change, and after. The tools I use for this are often the same:
There are some cases when the measurement will differ. For example, I may look at the z/OS capture ratio or RNI to measure a CPU reduction, but never a performance benefit. Important To Understand the WhyMaybe the biggest difference between improving performance or reducing CPU is what I'm thinking. There are many things that may impact CPU usage, but not performance. And vice versa. So, before I start any tuning, I always agree with the customer on the why and what: why am I doing this, what is in scope? Specifically, I need to understand if I'm improving performance, or reducing CPU. |