CPU Binding
Previous Topic  


When you run your application under FireDaemon Pro you can stipulate the CPU Binding (see the Advanced Tab). CPU Binding allows you to specify which CPU or core or combination of CPUs or cores your application can run on. This is particularly useful on multi-processor multi-core machines where the process consumes many CPU cycles and you do not want the process to overwhelm the machine or you wish to explicitly direct a processes' load onto a particular processor. CPU Binding under Windows is implemented by way of an Affinity Mask. The mask is a bitmap (represented as the integer in the first column below) that determines on which processors your application can run. The table below provides some valid values that you would use when modifying or creating your own FireDaemon Pro service definition XML. Note that FireDaemon Pro service definition XML only supports the CPU Binding in decimal (Base 10). Additionally the Affinity Mask relates to the specific core(s) the process is run on and not the number of cores the process is run on. Further, the x86 architecture is little endian. This means that the binding is determined by the bits set from right to left. For example, in the Binary Mask column, the value on the far right represents the first core. More information regarding the CPU Binding and the Affinity Mask can be found here.


Decimal Mask

(Base 10 - 0..9)

Binary Mask

(Base 2 - 0..1)

Hex Mask

(Base 16 - 0..F)

Cores Process Is Run On

0

0

0

All

1

1

1

1

5

101

5

3, 1

10

1010

A

4, 2

15

1111

F

4, 3, 2, 1

100

1100100

64

7, 6, 3

1000

1111101000

3E8

10, 9, 8, 7, 6, 4

10000

10011100010000

2710

14, 11, 10, 9, 5

32769

1000000000000001

8001

16, 1