IBM Support

QMGTOOLS: Check Disk Fragmentation

How To


Summary

This document shows how to use the IBM i Support Must Gather Tools (QMGTOOLS) to display fragmentation status of the system ASP based on the free space level counts in comparison to the system ASP threshold and the storage lower limit values.

Steps

Make sure the latest QMGTOOLS build is installed.  See the following document on how to download and install the QMGTOOLS toolkit on your IBM i server.


Be sure to sign in as QSECOFR (or equivalent) in order to have enough authority to run the fragmentation report.

Once the IBM i MustGather tools have been installed and updated, type the QMGTOOLS/CHKDSKFRG command on a command line and press F4 to prompt for parameters.  You can also navigate to the tool from the Must Gather Data Collector menu (MG) - GO QMGTOOLS/MG, option 16 - Internals (INTMNU), option 10 - Check Disk Fragmentation.

The prompt screen will allow you to choose where to send a fragmentation report, or send messages to the QSYSOPR message queue.
image-20250128135258-1


  • The default option (*) is to display the report
  • *PRINT causes the report to be printed with the job's spooled output
  • *MSG will send messages to QSYSOPR instead of displaying or spooling a report

Sample report:
image-20250128140910-2

When using the display or print options, the report can show one or more of the following alerts:
  • >>> ALERT!!!  "Unfragmented" free space is <= 5.0000%       (The percent shown is the value in QSTGLOWLMT)
  • >>> Warning!  "Unfragmented" free space is <= 10%      (The percent shown is the ASP threshold free space value)
  • >>> Warning!  "Fragmented" free space is >= 10%       (The percent shown is the ASP threshold free space value)
  • >>> Notice:  "Fragmented" free space is >= 5.0000%      (The percent shown is the value in QSTGLOWLMT)
  • >>> No alerts


The message option is useful if you'd like to run the CHKDSKFRG command from a job scheduler on a regular basis and just monitor for messages.  Here are the possible messages that can be issued:
  • FRG0001  Sev-00    QMGTOOLS: Check Disk Fragmentation tool ran.
  • FRG0002  Sev-70    Notice: "Fragmented" free space is greater than or equal to the storage lower limit.
  • FRG0003  Sev-80    Warning!  "Fragmented" free space is greater than or equal to the free space associated with the System ASP threshold!
  • FRG0004  Sev-80    Warning!  "Unfragmented" free space is less than or equal to the free space associated with the System ASP threshold!
  • FRG0005  Sev-90    ALERT!!!  "Unfragmented" free space is less than or equal to the storage lower limit!


If an alert (Notice, Warning! or ALERT!!!) is received, one or more of the following actions can be taken:
  • Evaluate how urgent the issue is and if the ASP threshold and storage lower limit values are set appropriately
  • Add more storage to the ASP
  • Reduce ASP usage by deleting large or unneeded objects
  • Run STRDSKRGZ to de-fragment permanent storage - https://www.ibm.com/support/pages/node/642337


Additional Information

The counts shown in the fragmentation report represent the number of 4 KB pages in each category.  Each category is totaled from all the disk units in the System ASP (ASP 1).  Levels 0 through 6 represent the following groups of contiguous blocks of free space:
  Level 0 -    4 KB
  Level 1 -   32 KB
  Level 2 -   64 KB
  Level 3 -  128 KB
  Level 4 -  256 KB
  Level 5 -  512 KB
  Level 6 - 1024 KB

IBM i memory is typically read and written to disk using 4 KB pages.  However, certain internal functions use 64 KB pages which have to be written out to 64 KB contiguous blocks of free space on disk.  This means that if the system needs to write out a 64 KB memory page and there are no level 2 (or higher) free space pages on disk, then the system may terminate.  This is why level 0 and level 1 free space pages are called "fragmented" in this document and the CHKDSKFRG tool, while level 2 through level 6 are considered "unfragmented".

Document Location

Worldwide


[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CRjAAM","label":"Disk Information"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.3.0;and future releases"}]

Document Information

More support for:
IBM i

Component:
Disk Information

Software version:
7.3.0 and future releases

Document number:
7181878

Modified date:
29 January 2025

UID

ibm17181878

Manage My Notification Subscriptions