/ihft

Yet another HFT framework

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

IHFT

BSD 3 License

Life is too short for malloc.

IHFT is microframework & laboratory for low latency applications.

Current building status matrix

Configuration Static Runtime Shared Runtime ASAN+UBSAN TSAN
Linux(GCC) Build Status Build Status Build Status Build Status
Linux(Clang) Build Status Build Status Build Status Build Status
MacOS(Clang) - Build Status Build Status Build Status

Goals

  • platform module
    • set cpu for current thread
    • set name for current thread
    • lock memory pages
    • status for isolcpus, nohz_full, rcu_nocbs
    • hyper-threading detector
    • cpu frequency scaling detector
    • swap detector
    • transparent huge pages detector
    • huge page system detector
    • core to core latency example
    • platform sysjitter example
  • channel module
    • one 2 one stream pod data queue
    • one 2 one stream moveable object queue
    • one 2 many stream pod data queue
    • one 2 many stream moveable object queue
    • one 2 each stream pod data queue
    • one 2 each stream moveable object queue
    • batch reader for all moveable object queues
    • python latency analysis tool
    • C++20 concepts
    • documentation with latency histograms
  • memory module
    • arena allocator
    • stream fixed pool allocator
    • page allocator for 4KB pages
    • huge page allocator for 2MB & 1GB pages
  • types module
    • box: placed object ownership
    • function_ref: non-owning reference to a callable
    • result: function output or error
  • misc module
    • simple human-readable TOML config system
    • sigaction based signal handler
  • logger module
    • compile-time formatting pattern check
    • smart serializer for input arguments
    • simple client usage
    • non reliable delivery
    • wait-free implementation
    • std::format as formatting backend
    • std::source_location as logging info
    • documentation with pictures
  • network module
    • multicast demo
    • udp demo
    • DPDK demo
  • engine module
    • logical cpu
    • task assignment
    • configuration verification
    • intelligent component loading
  • CI
    • github workflows CI
    • static binary
    • Clang support with libc++
    • GCC support with libstdc++
    • Catch2 unit tests
    • address sanitizer
    • thread sanitizer
    • ub sanitizer
    • clang format
    • benchmarking for different CPUs/compilers
  • DevOps
    • script for system latency optimization

Docs

Analytics

Channel

Compiler

Constant

Engine

Memory

Misc

Platform

Types

Dev Links

C++ reference

Compiler Explorer

Compiler Flags and Options

Intel Intrinsics Guide

Agner Fog’s instruction tables

WikiChip CPU information

Intel hardware information

AMD hardware information

TOML config file format

TCP/IP stack recommendations

DevOps Links

Osnoise tracer

Disable cpu frecuency scaling

Eric Rigtorp Low Latency Tuning

Red Hat Enterprise Linux-7 Low Latency Tuning

Red Hat Enterprise Linux-7 Performance Tuning Guide

People

Erik Rigtorp personal blog

Martin Thompson mechanical sympathy