Retranslation Could Boost Performance
May 13, 2019 Timothy Prickett Morgan
There are so many kinds of genius embedded into the IBM midrange line that it is hard to know where to begin when discussing all of these interconnected ideas and layers. But perhaps the simplest way to encapsulate them all is that the System/38 and AS/400 minicomputers and their follow-ons sought to abstract away and mask some of the more complex aspects of a modern system so that programmers could focus on business logic and system administrators could focus at a much higher level, too.
One of the key differentiators of these IBM midrange platforms, and one of the hallmarks of the AS/400 system, is called the Technology Independent Machine Interface, which is a level of abstraction that combines the ideas of the virtual machine, or VM, and the application programming interface, or API, together – and did so a decade or two before either idea went mainstream. This will be a radical oversimplification of what is going on inside the system, but I just want to tell you what time it is, not how the clock works.
When a program compiles on an OS/400, i5/OS, or IBM i system, it does not compile down to the specific iron literally that the programmer is sitting at, but rather down to an intermediate, abstracted, idealized version of what the system looks like. This is called a program template, and it is a bit like a Java bytecode, and the first time it is run on any specific machine, it is automagically compiled down to the specific iron in that machine, with its specific processor and instruction set features. This TIMI layer is what allows for applications that were written on the System/36 and System/38 to be run on the AS/400 and its progeny without breaking compatibility. The TIMI is always forward compatible, and interestingly, program retranslation – grabbing the intermediate program template and compiling it down to the iron – is also invoked when an application is coded on one machine and moved to an older architecture in the IBM midrange. Customers who want to move to new iron don’t even need the source code of the application to retranslate it to run on the new iron; it happens automatically from the intermediate program template that is stored on the system as part of the original compilation that was done the first time the application ran.
This way of breaking applications free from the specific processors and architectures is quite possibly the deciding factor in the longevity of the IBM midrange platform. No other proprietary midrange platform did this, and none of them are alive today. (Correlation is not, we realize, causation. But we just like to brag a little.)
Buried in the IBM i announcements on April 23 was a reminder to customers who are moving to the new IBM i 7.4 release, which will be available in June and which has been tuned to take more full advantage of the Power9 processors that came out last year, that they should manually invoke application retranslation to gain possible performance benefits.
IBM’s advice is that for applications that are performance sensitive, customers should initiate this retranslation manually, which can be done with two tools – QBNCVTPGM and QBNCVTPLST – that were first made available on IBM i 7.1 through special PTFs and that have been updated up through the new IBM i 7.4 release. You can read all about how to do this manual retranslation at this link on the IBM developerWorks site, but this gives you the gist of what IBM is trying to encourage:
“QBNCVTPGM and QBNCVTPLST provide a simple way to force program conversion without using save/restore or change commands. One benefit of converting programs includes taking advantage of as many processor features as possible on the system on which the conversion takes place. Doing so may improve the overall performance of an application. Also, converting a program causes it to use the latest integrity enhancements available. This can make an application more secure.”
The one thing that IBM does not do in all of this documentation of the program retranslation is actually peg what kind of performance increases customers can expect by, say, moving from IBM i 7.1 on a Power7 or Power7+ machine to IBM i 7.4 or from IBM i 7.2 on a Power8 machine to IBM i 7.4. If there is an underlying hardware change in any move, retranslation will be invoked as a matter of course, and if there is a change in both hardware and IBM i release level, that change happens on two fronts, even if it is all done under the covers. The point is, the new release can unleash performance benefits in the existing hardware.
It would be nice for IBM to qualify the kinds of performance gains customers might see, and under what conditions. That way, IBM midrange shops could assess if going through all of this trouble – the manually invoked program retranslation is not completely effortless and frictionless – is worth it. We cannot even hazard a guess as to how much of a change in performance this might make, but we suspect that if Big Blue is bringing it up with IBM i 7.4, perhaps customers on Power8 and Power9 iron might see a big change if they update to the current release and force the recompile at the lowest levels.