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:
- dedicated threads for session processing
- threads pool dedicated to messages processing that is sharable between all sessions
- auxiliary antenna threads
- Note: uncontrollable threads, e.g some timers
...
Decimal
Code Block WorkerCpuAffinity = 31
The setting above exposes cores #0,1,2,3,4
(see Backward compatibility)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
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 name | FIX Antenna thread name | Description | |||
---|---|---|---|---|---|
1 | FA: Timer | Timer | Several timer threads which can be used for:
| ||
2 | FA: Worker_0 ... FA: Worker_N | Worker_0 | Several threads. Session processing (receive/send) threads from thread pool used by EVEN and DIRECT_SEND modes and configuring by NumberOfWorkers parameter | ||
3 | FA: Dispacher | Dispacher | Thread The thread that is listening and handling incoming and outgoing connections. | ||
4 | FA: Runner | Runner | API class for user-defined tasks(name and affinity could be changed by a user). | ||
5 | FA: AbsolutTime | AbsolutTimer | Public timer scheduling tasks. | ||
56 | FA: ExlusiveRec | ExlusiveReceiveTaskDedicatedWorker | A dedicated thread for receiving in aggressive mode. | ||
67 | FA: NewInLinkTa | NewInLinkTask | Thread The thread that accepts a new connection. | ||
78 | FA: ExlusiveSen | ExlusiveSendTaskDedicatedWorker | A dedicated thread to send in the aggressive mode if sending try in the current thread has failed. | ||
89 | FA: AsyncConnec | AsyncConnectTask | Asynchronous connection to the initiator. | ||
910 | FA: DBLDispache | DBLDispacher | Thread The thread that is listening and handling incoming and outgoing connections for Myricom DBL network cards. | ||
10 | <Unnamed threads> | Some internal utility threads.11 | FA: Log4cpp_TCPAppender | Log4cpp_TCPAppender | TCP logging thread (TCPAppender for log4cpp)TCP appender for Log4Cplus logger). |
12 | FA: ServiceStatusReporter | ServiceStatusReporter | Replication client's service thread which starts when required to report service status to the OS and stops immediately after that. | ||
13 | FA: MsgSender | MsgSender | API and testing class(name and affinity could be changed by a user). | ||
14 | FA: DBLIncomingStream | DBLIncomingStream | DBL incoming data thread. | ||
15 | FA: DBLOutgoingStream | DBLOutgoingStream | DBL outgoing data thread. | ||
16 | FA: DBLCleanup | DBLCleanup | DBL service thread. |
Using the top for viewing thread names
...