4

I have a server with 16 cores. What do I set the CpuAffinityMask to?

1111 1111 1111 1111 is 65535, should I put 65535?

Also, how to I configure the SuperClassic server?

This is for Firebird 2.5.

TIA

3
  • 2
    Why do you need to set the mask? Oct 31, 2011 at 20:18
  • 1
    @DavidHeffernan I want all 16 cores to be used by the Firebird server. By default, the CpuAffinityMask is set to 1, which means that just the first processor (core) is going to be used.
    – ioan
    Oct 31, 2011 at 21:38
  • 1
    I would have expected it to default to all processors. Perhaps I'm naive. According to docs, 65535 is indeed the correct value. Oct 31, 2011 at 21:42

4 Answers 4

7

From the documentation:

Windows Superserver defaults to using the first logical processor only, because prior to 2.5 it performed badly on SMP systems. To make use of all your processors, set the CpuAffinityMask parameter in firebird.conf to: 3 for 2 CPUs/cores; 15 for 4 CPUs/cores; 255 for 8 CPUs/cores.

So, yes, 65535 = 216-1 is the correct setting to use all of your 16 cores.

2

As far as I know only SuperServer follows the CpuAffinityMask, see Firebird Architectures, so for SuperClassic this configuration value is ignored and it will always be able to use all available CPUs

1

Setting CpuAffinityMask to 65535 is only useful if youre
- running SuperServer (not classic or superclassic)
- and you are communicating with 16 or more databases simultaneously (1 core per database)

If you have just 1 FB-database running, setting this option sounds only useful to me if you want to dedicate a specific core to Firebird instead of using the default first core.

If you want to make Firebird use of all your cores, please consider installing Firebird in classic/superclassic-mode.

0

In Firebird 5.0 it seems that setting CpuAffinityMask is no longer necessary in this case. All logical processors are used by default.

You must log in to answer this question.