There are 3 settings that manage the CPU utilisation.
- MaxNumConcurrentConsolidations: The number of concurrent consolidations that can run in a server at one time. This setting will adjust the total number of consolidations that run in one server regardless the number.
- NumConsolidationThreads: The number of CPU treads that can be used to multi-thread a consolidation. A consolidation with 32 threads will finish quicker than a consolidation with 8 threads but the first one will use all the available CPU.
Since version 22.214.171.124, a new setting has been introduced. This setting is used to define how the consolidation process will run.
Quoting from the Oracle manual, the 3 available options are:
- 1 - Allows the consolidation process to calculate and translate all children entities up to the [Parent] value before the numbers are consolidated into the parent entity.
- 2 - Allows the consolidation process to multi-thread parentlevel entities, greatly improving the performance on large consolidations.
- 4 - Skips the initial calculation on all baselevel entities. Those entities are calculated as needed when processing their parent entities.
- The default value of this setting is 2. This means that the system will calculate all the children of a hierarchy before proceeding to calculate the immediate parents.
As an example, imagine the typicla structrure of an entity hierarchy which is usually a piramid. The group entity is at the top of the pyramid and the base entities are at the base of the pyramid. In between are the various management entities which can be based on geography (countries or regions), can be based on organisational structures (factories, distribution centres), can be based on accounting needs (holding entities, adjustment entities) or a combination of the above options. In this type of hierarchy the number of base entities is always bigger than the number of immediate parents.
To understand how the consolidation mechanism will work and what will be the expected CPU utilisation, let’s assume that we have a set the NumConsolidationThreads to 2 and we have a hierarchy with 1 parent at generation 1, 10 parents at generation 2, 40 parents at generation 3 and 128 base entities at generation 4.
1. At the beginning of the consolidation, the application will consolidate the 128 base entities of generation 4. During this phase, all the 32 threads will be used since we have more subcubes than threads.
2. When the last base entity of the first immediate parent will be consolidated, the application will start using any available threads to consolidate the 40 parents of generation 3. During this phase, all the 32 threads will be used since we have more subcubes than threads.
3. When the last parent of generation 3 will be consolidated, the application will start using any available threads to consolidate the 10 parents of generation 2. During this phase, only 10 threads will be used since the number of subcubes of generation 2 is 10.
4. When the last parent of generation 2 will be consolidated, the application will consolidate the 1 parent of generation 1. During this phase, only 1 thread will be used since the number of subcubes of generation 1 is 1.
Based on this observation, most of the CPU will be utilised at the beginning of the consolidation when multiple threads will be used to calculate the base entities. As the consolidation proceeds to the top of the structure less CPU.
Additionally, one thread should spend less time calculating the data of a base entity comparing to calculating the data of the top entity since the subcube of the base entity will be smaller than the subcube of a parent entity.
Any thoughts? Is my understanding correct or I am missing something?