libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits Struct Reference

From the detected NUMA layout, assign cores to the logical threads in the FIX-to-exchange translator. More...

#include <thread_traits.hpp>

Classes

struct  thread_info
 

Public Types

using api_threading_traits = ppd::api_threading_traits< ppd::platform_api, ppd::heavyweight_threading >
 
using api_threading_traits = libjmmcg::ppd::api_threading_traits< libjmmcg::ppd::platform_api, libjmmcg::ppd::heavyweight_threading >
 
using api_threading_traits = ppd::api_threading_traits< ppd::platform_api, ppd::heavyweight_threading >
 

Static Public Attributes

static constexpr auto exchange_simulator_thread
 
static constexpr auto numa_index =(libjmmcg::ppd::numa_cpu_traits::is_numa ? libjmmcg::ppd::numa_cpu_traits::node_mapping.max_size()-1 : 0)
 The numa-node upon which the code is compiled to run optimally. More...
 
static constexpr auto max_threads_on_node =libjmmcg::ppd::numa_cpu_traits::node_mapping[numa_index].max_size()
 
static constexpr auto main_thread
 
static constexpr auto heartbeat_thread
 
static constexpr auto exchange_to_client_thread
 
static constexpr auto client_to_exchange_thread
 

Detailed Description

From the detected NUMA layout, assign cores to the logical threads in the FIX-to-exchange translator.

Definition at line 36 of file socket_server.cpp.

Member Typedef Documentation

◆ api_threading_traits [1/3]

using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::api_threading_traits = ppd::api_threading_traits<ppd::platform_api, ppd::heavyweight_threading>

Definition at line 37 of file socket_server.cpp.

◆ api_threading_traits [2/3]

using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::api_threading_traits = ppd::api_threading_traits<ppd::platform_api, ppd::heavyweight_threading>

Definition at line 37 of file socket_server.cpp.

◆ api_threading_traits [3/3]

using isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::api_threading_traits = libjmmcg::ppd::api_threading_traits<libjmmcg::ppd::platform_api, libjmmcg::ppd::heavyweight_threading>

Definition at line 30 of file thread_traits.hpp.

Member Data Documentation

◆ client_to_exchange_thread

constexpr auto isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::client_to_exchange_thread
inlinestaticconstexpr
Initial value:
=thread_info{
libjmmcg::ppd::numa_cpu_traits::node_mapping[numa_index][2%max_threads_on_node],
api_threading_traits::api_params_type::priority_type::time_critical
}
static constexpr auto numa_index
The numa-node upon which the code is compiled to run optimally.

Definition at line 62 of file thread_traits.hpp.

Referenced by BOOST_AUTO_TEST_CASE_TEMPLATE(), and main().

◆ exchange_simulator_thread

static constexpr auto isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::exchange_simulator_thread
inlinestaticconstexpr
Initial value:
=thread_info{
0,
api_threading_traits::api_params_type::priority_type::normal
}

Definition at line 43 of file socket_server.cpp.

Referenced by BOOST_AUTO_TEST_CASE_TEMPLATE(), and jmmcg::LIBJMMCG_VER_NAMESPACE::socket::svr< ProcessingRules, SvrMgr >::main().

◆ exchange_to_client_thread

constexpr auto isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::exchange_to_client_thread
inlinestaticconstexpr
Initial value:
=thread_info{
libjmmcg::ppd::numa_cpu_traits::node_mapping[numa_index][1%max_threads_on_node],
api_threading_traits::api_params_type::priority_type::normal
}

Definition at line 58 of file thread_traits.hpp.

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::common::exchange_to_client_processor< ClientCxnPtr, EchgCxn >::exchange_to_client_processor().

◆ heartbeat_thread

constexpr auto isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::heartbeat_thread
inlinestaticconstexpr
Initial value:
=thread_info{
libjmmcg::ppd::numa_cpu_traits::node_mapping[numa_index][0%max_threads_on_node],
api_threading_traits::api_params_type::priority_type::idle
}

Definition at line 54 of file thread_traits.hpp.

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::common::server_hb_t< MsgT, MissedHbs, HbInterval >::server_hb_t().

◆ main_thread

constexpr auto isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::main_thread
inlinestaticconstexpr
Initial value:
=thread_info{
libjmmcg::ppd::numa_cpu_traits::node_mapping[0][0%max_threads_on_node],
api_threading_traits::api_params_type::priority_type::idle
}

Put this well out of the way of anything important.

Definition at line 50 of file thread_traits.hpp.

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::fix_to_link::main().

◆ max_threads_on_node

constexpr auto isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::max_threads_on_node =libjmmcg::ppd::numa_cpu_traits::node_mapping[numa_index].max_size()
inlinestaticconstexpr

Definition at line 45 of file thread_traits.hpp.

◆ numa_index

constexpr auto isimud::ISIMUD_VER_NAMESPACE::exchanges::common::thread_traits::numa_index =(libjmmcg::ppd::numa_cpu_traits::is_numa ? libjmmcg::ppd::numa_cpu_traits::node_mapping.max_size()-1 : 0)
inlinestaticconstexpr

The numa-node upon which the code is compiled to run optimally.

This value should be the same as that used by numactl in the start-script (e.g. "start_all_links.sh"), otherwise the code will run on the wrong processor. (One can determine which node the code has been compiled for by running the executable with the "--help" option.)

See also
NUMA_INDEX

Definition at line 44 of file thread_traits.hpp.

Referenced by isimud::ISIMUD_VER_NAMESPACE::exchanges::create_program_options().


The documentation for this struct was generated from the following files: