Job execution framework

All BMC Server Automation jobs execute in the job execution framework. This section describes the overall operation of the framework, including:

Jobs, targets, and work items

The execution of a BMC Server Automation job begins with the job being placed in a work queue of jobs waiting to execute. Each job server maintains a pool of threads, called the job thread pool, dedicated to executing jobs in the job queue.

The main work of a job is the creation and management of individual work items and their results. Work items are separately-schedulable units of work performed as part of the execution of a job. It is in the execution of work items that the job carries out its responsibilities.

Like jobs, work items are executed by job servers. A work item might or might not be executed by the same job server that is responsible for executing the job that created it. Work items scheduled for execution are maintained in a work item queue in the job server. Each job server maintains a pool of threads, known as work item threads, for the execution of work items.

A work item is almost always bound to one target host or to a component on a target. A job might generate multiple work items for each target, corresponding to different steps or stages of the job. Thus, a job that is scheduled to execute against 1,000 target hosts might create and schedule execution of several thousand work items.

Lightweight work items

Some work items are designated as lightweight work items because their execution consumes significantly fewer server resources than the execution of normal work items. In addition to the work item thread pool, each job server maintains a separate thread pool for lightweight work items, which is called the lightweight work item thread pool. If the lightweight work item thread pool is not empty (that is, has a non-zero size), threads from this pool manage lightweight work items. Otherwise, all work items (lightweight and nonlightweight) are managed by the normal work item thread pool.

The lightweight work item thread pool is configured to be empty by default. For some workloads, specifying a non-zero size for the lightweight work item thread pool can improve performance. For more information, see Sizing and scalability factors.

Asynchronous BlExec tasks

While a work item is executing, a work item thread is assigned exclusively to that work item. Some work items, however, spend much of their time waiting for results from operations being carried out remotely (for example, on a target host). A work item thread assigned to such a work item "blocks" while it waits. Blocking can present a potential resource issue because the work item thread is not available to service other work items with more active processing needs.

Asynchronous tasks address this resource utilization issue. Asynchronous tasks are a relatively new feature of the job execution framework, having been introduced in BMC Server Automation version 8.0. Instead of performing a remote operation and waiting for a response, the work item can create and queue an asynchronous BlExec task to perform the operation. Then the work item itself terminates. Asynchronous BlExec tasks are managed by the BlExec service, which maintains yet another thread pool. However, the tasks occupy a thread from the pool only when they have active processing to perform. While it waits for a response from the remote target, an asynchronous BlExec task does not consume any thread resources.

A work item must be written explicitly to make use of asynchronous tasks. Work items whose implementation is not asynchronous task-aware still perform remote operations directly and cause their work item threads to wait for the operation to complete. Currently, some BMC Server Automation jobs are asynchronous task-aware and some are not. The following table lists the jobs that take advantage of of asynchronous tasks.

BMC Server Automation version

Asynchronous task use

7.6 and earlier

The BlExec service and asynchronous BlExec tasks are not available in BMC Server Automation version 7.6 and earlier.

8.0 and later

In BMC Server Automation version 8.0, NSH Script Jobs and Patch Analaysis Jobs take advantage of asynchronous BlExec tasks.

8.1 and later

In BMC Server Automation version 8.1, Deploy Jobs and Virtual Guest Jobs also take advantage of asynchronous BlExec tasks.

Was this page helpful? Yes No Submitting... Thank you

Comments