• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Keeping Track Of IBM i System Limits

    January 17, 2022 Dawn May

    Every complex system has limits, and computer systems are no different. During my work with clients over the years I’ve seen many shops push their systems as far as they can go until performance breaks down. The limits I encounter are generally numbers of things: How many objects can exist in a library? How many rows can be inserted into a table? How large can a file in the IFS be?

    Typically, these limits are large and you may think you do not need to worry about them, especially after an upgrade. But as the workload on your system increases – whether it be number of users, the rate of transactions, workload peaks, etc., the need for understanding system limits also increases. Limits are also of concern if there is an unexpected run-away situation, such as starting large numbers of jobs or creating excessive spooled files.

    IBM i system limits are documented in the Maximum Capacities section of the Knowledge Center for each release. Knowing that limits exist is one thing, but it is even more important to know if your system is approaching these limits. If your system reaches a limit, bad things start to happen. These bad things might be sort of bad where jobs fail, or they can be really bad, like a system outage.

    To help understand how close you are to potentially hitting a system limit, IBM i ships with System Health Services. The operating system automatically tracks key limits (note that not all limits are tracked) and provides views you can query to review the peaks on your system.

    Generally, there are three limits that I encounter on customer systems. If such a situation occurs, it results in urgent work to resolve the problem. These are examples of limit issues I see more often than you’d expect:

    • Maximum number of jobs: I’ve seen this occur as a runaway situation of starting excessive numbers of jobs where the jobs generate job logs or have pending job logs. These job logs keep that job in the system.
    • Maximum number of spooled files in the system ASP: Everyone seems to love their spooled files! But there is a hard limit of 2.6 million spooled files in the system ASP and things get ugly if you hit this limit. Job logs often contribute significantly to this problem. I worked with a recent account where the QDFTSVR job description was changed to LOG(4 0 *SECLVL). Don’t do this! With this logging level, every time a prestart job is reused, a job log is created when the job swaps user profiles. You can end up with huge numbers of job logs.
    • Maximum number of rows in a table: Endlessly adding rows to a table but never deleting old records will ultimately result in hitting this limit. If you must save endless amounts of data, you need to have some sort of archival process in place.

    The above three limits are examples of the type of limits that the system automatically tracks. The System Health Services feature provides a way to understand how close you are to potentially hitting these limits. Many more limits are tracked, but the three I outlined should concern IBM i all shops.

    The limits are tracked in table QSYS2.SYSLIMTBL. Limits are logged based upon configuration values known as the floor and the increment. The floor is the lower level at which the system starts tracking the limit and the increment is how much that limit must increase (or decrease) before it is tracked in the SYSLIMTBL again. The floor and increments are documented for the limits that are tracked in the System Health Services section of the Knowledge Center. You can add AFTER INSERT or AFTER DELETE triggers to this table. This is one way to perform an action such as sending a notification when a limit is being logged. IBM’s documentation on the SYSLIMTBL has an example of using a trigger to check for the maximum number of rows in a partition.

    Typically, you will not query the SYSLIMTBL, but rather the QSYS2.SYSLIMITS view. The SYSLIMITS view contains information about the system limits, along with other system information, the job that logged the limit, and if that job is still active, information about that job. There is also a QSYS2.SYSLIMITS_BASIC view that does not include information about the job that logged the limit in order to reduce performance overhead.

    I like to use an IBM-supplied example to demonstrate how knowledge of system limits can be used. IBMer Scott Forstie drafted this SQL example when I asked him if it was possible to show the maximum number of jobs compared to the QMAXJOB system value. This is a critical comparison because, while the documented maximum number of jobs is 970,000, the QMAXJOB system value defines the actual maximum number of jobs for the partition.

    WITH TT(JOB_MAXIMUM)
      AS (SELECT CURRENT_NUMERIC_VALUE
            FROM QSYS2.SYSTEM_VALUE_INFO
            WHERE SYSTEM_VALUE_NAME = 'QMAXJOB')
    SELECT LAST_CHANGE_TIMESTAMP AS INCREMENT_TIME, CURRENT_VALUE AS JOB_COUNT, 
         TT.JOB_MAXIMUM, 
         DEC(DEC(CURRENT_VALUE,19,2) / DEC(TT.JOB_MAXIMUM,19,2) * 100,19,2) 
             AS PERCENT_CONSUMED
        FROM QSYS2.SYSLIMITS, TT
        WHERE LIMIT_ID = 19000 ORDER BY CURRENT_VALUE DESC;
    

    The above query returns results similar to the screen capture below. On the test system, the QMAXJOB system value was set to 970,000. If you have QMAXJOB set to a lower value, the results will use that setting. The results are ordered by the CURRENT_VALUE (i.e., JOB_COUNT column) to show the current number of jobs that was tracked. You could change the ORDER BY to be LAST_CHANGE_TIMESTAMP to see the consumption over time. The PERCENT_CONSUMED column makes it easy to understand how close the number of jobs got to the QMAXJOB system value.

    IBM supplies several global variables that can be used to control how the system prunes the SYSLIMTBL table. You can control the pruning of the table by designating the number of days to keep a row, or by stipulating the number of rows to keep for each type of limit. You can change the value of any of these global variables to customize the pruning of SYSLIMTBL to meet your specific needs.

    System Health Services features built-in alerting for a small number of these limits, along with global variables to define when the system should send the alert for these limits (the default of which is 90 percent of the maximum). The alert is simply a message, SQL7062, sent to the QSYSOPR message queue. The system only checks these threshold settings once a day, when Collection Services is cycled, so if you are concerned about timely notification, the option of using a trigger as described above would be better.

    Also, a reminder that Run SQL Scripts has examples for all IBM i Services, including System Health Services.

    Scott Forstie, the Db2 for i Business Architect who provided me with the example above, has a presentation available with more information about System Limits, including many examples of using triggers and SQL queries to review the system limit information.

    RELATED STORY AND RESOURCES

    Guru: Maximum Number Of Jobs And Job Table Warning Customization

    Maximum Capacities (IBM)

    System Health Services (IBM)

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: 400guru, DB2 for i, FHG, Four Hundred Guru, Run SQL Scripts

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Recent IBM i Redbook Roundup Thoroughly Modern: Building Organizational Resilience in the Digital Age

    Leave a Reply Cancel reply

TFH Volume: 32 Issue: 3

This Issue Sponsored By

  • Maxava
  • Fresche Solutions
  • Racksquared
  • Manta Technologies
  • WorksRight Software

Table of Contents

  • IBM i Community Predictions For 2022, Part 3
  • Thoroughly Modern: Building Organizational Resilience in the Digital Age
  • Guru: Keeping Track Of IBM i System Limits
  • Recent IBM i Redbook Roundup
  • IBM Preconfigures Power System Racks Running Oracle Database

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23
  • SEU’s Fate, An IBM i V8, And The Odds Of A Power13
  • Tandberg Bankruptcy Leaves A Hole In IBM Power Storage
  • RPG Code Generation And The Agentic Future Of IBM i
  • A Bunch Of IBM i-Power Systems Things To Be Aware Of
  • IBM i PTF Guide, Volume 27, Numbers 21 And 22

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle