hmbdc
simplify-high-performance-messaging-programming
DefaultUserConfig.hpp
1 #include "hmbdc/Copyright.hpp"
2 #pragma once
3 
4 namespace hmbdc { namespace app { namespace udpcast {
5 /**
6  * the send and recv engine config parameters and its default values used in this module
7  * each module comes with a performance tool (perf-xxxx) that the user could experiment each of the
8  * following settings on a hardware environment
9  */
10 char const* const DefaultUserConfig = R"|(
11 {
12  "ifaceAddr" : "0.0.0.0/0", "__ifaceAddr" :"ip address for the NIC interface for IO, 0.0.0.0/0 pointing to the first intereface that is not a loopback (127.0.0.1)",
13  "mtu" : 1500, "__mtu" :"mtu, check ifconfig output for this value for each NIC in use",
14  "schedPolicy" : "SCHED_OTHER", "__schedPolicy" :"engine thread schedule policy - check man page for allowed values",
15  "schedPriority" : 0, "__schedPriority" :"engine thread schedule priority - check man page for allowed values",
16  "tx" :
17  {
18  "hmbdcName" : "udpcast-tx", "__hmbdcName" :"engine thread name",
19  "loopback" : false, "__loopback" :"should the message be visible in local machine. not effective when using loopback interface.",
20  "maxSendBatch" : 60, "__maxSendBatch" :"up to how many messages to send in a batch (within one udp packet)",
21  "udpcastDests" : "232.43.211.234:4321", "__udpcastDests" :"list UDP address port pairs all udpcast traffic go to (each of them), for example [\"127.0.0.1:3241 192.168.0.1:3241\" - can be a mix of multicast addresses and unicast addresses",
22  "outBufferSizePower2" : 0, "__outBufferSizePower2" :"2^outBufferSizePower2 is the number of message that can be buffered in the engine, default 0 means automatically calculated based on 8KB as the low bound",
23  "sendBytesBurst" : 0, "__sendBytesBurst" :"rate control for how many bytes can be sent in a burst, us the OS buffer size (131071) as reference, 0 means no rate control",
24  "sendBytesPerSec" : 100000000, "__sendBytesPerSec" :"rate control for how many bytes per second - it is turned off by sendBytesBurst==0",
25  "topicRegex" : ".*", "__topicRegex" :"the topic regex pattern this send engine covers, there shall NOT be an overlap of this pattern between differt send engines in the NetContext, otherwise the first engine is used",
26  "ttl" : 1, "__ttl" :"the switch hop number",
27  "udpSendBufferBytes" : 0, "__udpSendBufferBytes" :"OS buffer byte size for outgoing udp, 0 means OS default value"
28  },
29  "rx" :
30  {
31  "hmbdcName" : "udpcast-rx", "__hmbdcName" :"engine thread name",
32  "cmdBufferSizePower2" : 10, "__cmdBufferSizePower2" :"2^cmdBufferSizePower2 is the engine command buffer size - rarely need to change",
33  "udpcastListenAddr" : "232.43.211.234", "__udpcastListenAdd" :"the receive engine listen to this address for messages - it can be set to ifaceAddr to listen to unicast UDP messages instead of a multicast address",
34  "udpcastListenPort" : 4321, "__udpcastListenPort" :"the receive engine listen to this UDP port for messages",
35  "udpRecvBufferBytes" : 0, "__udpRecvBufferBytes" :"OS buffer byte size for incoming udp, 0 means OS default value"
36  }
37 }
38 )|";
39 }}}
char const *const DefaultUserConfig
Definition: DefaultUserConfig.hpp:10
Definition: Base.hpp:12