FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::EngineSection Struct Reference

#include <fastmm/config/config.hpp>

Public Attributes

std::string name = "fastmm"
 
int cpu = -1
 
std::vector< int > net_cpus
 
std::string spin_mode = "adaptive"
 
bool restore_position = true
 Carry the previous session's positions over from the store (venues that replay executions).
 
std::string net_backend = "epoll"
 net::Reactor backend: "epoll" | "io_uring"
 
std::string threading = "split"
 fastmm-live: "split" runs the engine and each venue's network loop on their own threads; "single" runs the one venue's network loop, the engine and order sending on the engine thread.
 
bool journal = true
 
std::string journal_dir = "runs"
 
std::string journal_sync = "async"
 "async" | "fdatasync" (core/journal.hpp)
 
std::size_t journal_max_bytes = 0
 roll over to the next part at this size (0: never)
 
int journal_retention_days = 0
 delete .fmj files older than this at start (0: keep)
 
std::string epoch_file = "runs/session_epoch"
 
std::string kill_file
 Latched kill switch and cumulative PnL; empty = "\<journal_dir\>/\<name\>.kill".
 
bool instance_lock = false
 fastmm-live: an exclusive flock(2) on lock_file (empty = "\<journal_dir\>/\<name\>.lock") taken before the session touches the account, so one process of this engine name trades at a time (live/instance_lock.hpp).
 
std::string lock_file
 
int handoff_timeout_ms = 75'000
 --takeover: how long the new process waits for the running one to release the lock after it accepted handoff, ms.
 
std::uint64_t rng_seed = 1
 
std::size_t md_ring_bytes = 4U << 20
 
std::size_t order_ring_bytes = 1U << 20
 
std::size_t journal_ring_bytes = 16U << 20
 
std::uint32_t max_events_per_step = 64
 
std::uint32_t feed_budget_per_ring = 64
 RingFeed: events per ring before the next one's turn.
 
bool net_spin_dedicated = false
 Adaptive: a network thread alone on its pinned core never blocks (net_never_blocks).
 
int crossed_grace_ms = 100
 
int ack_timeout_ms = 0
 force-cancel an order without an ack after this long; 0 = off
 
int flatten_interval_ms = 500
 Operator flatten (fastmm-ctl flatten): the sweep period, how long the engine keeps working the position off (0 = until it is flat or an operator stops it) and the default slippage.
 
int flatten_timeout_ms = 60000
 
int flatten_slippage_bps = 25
 
double queue_conservatism = 1.0
 queue position estimate (ctx.queue_ahead), 0..1
 
int latency_publish_ms = 1000
 
int tsc_recalibrate_s = 10
 fastmm-live: TSC recalibration period, 0 = never
 
std::int64_t timer_slack_ns = 0
 fastmm-live: PR_SET_TIMERSLACK of its threads, 0 = kernel's
 
bool lock_memory = false
 fastmm-live: mlockall(MCL_CURRENT | MCL_FUTURE)
 
int cpu_dma_latency_us = -1
 fastmm-live: PM QoS CPU latency request (/dev/cpu_dma_latency) held for the session, us; -1 = none.
 
int rt_priority = 0
 fastmm-live: SCHED_FIFO priority of the engine thread and of the network threads, 0 = off.
 
int net_rt_priority = 0
 
bool log_irq_affinity = false
 fastmm-live: log the NICs' interrupt CPUs against the pinned ones.
 
int min_requote_ticks = 1
 
int min_requote_interval_ms = 50
 
int min_qty_bps = 8000
 
bool post_only = true
 
bool supports_replace = true
 
int reject_backoff_ms = 1000
 QuoteManager: pause a side after a venue reject (0 = off)
 
int reject_backoff_max_ms = 60000
 doubling cap
 
int quote_token_reserve = 0
 [risk] order tokens quotes that add risk leave to others
 
std::string on_kill = "exit"
 fastmm-live after a kill switch it did not ask for (risk limit, internal failure, every venue killed): "exit" shuts down like SIGTERM and exits with code 6; "stay" keeps running with quoting off and logs an ERROR line every 10 s.
 

Member Data Documentation

◆ name

std::string fastmm::EngineSection::name = "fastmm"

◆ cpu

int fastmm::EngineSection::cpu = -1

◆ net_cpus

std::vector<int> fastmm::EngineSection::net_cpus

◆ spin_mode

std::string fastmm::EngineSection::spin_mode = "adaptive"

◆ restore_position

bool fastmm::EngineSection::restore_position = true

Carry the previous session's positions over from the store (venues that replay executions).

◆ net_backend

std::string fastmm::EngineSection::net_backend = "epoll"

net::Reactor backend: "epoll" | "io_uring"

◆ threading

std::string fastmm::EngineSection::threading = "split"

fastmm-live: "split" runs the engine and each venue's network loop on their own threads; "single" runs the one venue's network loop, the engine and order sending on the engine thread.

◆ journal

bool fastmm::EngineSection::journal = true

◆ journal_dir

std::string fastmm::EngineSection::journal_dir = "runs"

◆ journal_sync

std::string fastmm::EngineSection::journal_sync = "async"

"async" | "fdatasync" (core/journal.hpp)

◆ journal_max_bytes

std::size_t fastmm::EngineSection::journal_max_bytes = 0

roll over to the next part at this size (0: never)

◆ journal_retention_days

int fastmm::EngineSection::journal_retention_days = 0

delete .fmj files older than this at start (0: keep)

◆ epoch_file

std::string fastmm::EngineSection::epoch_file = "runs/session_epoch"

◆ kill_file

std::string fastmm::EngineSection::kill_file

Latched kill switch and cumulative PnL; empty = "\<journal_dir\>/\<name\>.kill".

◆ instance_lock

bool fastmm::EngineSection::instance_lock = false

fastmm-live: an exclusive flock(2) on lock_file (empty = "\<journal_dir\>/\<name\>.lock") taken before the session touches the account, so one process of this engine name trades at a time (live/instance_lock.hpp).

--standby and --takeover take it whatever this says.

◆ lock_file

std::string fastmm::EngineSection::lock_file

◆ handoff_timeout_ms

int fastmm::EngineSection::handoff_timeout_ms = 75'000

--takeover: how long the new process waits for the running one to release the lock after it accepted handoff, ms.

◆ rng_seed

std::uint64_t fastmm::EngineSection::rng_seed = 1

◆ md_ring_bytes

std::size_t fastmm::EngineSection::md_ring_bytes = 4U << 20

◆ order_ring_bytes

std::size_t fastmm::EngineSection::order_ring_bytes = 1U << 20

◆ journal_ring_bytes

std::size_t fastmm::EngineSection::journal_ring_bytes = 16U << 20

◆ max_events_per_step

std::uint32_t fastmm::EngineSection::max_events_per_step = 64

◆ feed_budget_per_ring

std::uint32_t fastmm::EngineSection::feed_budget_per_ring = 64

RingFeed: events per ring before the next one's turn.

◆ net_spin_dedicated

bool fastmm::EngineSection::net_spin_dedicated = false

Adaptive: a network thread alone on its pinned core never blocks (net_never_blocks).

◆ crossed_grace_ms

int fastmm::EngineSection::crossed_grace_ms = 100

◆ ack_timeout_ms

int fastmm::EngineSection::ack_timeout_ms = 0

force-cancel an order without an ack after this long; 0 = off

◆ flatten_interval_ms

int fastmm::EngineSection::flatten_interval_ms = 500

Operator flatten (fastmm-ctl flatten): the sweep period, how long the engine keeps working the position off (0 = until it is flat or an operator stops it) and the default slippage.

◆ flatten_timeout_ms

int fastmm::EngineSection::flatten_timeout_ms = 60000

◆ flatten_slippage_bps

int fastmm::EngineSection::flatten_slippage_bps = 25

◆ queue_conservatism

double fastmm::EngineSection::queue_conservatism = 1.0

queue position estimate (ctx.queue_ahead), 0..1

◆ latency_publish_ms

int fastmm::EngineSection::latency_publish_ms = 1000

◆ tsc_recalibrate_s

int fastmm::EngineSection::tsc_recalibrate_s = 10

fastmm-live: TSC recalibration period, 0 = never

◆ timer_slack_ns

std::int64_t fastmm::EngineSection::timer_slack_ns = 0

fastmm-live: PR_SET_TIMERSLACK of its threads, 0 = kernel's

◆ lock_memory

bool fastmm::EngineSection::lock_memory = false

fastmm-live: mlockall(MCL_CURRENT | MCL_FUTURE)

◆ cpu_dma_latency_us

int fastmm::EngineSection::cpu_dma_latency_us = -1

fastmm-live: PM QoS CPU latency request (/dev/cpu_dma_latency) held for the session, us; -1 = none.

◆ rt_priority

int fastmm::EngineSection::rt_priority = 0

fastmm-live: SCHED_FIFO priority of the engine thread and of the network threads, 0 = off.

◆ net_rt_priority

int fastmm::EngineSection::net_rt_priority = 0

◆ log_irq_affinity

bool fastmm::EngineSection::log_irq_affinity = false

fastmm-live: log the NICs' interrupt CPUs against the pinned ones.

◆ min_requote_ticks

int fastmm::EngineSection::min_requote_ticks = 1

◆ min_requote_interval_ms

int fastmm::EngineSection::min_requote_interval_ms = 50

◆ min_qty_bps

int fastmm::EngineSection::min_qty_bps = 8000

◆ post_only

bool fastmm::EngineSection::post_only = true

◆ supports_replace

bool fastmm::EngineSection::supports_replace = true

◆ reject_backoff_ms

int fastmm::EngineSection::reject_backoff_ms = 1000

QuoteManager: pause a side after a venue reject (0 = off)

◆ reject_backoff_max_ms

int fastmm::EngineSection::reject_backoff_max_ms = 60000

doubling cap

◆ quote_token_reserve

int fastmm::EngineSection::quote_token_reserve = 0

[risk] order tokens quotes that add risk leave to others

◆ on_kill

std::string fastmm::EngineSection::on_kill = "exit"

fastmm-live after a kill switch it did not ask for (risk limit, internal failure, every venue killed): "exit" shuts down like SIGTERM and exits with code 6; "stay" keeps running with quoting off and logs an ERROR line every 10 s.