ihft
ihft copied to clipboard
Yet another HFT framework
IHFT
Life is too short for malloc.
IHFT is microframework & laboratory for low latency applications.
System requirements
The IHFT framework requires:
- modern C++ compiler with -std=20 support (clang16+, gcc11+)
- cmake build system generator
- ninja build command line utility
- modern computer with linux x64 system
- dev compilation on macos x64|arm64 is also available
Current building status matrix
| Configuration | Static Runtime | Shared Runtime | ASAN+UBSAN | TSAN |
|---|---|---|---|---|
| Linux(GCC11) | ||||
| Linux(Clang18) | ||||
| MacOS(Clang15) | - |
Goals
- [x] platform module
- [x] set cpu for current thread
- [x] set name for current thread
- [x] lock memory pages
- [x] status for isolcpus, nohz_full, rcu_nocbs
- [x] hyper-threading detector
- [x] cpu frequency scaling detector
- [x] swap detector
- [x] transparent huge pages detector
- [x] huge page system detector
- [x] core to core latency example
- [x] platform sysjitter example
- [x] channel module
- [x] one 2 one stream pod data queue
- [x] one 2 one stream moveable object queue
- [ ] one 2 many stream pod data queue
- [ ] one 2 many stream moveable object queue
- [x] one 2 each stream pod data queue
- [x] one 2 each stream moveable object queue
- [ ] batch reader for all moveable object queues
- [x] python latency analysis tool
- [x] C++20 concepts
- [x] documentation with latency histograms
- [x] memory module
- [x] arena allocator
- [x] stream fixed pool allocator
- [x] page allocator for 4KB pages
- [x] huge page allocator for 2MB & 1GB pages
- [x] timer module
- [x] native cpu_counter
- [x] native cpu_pause
- [x] types module
- [x] box: placed object ownership
- [x] function_ref: non-owning reference to a callable
- [x] result: function output or error
- [x] misc module
- [x] simple human-readable TOML config system
- [x] sigaction based signal handler
- [x] logger module
- [x] simple client usage
- [x] non reliable delivery
- [x] smart serializer for input arguments
- [x] compile-time formatting pattern check
- [x] wait-free implementation
- [x] log pount source file and thread info
- [ ] std::format as formatting backend
- [x] std::source_location as log point source
- [ ] documentation with pictures
- [ ] network module
- [x] udp demo
- [x] multicast demo
- [ ] Solarflare demo
- [ ] Mellanox demo
- [ ] DPDK demo
- [x] engine module
- [x] logical cpu
- [x] task assignment
- [x] configuration verification
- [x] intelligent component loading
- [x] documentation with pictures
- [x] CI
- [x] github workflows CI
- [x] static binary
- [x] Clang support with libc++
- [x] GCC support with libstdc++
- [x] Catch2 unit tests
- [x] address sanitizer
- [x] thread sanitizer
- [x] ub sanitizer
- [ ] clang format
- [x] DevOps
- [x] script for system latency optimization
Docs
Analytics
Channel
Compiler
Constant
Engine
Memory
Misc
Platform
Types
Dev Links
Agner Fog’s instruction tables
LLVM Machine Instruction Benchmark
OpenOnload is a user-level network stack
DPDK Accelerating Network Performance
DevOps Links
Eric Rigtorp Low Latency Tuning
Red Hat Enterprise Linux-7 Low Latency Tuning
Red Hat Enterprise Linux-7 Performance Tuning Guide