The OL Connect Server manages engines that extract data, create web pages, emails and print output, in addition to handling other requests. These operations run simultaneously and chances are you’ll never have to worry about the way the server multi-tasks. But if OL Connect is not producing output as fast as your license allows or if you ever had to tweak the ‘scheduling settings’ in the past, it can pay off to look at OL Connect’s multi-tasking settings, starting with the engine setup.
This is the first how-to in a series about OL Connect’s multi-tasking. It focuses on the engine setup. Follow-up how-to’s will dive deeper into the presets and custom settings for parallel processing.
To start with, what does ‘task’ mean in the context of multi-tasking? For the purpose of this article, a ‘task’ refers to a single request to the OL Connect Server to extract data or to create output (email, web or print). Those tasks can be triggered by an OL Connect Workflow plugin, an OL Connect Node-RED stack node, or a direct call to the server using its REST API.
However, stating that the OL Connect Server is multi-tasking doesn’t mean to say it does everything by itself. On the contrary, the server delegates tasks to three different engines:
- A data mapping engine that extracts data from a data source.
- A merge engine that creates content by merging a template (be it an email, web or print template) with the extracted data.
- An output engine that produces print output from the intermediate print content created by the merge engine.
If the server receives multiple simultaneous requests for the same type of task, it can put several engines to work in parallel. It is up to the OL Connect Server to determine how many engines work in parallel on which type of tasks.
Out of the box setup
So, how many engines can work in parallel? Let’s examine the engine setup that the OL Connect Server gets out of the box.
- Open the Connect Server Configuration tool. (Just click the Windows Start button and start typing the name of the tool.)
- Open the Engines tab.
A fresh installation will have only one data mapper engine and one output engine. The initial number of merge engines is one less than the number of cores in the system. This leaves one CPU core free for the Connect Server, for the other engines and for the operating system to use.
The number of merge engines is higher because they are involved in the creation of output of all kinds (print, email and web) and content creation can be relatively time-consuming. Having more merge engines generally results in better performance. The more cores available, the better!
The number of engines that the Connect Server can use is not only limited by the engine setup. The license also limits the number of simultaneous requests that the OL Connect Server can handle.
Here is an overview of the maximum number of tasks and the maximum print output speed in pages per minute (print output only) for each license type.
|Max. simultaneous tasks||Max. print output speed in PPM|
|PlanetPress Connect + 1 Performance Pack||8||7,000|
|PReS Connect + 1 Performance Pack||24||20,000|
|PReS Connect + 2 Performance Packs||32||40,000|
|PReS Connect + 3 Performance Packs||64||80,000|
The license limit only applies to requests that create output, and is applied separately for each output type. For instance, with OL Connect Workflow, the license limit impacts the following tasks:
- Email: “Create Email Content”
- Web: “Create Web Content”
- Print: “Create Output” and “All in One”.
(The same limit also applies to the respective requests when made directly via the REST API.)
As the table above shows, PlanetPress Connect has 6 “licensed tasks”, which means that at most 6 email tasks can be handled by merge engines at the same time, as well as 6 web output tasks and 6 print output tasks. Note that the number of print merge tasks that can run in parallel is not limited as the limit is only applied at output time.
If, for any type of output, the number of simultaneous tasks requested exceeds the maximum allowed by the license, then any additional task is queued up on the server until a running task completes.
Note that the license does not limit the number of engines itself. It only limits how many of them can produce the same type of output at the same time.
How the engines are used
We already said it is up to the OL Connect Server to determine how many engines can work in parallel on any specific task. This determination relies on the Parallel Processing settings, so let’s have a look at those. Note that the terms Output Engine and Weaver Engine are equivalent.
They can be found in the Connect Server Configuration tool, on the Parallel Processing tab.
When parallel processing is set to Default, the ‘Multi-tasking’ option is set to ‘Optimize per task’, and no engines are kept in reserve for any type of task. This means the OL Connect Server launches tasks in a first-in, first-out (FIFO) order. This default setup will work well in most cases, such as for the following scenarios:
- When many small jobs (of any sort) arrive in parallel, each will have its content created as soon as a merge engine becomes available. If the print jobs are small (less than 10 pages), a single output engine can easily handle multiple queues fast enough.
- When large print jobs run one after another in a single queue, OL Connect will take as many merge engines as it can, and the output engine will work at either the licensed speed, or as fast as the hardware will allow. The same will happen if you print from the OL Connect Designer.
Improving the engine setup
If the default setup works for you, then you don’t have to change anything! But what if it doesn’t?
You should first try to adjust the number of engines. A good rule of thumb is to look at the number of cores that your system has. It usually does not make sense to run many more engines of a certain type than there are cores available in the system.
But engines only use cores when they are active, and it happens frequently that engines of different types do not run concurrently. For example, many processes perform content creation and output creation in sequence. So if you don’t expect different types of engines to run tasks simultaneously, you could very well configure as many engines of each type as there are cores in the system.
Still, this does not mean you should always specify as many engines as the number of system cores. Remember that an engine always takes up memory, whether it is being used or not. You should always allow for the system to maintain a healthy amount of free memory, or else it might slow down.
A few more tips:
- When large print jobs are queued, a single output engine might hold up print output creation. If multiple print output tasks need to run in parallel, just add one or more output engines. There is no need to set it to the licensed maximum, though. The licensed speed will automatically be divided among the available engines.
- Adding data mapping engines is rarely necessary but might be useful when you want large data mapping operations to run simultaneously. Note that adding too many data mapping engines can have adverse effects on the system as they put a non negligible load on the database.
- Check whether the process logic (e.g., in Workflow or Node-RED) is set up to run things in parallel. If not, whilst there may be plenty of engines available, they won’t get used.
- Make small changes and take plenty of time to evaluate the impact of a change – keep in mind that other factors can also affect the output speed. There’s no need to restart the services, the settings take effect immediately.
If the setup still doesn’t work as well as you’d expect, then it might make sense to change the Parallel Processing settings from Default to one of the other presets, or even to make custom settings.
The next how-to explains the differences between Parallel Processing presets, and when to use them: Multi-Tasking 2: Parallel Processing Presets.