Adding/Editing Jobstreams: Trimming

{"URL":["/*.*/AddJobstream_Trim","/*.*/EditJobstream_Trim"],"heroDescriptionIdentifier":"ice_TRIMMING_conceptual","customCards":[{"id":"ice_TRIMMING_Override_AutoTrim","title":"Overriding the Default AutoTrim Parameters","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA_DOCU/*.*/AAI%20Guides/Content/Jobstreams/Jobstreams_Trimming.htm","languages":["en-us"]},{"id":"ice_TRIMMING_AddingTrimmingPoints","title":"Trimming Jobs Manually","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA_DOCU/*.*/AAI%20Guides/Content/Jobstreams/Jobstreams_Trimming.htm","languages":["en-us"]},{"id":"ice_TRIMMING_ListOfTrimPoints","title":"The List of Trim Points","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA_DOCU/*.*/AAI%20Guides/Content/Jobstreams/Jobstreams_Trimming.htm","languages":["en-us"]},{"id":"ice_TRIMMING_Removing","title":"Removing Trim Points","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA_DOCU/*.*/AAI%20Guides/Content/Jobstreams/Jobstreams_Trimming.htm","languages":["en-us"]}]}
auto trim,manual trim,remove jobs from a jobstream

When a jobstreams is built, AAI traces all the target job's predecessors to the very first job(s) that must execute in order for the target job to run. In large environments, a jobstream can contain thousands of upstream predecessor jobs. However, not all of them are relevant to the functional or scheduling context of the target job. For example, when predecessor jobs are executed in a frequency that does not correlate with that of the target job, this is usually an indication that they are not part of the same business logic. Including them can lead to less accurate predictive analytics for the target job.

To ensure that AAI's analysis, calculations and predictions are accurate, AAI provides a Trimming function that excludes unwanted upstream predecessors from its calculations. As a result, the jobstream contains only the jobs that are relevant to the business process. AAI lets you trim jobstreams automatically and manually.

AutoTrim

When setting up an AAI instance, your AAI administrator can configure it to automatically trim all jobstreams based on certain server parameters that are defined in the Config Tool. If so set up, they apply instance-wide by default to all jobstreams that are built after those parameters have been configured.

If the AutoTrimming function is enabled on the server, the AutoTrim section on the Add/Edit Jobstream dialogs (Trim tab) is also enabled. It displays the values defined on the server to trim jobs based on their frequency/repetitiveness. As a jobstream administrator, you can override the default auto-trimming parameters for this particular jobstream here:

For more information about the default AutoTrimming options, see

If AutoTrimming is not enabled on the server, the AutoTrim section of the Jobstream dialog is disabled.

Important!

If the structure of the jobstream changes after configuring the AutoTrimming options (for example, jobs are added), AAI automatically applies the AutoTrimming configuration. If the new jobs meet the criteria, they will be automatically trimmed.

Manual Trimming

Regardless of whether AutoTrimming is enabled on the server or not, you can always define manual trim points for the jobstream.

Common Use Cases for Trimming

Most probably you have common pieces of code that are part of multiple applications. For example:

  • Nightly calculations of an annual percentage rate

  • Preparatory steps for running applications that check whether a database is online

  • Steps to check whether a particular server is up and running

If you include the jobs that execute such processes in multiple jobstreams, every time that AAI issues an alert associated with it, you will receive alerts for all affected jobstreams. Also, these processes are probably irrelevant for the purpose of the SLA. Instead, you can trim the jobstreams and create a different jobstream with only the common code so that it can be monitored by itself. By doing so, you can focus on the SLA-relevant jobstreams and, if something is wrong with this common part of the process, you will be alerted only once when the corresponding jobstream runs.

Overriding the Default AutoTrim Parameters

If the AutoTrimming function is enabled on the server, the AutoTrim section in the Trim tab is enabled and it displays the values that are set in the Config Tool. You can override those values by specifying different ones here. These values apply as soon as the jobstream has been rebuilt, which happens as soon as you save your changes.

You have the following options to trim jobsteams:

  • Trim Repetitive Jobs

    Let's suppose that one of the predecessor jobs of a target job pulls data every minute to check whether a file exists on a specific directory; this job runs only if the file exists. This repetitive job is a purely technical process that has no relevance for the jobstream analysis and predictions and that would only clog the jobstream views.

    The Trim repetitive jobs... option automatically removes these high-frequency jobs. The default value here is 1.5, which means that the predecessors that execute 1.5 times more often than the target job will be removed from the jobstream.

  • Trim Infrequent Jobs

    Let's suppose that the target job executes once a day. The target job has a dependency on a job that produces a report and that executes once a week. This predecessor has no impact whatsoever on the runtime values of the target job.

    The Trim infrequent jobs... option automatically removes jobs that run less frequently than the target job. The default value here is 0.5, which means that the predecessor that execute half so often as the target job will be removed from the jobstream.

  • Restore defaults

    Click this button to override your input in the AutoTrim section and restore the default values as defined in the Config Tool.

Disabling the AutoTrim Options

If you disable the AutomTrim options on this dialog, this means that you undo the trimming that AAI performed automatically based on the parameters define on the server. However, you must save your changes at this point so that AAI can rebuild the jobstream. Only then will AAI "know" that the previously trimmed jobs and predecessors are back in the jobstream.

Trimming Jobs Manually

No matter whether the AutoTrim function is enabled or not, you can always define trim points manually. The trim point is the job that you designate as the one as of which all the upstream dependencies will be removed from the jobstream. When defining manual trim points, you can decide what AAI will remove:

  • The designated jobs (trim points) and their predecessors

  • Only the predecessors (the designated jobs remain in the jobstream)

To Define Trim Points Manually

how to define trim points manually
  1. Click the Add Trim Points button. The dialog changes to display the Add trim point(s) view, where you can search for the jobs that you want to remove from the jobstream.

  2. In the Add trim point(s) view, select whether you want to remove only the predecessors or both the predecessors and the jobs that you are about to designate from the jobstream.

  3. In Find Job specify the search criteria to get the list of potential jobs to be trimmed.

    You have the following options to search for and specify the trim points:

    • Where job has start time

      Start times are often a good basis to use as your trim points.

      Example:

      The bulk of a particular batch starts on the close of business at 5:00 PM. At this time there are still earlier upstream dependencies that AAI picks up due to the default jobstream definition.

      In this case, select the job in the jobstream that has the start time of 5:00 PM to trim the jobstream from this point. This way, the predecessor of this job are not included in the jobstream.

    • By job name

    • Where job has no run frequency

      This is the case if you have jobs in the scheduler that AAI identifies as dependencies (they are part of the upstream traced back to the target job) but that have never executed. Neither the scheduler nor AAI have run information about them. These jobs do not have any impact on the target job and on the SLA whatsoever and you can trim them.

    • Where job has varying run frequency

      You can trim jobs based on the frequency with which they execute in the scheduler. You have the following options:

      • Do not show all the jobs in a flow

        Let's suppose that you have the following dependency flow:

        Job A --> Job B --> Job C

        By specifying Job C as trim point, you trim all its upward dependencies (both Job A and Job B). Select this option to have AAI show only the jobs that are relevant for trimming. In this case, this would be Job C.

        If you have complex dependency flows in your jobstreams, this option simplifies the representation of such jobstreams, helping you select the right job.

      • Repetitive

        See Trim Repetitive Jobs.

      • Less Frequent

        See Trim Infrequent Jobs.

      • Both

        Select this option to trim both Repetitive and Less Frequent jobs.

  4. Click Search to display the list of resulting jobs.

  5. In the resulting list, select the job(s) that you want to include in the list of jobs to eliminate from the jobstream.

  6. Click the Add button to return to the previous view.

The jobs that you have just added are now included in the list of jobs to be removed from the jobstream. You see this list at the bottom of the dialog.

Important!

Manual trimming is a one-off configuration. Overtime, your manual trim points can become out of date. For example, if the structure of the jobstream changes after defining the manual trim points (jobs are added), you will have to come back to the jobstream definition and check if further manual trimming is necessary.

The List of Trim Points

The list at the bottom of the dialog shows the jobs that will be removed from the jobstream through both the AutoTrim function or the manual trim points. For example:

In this screenshot, the Trimmed By column displays Auto, indicating that the job and its predecessor have been removed automatically by the AutoTrim function. For manually added trim points, this column reads User.

To Trim the Jobstream

  1. Select the checkboxes of the jobs that you want to trim.

    The total number of jobs that remain in the jobstream after trimming the ones you have selected is displayed in # of jobs in jobstream.

  2. In the Trim column you select whether both the job and its predecessor or if only its predecessors will be trimmed.

  3. Click Save. This rebuilds the jobstream using the specified trim parameters.

Notes:
  • The AutoTrim function always removes both the jobs that meet the defined criteria AND their predecessors. This is not the case for manually defined trim point (see below).

  • Use the AutoTrim feature with caution! It can remove processes that should be taken into account for jobstream calculations.

Removing Trim Points

Trim points that have been defined automatically through the AutoTrim function cannot be removed. You can only remove manually defined trim points. Manually defined trim points read User in the Trimmed by column.

  1. In the Trim Point list select a line. The Remove Trim Point button is displayed.

  2. Click the button.

  3. Click Save.

    AAI rebuilds the jobstream and the removed jobs (trim points) and their predecessors are included in the jobstream going forward.

See also