Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

CPU_AFFINITY

CPU_AFFINITY <cpu list>

Windows

On Windows and Linux systems, CPU_AFFINITY server keyword can be used to set the processor affinity mask for the FairCom DB process. The option accepts a comma-delimited list of processor numbers. For example: CPU_AFFINITY 0,1,2,3,8,9,10,11 indicates that FairCom DB is to be run on the eight specified CPUs.

If FairCom DB successfully sets the CPU affinity to the specified CPUs, the following message is logged to CTSTATUS.FCS, where <cpulist> is the list of CPUs specified for the CPU_AFFINITY option:

Successfully set CPU affinity to: <cpulist>

The following error situations can occur when using the CPU_AFFINITY option:

If the list of CPUs specifies a CPU number that is out of range on the system, a message is logged to CTSTATUS.FCS:

Configuration error: <config_file_name>, line <line_number>: The CPU_AFFINITY option specifies an invalid CPU number for this system.

Linux

CPU license check is now supported on Linux as of V12, though the check itself currently supports only logical CPU counts.

The CPU_AFFINITY server keyword can be used to restrict the server process to a set of CPU IDs (as has existed for Windows since V8). CPU_AFFINITY is limited to a maximum CPU ID range of 0-31. If you need binding to larger CPU ID numbers, you must use system tools to do so.

Solaris

On Solaris systems, CPU_AFFINITY accepts a single numeric value, which is interpreted as a processor set number. For example, CPU_AFFINITY 2 configures FairCom DB to run on processor set 2.

Note: To use CPU_AFFINITY under Solaris you need to run the FairCom DB Server with root permission. This because Solaris requires any process using a processor set to have such permission.

To create a processor set on Solaris, use the Solaris command psrset. For example, to create a set comprising processors 4 through 7, use:

psrset -c 4-7

where:

  • -c - Create processor set.
  • 4-7 - The processor numbers included in the set.

The ID of the newly created processor set is returned:

created processor set ps_id

To bind a process to this processor set, use:

psrset -b ps_id pid

where:

  • -b - Bind.
  • ps_id - The ID returned by the command when the processor set was created.
  • pid - The ID of the process to be bound to the processor set.

If the process does not have permission to assign itself to the specified processor set (or if an invalid processor set is specified), FairCom DB logs the following message to CTSTATUS.FCS, where <configuration_file_name> is the name of the FairCom DB configuration file, <line_number> is the line number on which the CPU_AFFINITY option was specified, and <error_code> is the system error code returned by the OS.

Configuration error: <configuration_file_name>, line <line_number>: Failed to set CPU affinity: system error code <error_code>.

TOCIndex