low-latency-performance
Skill13 starsChanged 5 days agoApache-2.0View on GitHub
Profile and improve latency-sensitive trading software, market-data handlers, order gateways, and event loops. Use for HFT performance investigations involving tail latency, jitter, CPU scheduling, memory allocation, networking, and benchmark design; not for unmeasured micro-optimization.
In this repository19 other files it gives its agents.
- agent-based-market-simulationSkill
- code-understandingSkill
- etf-arbitrageSkill
- exchange-gateway-engineeringSkill
- execution-analysisSkill
- hft-market-replaySkill
- interview-simulatorSkill
- lob-microstructureSkill
- market-makingSkill
- mathematical-reasoningSkill
- order-book-reconstructionSkill
- pre-trade-risk-controlsSkill
- production-trading-operationsSkill
- quant-research-validationSkill
- queue-position-modelingSkill
- research-paper-tutorSkill
- socratic-tutorSkill
- tick-data-engineeringSkill
- volatility-market-makingSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Instrument the pipeline: Use monotonic clocks for durations and hardware/software packet timestamps where available.
- Distinctive: line 17
Retest correctness under speed: Verify event ordering, packet loss, backpressure, recovery, memory safety, race behavior, and overload …
- Distinctive: line 23
Do not report only mean or best-case latency.
- Distinctive: line 24
Do not mix user-space, kernel, NIC, exchange, and remote timestamps without calibration.
- Distinctive: line 26
Do not sacrifice deterministic ordering, risk checks, or recovery for a benchmark gain.
- Distinctive: line 27
Never claim a nanosecond-level improvement from a clock or measurement system whose precision/error is larger than the claimed change.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Low-Latency Systems Engineering
Act as a performance engineer for latency-sensitive event-processing systems. Optimize measured end-to-end behavior and tail risk, not a single microbenchmark or a vanity average.
Workflow
- Define the path and SLA. Name the start/end events (for example NIC receive timestamp to strategy decision, or decision to NIC transmit). Specify clock domain, units, sample window, workload, and operational target. Separate feed, compute, queueing, serialization, kernel, NIC, and venue components where observable.
- Build a baseline distribution. Measure p50, p90, p99, p99.9, max, sample count, throughput, drops, and jitter under representative and stressed load. Preserve raw histograms or samples; averages hide tail behavior.
- Control the experiment. Pin versions, hardware, firmware, kernel, CPU frequency policy, NIC, NUMA placement, interrupt affinity, traffic shape, and thermal conditions. Repeat runs and report confidence/variability.
- Instrument the pipeline. Use monotonic clocks for durations and hardware/software packet timestamps where available. Document timestamp points and clock synchronization. Do not subtract timestamps from unsynchronized clocks.
- Profile before changing code. Identify CPU hot paths, cache misses, allocation/GC, lock contention, scheduler delay, packet loss, batching, syscalls, and queue buildup. Use appropriate tools (
perf, flamegraphs, tracing, NIC counters, hardware counters) for the platform. - Change one variable at a time. Candidate work includes data layout, allocation reduction, cache locality, lock-free/single-writer patterns, batching trade-offs, CPU/NUMA affinity, kernel bypass, polling, huge pages, and NIC offloads. Do not adopt complexity without measured end-to-end benefit.
- Retest correctness under speed. Verify event ordering, packet loss, backpressure, recovery, memory safety, race behavior, and overload behavior. A faster parser that silently drops events is a regression.
- Run the full matrix. Compare idle/normal/burst load, warm/cold cache, single/multi-symbol, and failover conditions. Confirm improvements persist outside the benchmark microcase.
- Record a performance change log. Include baseline, change, environment, distributions, throughput/drop impact, trade-offs, rollback, and reproducible commands.
Guardrails
- Do not report only mean or best-case latency.
- Do not mix user-space, kernel, NIC, exchange, and remote timestamps without calibration.
- CPU isolation, busy polling, kernel bypass, and FPGA/NIC features have operational costs; justify them with a bottleneck measurement.
- Do not sacrifice deterministic ordering, risk checks, or recovery for a benchmark gain.
- Never claim a nanosecond-level improvement from a clock or measurement system whose precision/error is larger than the claimed change.
Deliverable
Provide a latency budget, measurement semantics, baseline and post-change distributions, bottleneck evidence, correctness results, environment record, and deployment/rollback recommendation.
Further reading
- Linux kernel CPU isolation: https://docs.kernel.org/admin-guide/cpu-isolation.html
- Linux kernel network timestamping: https://docs.kernel.org/networking/timestamping.html
- Linux
perf sched: https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/perf-sched.txt - DPDK documentation: https://doc.dpdk.org/guides/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

