Engine affinity
To improve performance on a multi-CPU Microsoft Windows® computer running multiple engines at a time, Spotfire Statistics Services manages the affinity of engine processes by assigning each process to a particular CPU, rather than moving engine assignments over time. This design is configurable for cases where the default behavior is not desirable.
By default, the engine affinities are assigned from any of the available CPUs. Thus, if you are running Spotfire Statistics Services with four engines on an eight-processor computer, the default settings would probably assign engine affinities to the first four CPUs.
However, this behavior can cause a problem if you want to run multiple copies of on a single multi-CPU machine: for example, if you want one server with TERR engines, and another server with R engines on the same machine. If the two independent servers assign engine affinities to the same CPUs, you could end up with some CPUs running multiple engines, and other CPUs left idle.
To address this situation, you can control which CPUs are used for assigning engine affinities by setting the Java property -Dengine.affinity. This property is set using Procrun. (See Monitor the service.)
The value of the -Dengine.affinity lists the CPU numbers that are available for assigning engine affinity (starting from one).
Examples
For the settings in the following table, assume that the server computer has eight CPUs.
Java Property Setting | Description |
---|---|
-Dengine.affinity= | Use CPUs 1,2,3,4,5,6,7,8 for affinity. If the value is blank, the default is to use all CPUs. |
-Dengine.affinity=1,2,3 | use CPUs 1,2,3. |
-Dengine.affinity=1-3 | an alternative to specify using CPUs 1,2,3. |
-Dengine.affinity=1,3,6-20 | Use CPUs 1,3,6,7,8 (numbers greater than the number of CPUs are ignored). |
-Dengine.affinity=1-9999 | an alternative to specify all CPUs. |
-Dengine.affinity=0 | disable assigning engine affinity |
Suppose that you want to run two servers on a computer with eight CPUs.
In this case, the first server could be set up with the following:
-Dengine.count=4 -Dengine.affinity=1-4
The second server could be set up with the following:
-Dengine.count=4 -Dengine.affinity=5-8
With these properties, the engines from the two servers would run on totally different sets of CPUs.
Usually, you would want to define -Dengine.affinity to specify as many CPUs as the server has engines, but it is not necessary. For example, if you specify the following on an eight-CPU machine, then two engines run on each of the first two CPUs.
-Dengine.count=4 -Dengine.affinity=1-2