Topic Options
#56482 - 11/01/18 05:54 AM Planet press - Multithread report printing
ashish Offline
OL Newbie

Registered: 09/24/18
Posts: 1
We have a planet press environment where we print (physical prints + PDF generation) around 700 reports per day.
We have improvised the report print time to some good extent by normalizing the design templates.

We were thinking to improve it further by having multiple thread environment. Currently our workflows are running on 4 threads configuration.
So here we would like to understand the internal working of Planet Press application. i.e. how the multi-threading works
Also, what is the best multi-thread configuration as per local resources such as Ram, CPU. We have an environment with around 6vCPUs and 20 GB ram

In below case how the thread management will work?
 Workflow is configured to use 4 threads
 We have 20 + processes
 If at a same time, we are printing reports for all these 20 + types of processes [Assumption/Analysis: For each process shown below a new thread will be created. Right?]

#56490 - 11/07/18 09:48 AM Re: Planet press - Multithread report printing [Re: ashish]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1931
Loc: Objectif Lune, Montreal, Qc
Not sure exactly what you call threads, but here's some information that might be helpful.

Each Workflow Process launches on its own thread. There is no setting in Workflow that allows you to restrict the number of threads it uses for each single process. However, if the Process is set to self-replicate, then it will launch a copy of itself on separate threads as well, and in this case, you can restrict the maximum number of self-replicated threads through the Preferences>Plug-in>General>Maximum number or replicated processes option.

But specifying only 4 threads in that field would be way too low. Workflow is easily able to run several tens, even hundreds of threads simultaneously. A lot of people confuse Threads with Cores or CPUs and think that they should not use more threads than there are CPUs available, but that's just not the case at all (for instance, this web Page viewed on my machine requires the Microsoft Edge browser to use 29 threads).

You should set Workflow to use at least 50 replicated threads, that should allow it to make better use of the resources your machine has.

The only caveat to using more threads is that there is a limit to the number of PDF Engines that Workflow can launch simultaneously. So if you have 20 threads requiring a PDF Engine and only 4 PDF engines are running, then those 20 threads will queue their reqests until one of the engines frees itself. You can increase the number of PDF Engines (Preferences>Plug-in>messenger>PlanetPress Alambic section), but doing so will require more memory. On your system, you could probably push that number up to 6.

You will have to test what the best configuration is for your particular needs. Start by making small changes, see how that goes, then continue tweaking until you get the best performance you can.
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen