agentleFS
voyager67voyager67/JaneStreet-Agentic-Skills/skills/low-latency-performance/SKILL.md

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.

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
  1. Distinctive:

    Instrument the pipeline: Use monotonic clocks for durations and hardware/software packet timestamps where available.

    line 14
  2. Distinctive:

    Retest correctness under speed: Verify event ordering, packet loss, backpressure, recovery, memory safety, race behavior, and overload …

    line 17
  3. Distinctive:

    Do not report only mean or best-case latency.

    line 23
  4. Distinctive:

    Do not mix user-space, kernel, NIC, exchange, and remote timestamps without calibration.

    line 24
  5. Distinctive:

    Do not sacrifice deterministic ordering, risk checks, or recovery for a benchmark gain.

    line 26
  6. Distinctive:

    Never claim a nanosecond-level improvement from a clock or measurement system whose precision/error is larger than the claimed change.

    line 27

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.