Multi-Tasking 3: Custom parallel processing for merge engines

Multi-Tasking 1: Engines

Multi-Tasking 1: Engines

The OL Connect Server can handle a lot of requests at the same time. To make it seamless and smooth, it delegates tasks to dedicated engines. Engines of the same type will work in parallel according to the Parallel Processing settings of the server. In most cases the default presets work fine, and other presets are provided for the more common use cases. But if those presets still don’t perform as expected, you can choose your own custom settings. This article goes over the individual settings for merge engines, one by one.

This article is part of a series. The previous one explained the Parallel Processing presets: Multi-Tasking 2: Parallel Processing Presets. You should choose the most suitable preset before switching the Parallel Processing settings to Custom. The chosen preset becomes the starting point for your custom settings.

How many engines of each type you need is the subject of the first article in this series: Multi-Tasking 1: Engines.

Content Creation settings

Settings for Parallel Processing are available in the Connect Server Configuration tool under Parallel Processing. There are two tabs with settings for Parallel Processing: Content Creation and Output Creation. In this article, we’ll focus on the Content Creation tab.

Creating content is what merge engines do. They merge Print, Email or Web templates with data. The Content Creation tab holds the parallel processing settings for merge engines. If the Content Creation tab is disabled, it means only a single merge engine is specified, in which case there is obviously no need for setting how engines work in parallel.

Options

Now let’s have a look at the individual options on the Content Creation tab.

The number of merge engines at the top is read-only; it reflects the settings on the Engines preference page.

Multi tasking

The Multi tasking setting lets you choose between running each task with as many merge engines as possible (“Optimize per task”) or borrowing merge engines from the currently running task for new tasks as they arrive (“Maximize simultaneous tasks”).

Note that this setting only applies to print tasks (as of OL Connect 2021.1) since only print and PDF content creation tasks can use multiple merge engines.

How does this work?

When a new content creation job arrives, the maximum number of merge engines to use is derived from the number of records in the input data. If the intended number of engines are all available when processing starts, they will all get to work. If not… that is when the Multi tasking setting will make a difference.

In the Optimize per task mode, a new content creation task can only be taken up if at least one merge engine is available. Additional merge engines will be assigned to the task as they become available, up to the number that corresponds to the size of the task. When a task finishes, the merge engines that become available will be assigned to tasks that are still running, if their intended number of engines has not yet been reached – even if new tasks are waiting.
This means that a content creation job will run as quickly as possible. A job that is large enough will use all merge engines, forcing other jobs to wait for it to complete.

In Maximize simultaneous tasks mode, a content creation task cannot block other tasks. In this mode, the server pulls engines from running tasks and reassigns them on the fly to new tasks as they arrive. When a task finishes, the merge engines that become available will be re-assigned to still running tasks if there are no new tasks waiting.

To avoid inefficiencies, merge engines will first complete their work on a chunk of records before being reassigned to new tasks. For this reason, it can be necessary to reserve engines for on demand tasks that have to be picked up right away, but we will get to that later.

The bottom line is: if your goal is to accommodate as many simultaneous tasks as possible as opposed to getting the best speed per job, then the Maximize simultaneous tasks mode is best for you.

Additional engines every n records
This setting controls how many merge engines are used for a content creation task. With every additional n records in the task, an additional merge engine will be used. With the default threshold of 100 records:

  • tasks with 1 to 100 records get only 1 merge engine,
  • between 101 and 200 records get 2 merge engines,
  • etc., until all merge engines are used.

The default of 100 records was chosen with an average system in mind, i.e., one with less than 10 merge engines. Which threshold is useful in your case depends on your system and production needs.

How many records must a job have to use all merge engines? And what is an acceptable output speed for jobs that are handled by 1 merge engine? Consider for instance that, at 500 pages per minute, 50 records of 1-pagers will take 6 seconds. Is it important to cut that time by half by using 2 merge engines? That’s for you to determine.

Reserve engines for on demand tasks

An ‘on demand’ task is a high priority task that needs to be completed as soon as possible. On demand tasks are often single documents: one web page, for example. That is why the option to designate a content creation task as ‘on demand’ is based on the number of records.

To respond as quickly as possible to tasks that cannot wait, you can reserve engines for each type of content.
You are not allowed to reserve all available engines (displayed in the “Merge engines available for any task” field) as this might prevent some jobs from ever being processed.

Reserved engines are not used for other tasks. As a result, if on-demand tasks are not constantly coming in, the OL Connect Server is not using the full processing power of the system. In this situation, it may be beneficial to use more merge engines than one normally would, based on the capacity of the system.

In the next article in this series, we’ll examine similar settings for the output engines.

Tagged in: Engine, Merge, Multi-tasking, Parallel