Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Affinity mask settings

The Antenna allows users to change affinity masks for threads with different purposes. This allows the application to run functionality on a critical path at dedicated threads/CPU cores. It results in response time spreading reduction and helps to keep it minimal.

FIX Antenna C++  supports supports affinity masks for up  to to 64 cores on Windows due to system limitations, and up to 256 cores on Linux.

FIX Antenna C++ threads:

...

  1. Decimal

    Code Block
    WorkerCpuAffinity = 31

    The setting above exposes cores #0,1,2,3,4
    (see Backward compatibility)

  2. Hexadecimal 

    Info

    Introduced in FA C++ 2.27.1


    Code Block
    WorkerCpuAffinity = 0x1F3A 

    The setting above exposes cores #1,3,4,5,8,9,10,11,12

  3. Cores-set format (like Linux' taskset command)

    Info

    Introduced in FA C++ 2.27.1


    Code Block
    # core numbers: integer values of set [0..63]
    Session.Default.RecvCpuAffinity = 2-4
    
    # separator character: ','
    HelperCpuAffinity = 1,4
    
    # grouping characters: '{' '}'
    WorkerCpuAffinity = {0}

    The settings above expose cores respectively #2,3,4;  #1,4; #0;

    Info

    NOTE: To avoid erroneous reading with the cores-set format, use a grouping of characters in case of single-core in the mask:

    WorkerCpuAffinity = 31 - it means cores #0,1,2,3,4

    WorkerCpuAffinity ={31} - it means core #31


...


Linux thread nameFIX Antenna thread nameDescription
1FA: TimerTimer

Several timer threads which can be used for:

  • Internal scheduling events.  Stop, Start, Reconnect a session
  • Scheduling for delayed message delivery. (non-public functionality).
  • Scheduled backup logs (non-public functionality).
  • Some internal health checks (non-public functionality).
  • Timer for connection timeout checks (non-public functionality).
  • Public health checks like control of used memory for windows.
  • Heartbeats, other session-related timer events.
2FA: Worker_0
...
FA: Worker_N

Worker_0
...
Worker_N

Several threads.

Session processing (receive/send) threads from thread pool used by EVEN and DIRECT_SEND modes and configuring by NumberOfWorkers parameter

3FA: DispacherDispacher

Thread The thread that is listening and handling incoming and outgoing connections.
Performs protection from abnormal behavior (DDOS protection)

4FA: RunnerRunnerAPI class for user-defined tasks(name and affinity could be changed by a user).
5FA: AbsolutTimeAbsolutTimerPublic timer scheduling tasks.
56FA: ExlusiveRecExlusiveReceiveTaskDedicatedWorkerA dedicated thread for receiving in aggressive mode.
67FA: NewInLinkTaNewInLinkTaskThread The thread that accepts a new connection.
78FA: ExlusiveSenExlusiveSendTaskDedicatedWorkerA dedicated thread to send in the aggressive mode if sending try in the current thread has failed.
89FA: AsyncConnecAsyncConnectTaskAsynchronous connection to the initiator.
910FA: DBLDispacheDBLDispacherThread The thread that is listening and handling incoming and outgoing connections for Myricom DBL network cards.
10<Unnamed threads>Some internal utility threads.11FA: Log4cpp_TCPAppenderLog4cpp_TCPAppenderTCP logging thread (TCPAppender for log4cpp)TCP appender for Log4Cplus logger).
12FA: ServiceStatusReporterServiceStatusReporterReplication client's service thread which starts when required to report service status to the OS and stops immediately after that.
13FA: MsgSenderMsgSenderAPI and testing class(name and affinity could be changed by a user).
14FA: DBLIncomingStreamDBLIncomingStreamDBL incoming data thread.
15FA: DBLOutgoingStreamDBLOutgoingStreamDBL outgoing data thread.
16FA: DBLCleanupDBLCleanupDBL service thread.

Using the top for viewing thread names

...