Keeping it Together with Job Batches
Version: Deadline 8.0
WHAT ARE JOB BATCHES?
Job batches in Deadline are simply a visual way of grouping together two or more related jobs in the Deadline Monitor. While they serve no functional purpose from a job scheduling perspective, they can actually be pretty useful!
There are probably a few reasons why you might want to visually group jobs together, but the obvious reason is that the jobs are related in some way. For example:
- You are submitting multiple layers from the same project as separate jobs.
- You are submitting a tile rendering or Jigsaw job, and there is an assembly job that is dependent on it.
- You are submitting an animation job, and there is a Draft job that is dependent on it.
In the Jobs Panel, all jobs in the same batch will be grouped together under the batch name.
Here, we can see four batches. A batch can be expanded to view all of its corresponding jobs, or collapsed to hide them. Note that these examples, plus many more, are handled automatically by the various Deadline submitters. However, there could be cases where you want to manually group jobs together after they have been submitted, or you are writing your own submitter and want to know how to group them automatically.
ADDING JOBS TO BATCHES
If the jobs have already been submitted to Deadline, adding them to a batch is easy! Just select the jobs you want to add to a batch, and then right-click and select Modify Job Properties. Then specify a Batch Name and press the OK button. The selected jobs will now be grouped together under the batch name in the Jobs panel.
If you want to specify the batch name during submission, it's just as easy! This can be done by adding the following entry to the Job Info File that you create as part of the submission process.
BatchName=Teapot Lights (left eye only)
We won't dive into manual job submission here, but if this is something that interests you, check out the Manual Job Submission documentation.
Once your jobs are in a batch, you'll notice that the job batch row in the Jobs panel will try to aggregate data from the individual jobs. In the highlighted job below, the User is the same across all jobs, so it is shown in the batch row. The Comment entries are different though, so <batch> is simply shown instead. The Task Progress and Status columns take the state of all jobs into account, and finally the Submit Date/Time column is based on the job that was submitted first.
WORKING WITH BATCHES
Now that you have some jobs in batches, you're probably wondering if there is anything else they're useful for. Turns out there is, but it may not be obvious. When you select a job batch row in the Jobs panel, it's actually a shortcut for selecting all the jobs within that batch. In the image below, you'll see that even though we've only selected the batch row, the Jobs panel is showing that 8 jobs are selected.
This means that you can perform operations on all the jobs in the batch by simply right-clicking on the job batch row. This includes modifying the jobs' properties, changing the jobs' state, or deleting them.
You can also work with job batches in the Job Dependency View, which can be useful if the jobs in the batch are dependent on each other.
In the image above, you can see that all jobs belonging to the batch are contained in a batch node. You can then select the batch node and move it around the viewport as a single item, or you can right-click on the batch node and perform operations on all jobs in the batch.
While job batches can be quite useful from an organization perspective, there could be situations where viewing jobs in batches is not ideal. For example, perhaps you have a Jobs panel layout that sorts on the Errors column, and you use it to track the jobs with the highest error count. Here's what you might see when jobs are in batches.
Because the batch row aggregates the Error column, the total error count for the "Example Batch" puts it at the top of the list. However, if you expand it, you see that none of the jobs actually have the highest error count.
In this case, it would be ideal to disable job batching, and this can be done by clicking on the Down Arrow button in the top left corner of the Jobs panel and disabling the Job Batch Grouping option.
Now the jobs are ordered the way you want! It's important to note that the option for disabling job batches is set per Jobs panel. So if you have multiple Jobs panels that you use, you can configure some to show job batches and some to disable them.
Finally, you may notice that it's possible for a batch to only contain a single job. In this case, the batch row will contain the same information as its job, so it's still easy to work with.
However, some might prefer to not show the batch row in this case and simply view the job itself. If you would prefer to hide the job batches that only contain a single job, select Options from the Monitor's Tools menu, and then on the Monitor Options page, disable the Group Single Job Batches option.
Note that unlike the option in the Jobs panel to disable job batching entirely, this option is applied to all Jobs panels. In addition, the Deadline Monitor must be restarted before this change will take effect. After restarting the Monitor, you'll see that the appropriate batch rows are now hidden.
For job queues ranging in size from tens of jobs to tens of thousands of jobs, job batches can be used to help keep everything organized! Normally I like to include a link at the end of these blog entries for some additional reading, but we've covered everything there is to know about job batches, so here's some documentation on controlling jobs in general. Happy reading!