This topic is one I know many i users are very familiar with, but I get questions often enough about managing disk space that I thought a review of the parameters controlling disk space consumption and managing disk space growth would be a worthwhile topic.
Disk space that is used by i is categorized into two major types:
1. Permanent. This is the storage that is used that survives IPLs. Objects that you create are permanent objects. Permanent disk space is tracked by user profile and the Maximum allowed storage (MAXSTG) parameter on the user profile controls the upper limit of disk storage that an individual user profile can consume. Note the default value is *NOMAX.
2. Temporary. This is the storage that is used for temporary objects and internal data structures and does not survive IPLs. Temporary disk space is tracked to the job that allocated the storage and the maximum value comes from the Maximum temporary storage (MAXTMPSTG) parameter from the class object used when the job is started. Note the default is *NOMAX.
IBM made a change in the 7.1 release that jobs that exceeding their temporary storage limit will be held rather than ended. This was described in the blog article, Jobs Exceeding Their CPU or Storage Limits are now Held.
Controlling disk space consumed is important as the system can terminate unexpectedly if all the storage is used. The system values Auxiliary storage lower limit (QSTGLOWLMT) and Auxiliary storage lower limit action (QSTGLOWACN) define the low storage threshold and the action taken by the system when that low storage threshold occurs.
However, if you are having an issue with storage consumption, the major challenge is identifying where the storage is going quickly enough to resolve the problem before it becomes a major issue.
For tracking permanent storage, you should have a routine process in place where you understand the size of your permanent objects. Objects such as the history log, journal receivers, spooled output, performance data and several other types of storage may not need to be kept online on an ongoing basis; you should have a process where you save off the critical data and then delete the unnecessary data from your system.
The system provides the Retrieve Disk Information (RTVDSKINF) and Print Disk Information (PRTDSKINF) commands, as well as the Retrieve Directory Information (RTVDIRINF) and Print Directory Information (RTVDIRINF) commands to allow you to review where the disk storage is being consumed. Retrieve/print disk information is used to help you understand your storage usage for objects; retrieve/print directory information is used to help you understand your storage usage in the Integrated File System.
Tracking temporary storage can be a bit challenging.
The information below is for releases prior to 7.2. In 7.2, IBM improved the tracking of temporary storage. A series of blogs was written on these improvements. Part 9 has links to all posts in the series.
Since temporary storage is tracked on a job-level, you need to look at the job to see what it is doing. The general approach is to start with Work with System Status to review the overall disk storage consumption for the partition; “Current unprotect used” is the current amount of temporary storage being used and “Maximum unprotect” is the high-water mark, showing the highest value temporary storage has reached since the system was last IPLed. If you determine you may have an issue with temporary storage, then next step is to use the Work with System Activity (WRKSYSACT) command (beginning with the 6.1 release, WRKSYSACT is now part of the operating system and is available for everyone to use). Press the F11 key three times to get to the fourth view; it will have the storage allocated / deallocated columns were you can determine what jobs may be allocating more storage than they are releasing. Once you’ve identified the jobs that you want to look at further, you can then use the WRKJOB interface to determine what that job is doing.
There are a few important points to know about the storage allocated/deallocated columns on the WRKSYSACT panel:
- The storage allocated/deallocated columns include both temporary and permanent storage.
- It is possible for one job to be allocating the storage and a different job freeing it.
- Some types of temporary storage are not tracked by the system and you will not see it associated with any job.
- The storage allocated/deallocated values are deltas that are calculated from the last sample that was displayed.
- You can use the Sequence (SEQ) parameter on the WRKSTSACT command to sequence the display for storage allocated (*STGALC), storage deallocated (*STGDLC), or the storage net (*STGNET)
Even if you use these parameters, you will still need to press F11 three times to see the storage allocated/deallocated columns.
Finally, for those of you that are knowledgeable about the collection services data, the QAPMJOBMI file also contains the storage allocated and deallocated metrics for a job. Like WRKSYSACT, these metrics include both temporary and permanent storage values.
For more information on this topic, see the redpaper titled “Best Practices for Managing IBM i jobs, spooled output.”
This post was reviewed for currency on February 14, 2020.
This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.