How to allow multiple Engine instances to run a single Multithreaded Task
book
Article ID: KB0076512
calendar_today
Updated On:
Products
Versions
TIBCO DataSynapse GridServer
5.2.x , 6.3.x, 7.x
Description
By default, the number of Gridserver engine instances match the number of CPUs on the machine. For example, a machine with 8 CPUs will have 8 engines with a relation of 1 engine per CPU.
However, it is important to clarify that each engine is not dedicated to a particular CPU on the machine. It can be a common misconception, but load on an engine is distributed to all cores. So, typically, all CPUs will be active whether one engine is busy or all engines are busy. The way around this, if needed, is to dedicate each engine a particular CPU. This is done by assigning CPU affinity at the machine OS level or using a third party tool.
Considering the above explanation, there could be a use-case where each Task of a Service might require to run on several CPUs for better use of multithreading.
Environment
All
Resolution
This is possible by decreasing the number of Engines per Daemon. This can be configured daemon level on Daemon admin page -> Instances field -> Input the number of instances needed.
Consider the following example: A Service needs to run each task on 8 CPUs. A Daemon machine host has 8 CPUs. -> Configure "Instances" field for this daemon on Daemon Admin page of the Manager UI to 1. -> As a result, there will be only 1 Engine showing for this Daemon. Each Task running on this engine will make full use of the 8 CPUs of the machine.
Issue/Introduction
It might be sometimes beneficial to allow several cores to work on a single task and this article gives a bit more information around this use-case and also how engines are related to available CPUs on the machine