New function provided through a PTF in IBM i 7.2 improves performance when restoring a single object.
When requesting the restore of a specific object using the RSTOBJ or RST commands, it’s important to understand how tape is positioned to the correct location on the media. When processing one of these commands, it first checks the sequence number specified in the SEQNBR parameter. If *SEARCH is specified, it will begin searching the tape beyond its current position for a label that matches the name specified for the save. Tape labels can be displayed with the DSPTAP command. For library objects, the label is most often the library name that contains the saved object. For IFS objects, this is typically a system generated label in the SAVyyyymmdd format.
After locating and positioning the tape to the correct sequence, the device then must locate the specific object within that sequence by reading each object one-by-one until finding the requested object. The further down the list the object is, the longer the search will take. For example, if the object being restored is located 50,000 objects into the tape file, a minimum of 50,000 tape positioning operations and 50,000 individual reads would be required before the restore can begin.
The starting position in file parameter can be leveraged to significantly reduce tape positioning and read operations by jumping to the object’s known location within the tape file. With this parameter, the maximum amount of blocks that can be skipped per tape operation is 24,576. While this cap reflects the limited capabilities of some older generation tape technologies still supported by 7.1 and earlier releases, it still represents a dramatic improvement compared to the speed of traditional *SEARCH operations. For example, specifying the starting position in file, an object located 15 million blocks into a tape file would require roughly 625 tape positioning operations before reaching its destination.
Now though, far greater performance improvements can be realized. Beginning at release 7.2 with PTF MF60473 applied, the maximum amount to skip per tape operation is increased to 8,388,607 blocks. With this limit, tape can obviously position to an object’s location much more quickly. Considering the aforementioned scenario, the needed tape positioning operations are slashed from 625 to only two.
The performance impact demonstrated for objects located millions of blocks into a tape file was roughly a 10x faster restore time for the same object with the new maximum versus the old maximum. The advantage of objects located not far into a tape file is negligible.
Users who currently notice long delays reading tape when restoring individual library or IFS objects may benefit from this enhancement. To take advantage of these potential restore performance gains, a valid starting position in file for the object must be specified in conjunction with the sequence number. The starting position in file is only captured when specifying OUTPUT(*OUTFILE) on the save command. BRMS (Backup, Recovery & Media Services) stores the starting position automatically when a BRMS save is configured to retain object detail. Therefore, any subsequent restore of one of these objects using BRMS will use this positioning information.
More information on restoring objects:
More information on restoring objects in directories:
Thank you to Andy Mallan of the IBM i Save/Restore development team for describing how information is located on tape when doing a restore. He also provided details on a recently introduced performance-improving enhancement.
This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.