IBM i (AS400, iSeries) application performance tuning software
Tips & Techniques

Batch processing throughput on your System i servers can be affected by many factors. Adequate CPU must be available during critical batch processing cycles. Memory resources need to be allocated in sync with the demands of priority jobs on the system. Disk arm utilization should be monitored to guarantee that these processes perform at an optimum level.

Often overlooked is the need to monitor and tune batch job queues on the system. CPU, memory and disk utilization could be at minimal levels but end-users are waiting several minutes or hours for their batch jobs to go active. Tracking job queue wait times, creating more and different types of job queues can dramatically improve batch job throughput on your system.

Tips & Techniques

Create your own version of the 'Submit Job (SBMJOB)' command. It is safest to not give your command the same name and to not put it in front of QSYS in the system portion of your library lists. Change your code to use your SBMJOBX command instead.

This command does a basic job name lookup from a new job queue table that you create. It then uses the SBMJOB command from the QSYS library using the job queue that you defined in your new table. This table or physical file can now be externally maintained and easily 'tuned' as you go through the process of tracking, monitoring and tuning job queues on your system. The ability to easily adjust job queues without making ongoing code changes will simplify the process of improving batch throughput on your system.

Many jobs are submitted with hard-coded job queue names. Others get their job queue from a job description object. Keep these parameters as-is and they can be used as a default job queue for those jobs that are not yet defined in your new job queue table. As code changes are made to use the new SBMJOBX command, make sure that meaningful job names are used. You will be using these job names to define job queues in the future. You don't want to let them default to the name of a job description. At a minimum, pass in the name of the initial CL program that is called by the batch process.

Frequently Asked Questions

How do I create a new job queue?

The 'Create Job Queue (CRTJOBQ)' command is used to create a new job queue object. This job queue must be attached to a subsystem before it can be used. The 'Add Job Queue Entry (ADDJOBQE)' command defines the subsystem where jobs will run if submitted to this new job queue. On the ADDJOBQE command, you also define the 'Maximum active jobs' for the job queue.

This additional parameter is the key attribute that defines the behavior and characteristics of the new job queue. Will this be a single-threaded job queue? Will there be no limit on the number of simultaneous jobs? Will there be a fixed limit on the number of active jobs running via this new job queue? Each of these questions need to be thought through to ensure that you are getting maximum throughput on the system without creating conflicts within your application software environment.

What types of job queues should we create?

  1. Create a job queue called REPORTS selecting MAXACT(*NOMAX). Schedule a job to hold this job queue at 6:00 AM and to release it at 5:00 PM. Teach your end-users, change your code and job descriptions or update your new job queue table to send all long running batch reporting jobs to this new job queue. Consider releasing this job queue during nightly backups that use the save-while-active parameters. You can adjust the hold and release times per your business requirements and system availability. You may need to adjust the MAXACT parameter as well depending upon other system requirements and resource availability.
  2. You may need an INVOICING job queue that has a MAXACT(1) parameter. If your invoicing jobs can not be run simultaneously, they may need their own job queue to ensure that they run in a single-threaded manner.
  3. You might want to setup FAST and SLOW job queues or HIGH and LOW priority job queues. You do need to be careful and make sure that you understand the dependencies within your application. If you have a posting job, an update job and a reporting job that all depend upon the results of the prior job - you need to ensure that these jobs continue to run in the proper sequence. There are many things that a developer can do to eliminate or at least minimize dependencies. If they exist within your environment, you need to ensure that your job queue tuning doesn't wreak havoc.

One of the most common issues that prevent you from multi-threading jobs is the use of temporary work files. If these physical files are created and used in a permanent library - these jobs must be single-threaded. Get this code changed to create and use these files in the QTEMP library and now you can run as many of these jobs simultaneously as your resources allow.

New Features

A new 'Job Queue Tracking' feature has been added to the Workload Performance Series software. You have always been able to use the System Navigator tool to track and trend the number of jobs waiting in job queues based on historical data. Using our 'Interval Analysis' IBM i (AS/400, iSeries) Job Queue Trackingfeatures you can easily see the number of active batch jobs, interactive jobs and jobs waiting in job queues during any interval throughout the day.

Our Workload Navigator tool has always provided the ability to easily identify the batch jobs that wait in job queues the most. The number of minutes or seconds that jobs wait in a job queue is tracked by job name, user, subsystem and job type. These features have provided the information needed to address job queue throughput issues on your system.

The new 'Job Queue Tracking' features have been added to our Workload Navigator tool to give you a new way to tackle batch throughput and performance opportunities on your System i servers. After selecting this new option on the Workload Performance Series menu, you are prompted to enter a specific job queue name and library. After pressing the ENTER key on this new screen, a list of active jobs is displayed. This list shows all currently active jobs on the system that were submitted through the selected job queue. It also shows the job description name and library that may have been used to define the job queue for each job. You can use the '5=Work with' option just as you would on a WRKACTJOB command to access detailed information for any of the displayed jobs.

The main point of this new feature is to provide you with quick and easy access to a list of jobs that are currently running and holding up a job queue. If jobs are backing up in a queue, these are the jobs that they are waiting behind. You may need to move the queued jobs to a different job queue or these active jobs might need to be pointed to a different job queue to get them out of the way the next time.

Special Offer

We invite you to go to our web site at, take us up on our Free 30 Day Trial offer or just make use of our extensive online Resource Center. White Papers and Webcasts are available which provide educational value to managers, administrators and software developers.