Production profiler for continuous inference optimization
More inference per GPU
Graphsignal stays on in production and measures every layer of the inference stack, from the request queue down to the CUDA kernel. Those measurements drive an inference optimization loop in production: your agent finds what costs throughput and latency, changes the flag or code, and verifies the result.
Works with the inference stack you run
What you get
See which workloads are short of GPUs, which hold more than they use and which are misconfigured, then rebalance before buying more.
Queue, running requests and KV cache are read together on production traffic. The agent reads them from /signals and names the flag to change.
Time per kernel and CUDA graph stays on in production, for any engine or custom stack. GPU probes go further and time the phases inside your own kernels and code, and they ship with it.
Who it's for
Built for teams that run their own inference. Each asks a different question of the same production measurements.
How it works
Graphsignal sits beside the engine. Put one command in front of your launch, and a sidecar collects inference signals, metrics and profiles.
Quick start →- 1 min Live signals Wrap the launch command. Kernels, GPUs and engine metrics are live.
- 30 min Diagnosis and production findings SLO violations, bottlenecks and utilization issues, validated on your workload's production traffic.
- Next A verified fix The same metrics confirm whether the change worked.
How it's used
AI optimization →Graphsignal closes the optimization loop. The engineer sets the goal. The agent changes configuration or code, with the engineer's approval or autonomously. Graphsignal measures every change in production and feeds the next one.
-
01 Measure
Workload, engine, GPU and host on one clock, from the request down to the kernel.
-
02 Detect issues
Utilization, bottlenecks and SLO violations, sized in GPU-hours, tokens and requests.
-
03 Find Optimization
The engineer sets the goal. The agent reads the findings and changes flags, engine or GPU, with approval or autonomously.
-
04 Apply Improvement
The same metrics check the new configuration, window after window.
In practice
AI optimization →What the agent sees, and what it does with it. A real run on an SGLang server that keeps queueing requests.
Goal: find out why requests queue on this SGLang server. Reading what the profiler measured under load before changing anything.
⎻ sglang 0.5.10 · 1 GPU · 15 requests/s · --max-running-requests 8 ⎻ sglang:num_running_reqs 8 / 8 pinned for the whole window ⎻ sglang:num_queue_reqs > 0 91% of the window ⎻ sglang:queue_time_seconds 3.6 s mean wait ⎻ sglang:token_usage ≈ 0% KV cache, at its peak
Requests wait while the KV cache sits empty. Memory is not the limit: running is held at exactly 8 the whole time, so the admission cap binds. One change: raise --max-running-requests to 16, then measure again at the same load.
⎻ server up, profiler attached, reading /signals every 30 s under the same load Comparing queue time, running requests and KV cache against the first window…
Production-grade
Built to stay on in production. graphsignal-run loads a small activity library into the engine process. Analysis, statistics and the HTTP endpoint run in a separate sidecar process.
How we measure →Graph-replaying engine, GPU-bound
inside the ±0.9% run-to-run spread
+0.1%
llama.cpp server, thin host path
the per-token host path is short, so each record weighs more
+1.3%
GPU probes, a few per request or decode step
too small to measure; dense probes inside a kernel cost +3.9% to +4.8%
≈0%
Optimization examples
What the loop finds. Three patterns to look for, shown on an example fleet.
Engine
TTFT p95
--max-num-seqs 128
KV cache preemption on chat traffic
Preempted sequences were prefilled again. Fewer of them and more KV memory put TTFT inside the SLO.
Host
GPU starved, per day
tokenizer in its own process
A host thread starving the GPUs
One saturated thread left GPUs idle while requests waited. Moving tokenization off the engine thread gave the time back.
GPU
GPUs serving the model
batching retuned, 2 GPUs released
The same SLO on fewer GPUs
Surplus GPU-hours showed peak demand never needed all eight GPUs. With batching retuned, six held the SLO.
Features
Documentation →From the request queue to the kernel. Everything Graphsignal measures, and how agents and engineers use it.
Inference profiling
Time per kernel, CUDA graph, memcpy and sync via CUPTI, plus GPU telemetry and engine metrics, at +0.1% overhead on a GPU-bound engine. Kernels inside a replayed CUDA graph, and kernels on AMD ROCm, are timed with an opt-in trace mode.
GPU probes
One C++ header to instrument your code, plus a companion header for CUDA kernels. Lock-free, inert without the profiler.
Built for AI agents
One local JSON endpoint: an agent profiles, changes flags or code, and measures again.
Production feedback loop
With an API key, signals upload and agents read production back via the Signals API.
Privacy
Prompts and completions are never recorded. No profiling data leaves the host until you add an API key. The local endpoint binds to 127.0.0.1.
Security
No root or GPU profiling privileges, no code changes, no engine patch. The runner only switches on the engine's own metrics. Open source, so you can audit what runs next to your engine.
Live view
Watch your inference GPUs live. graphsignal-top shows the same signals as a terminal screen, refreshed every second.
Run it next to your engine
# run your engine under the profiler $ graphsignal-run vllm serve <model> # open the live view in a second terminal $ graphsignal-top # or watch a node on another machine $ graphsignal-top --host gpu-box
Each GPU's utilization, memory, power and throttling; the engine's queue, KV cache, throughput and latency; and kernels ranked by GPU time.
Read more →
What is covered
All integrations →Every workload on the GPU is measured. How deep depends on what serves it.
| Capability | vLLM, SGLang | Speech, OCR, Embeddings | Custom Runtime |
|---|---|---|---|
| GPU busy and idle time, kernel time, telemetry | |||
| Errors and crashes, XID, ECC, NVLink | |||
| Tags per team and workload | |||
| Request metrics: queue, KV cache, TTFT | From its own /metrics | From its /metrics | |
| Engine health and downtime | Not yet | Not yet | |
| Effective configuration and recommendations | Not available | Not available |
Get started
See what your GPUs are doing. Install the open-source profiler and wrap your engine's launch command.
Works with vLLM, SGLang, TensorRT-LLM and any CUDA process.
$ uv tool install 'graphsignal[cu12]' $ graphsignal-run vllm serve <model>
- No code changes
- No root access needed
- No profiling data leaves the host until you add an API key
From the blog
All articles →Read more about inference optimization. How engines, kernels and GPUs behave in production.
The Production Inference Optimization Loop
A method for optimizing LLM inference on live traffic: set an objective and an SLO, measure utilization, attribute latency and throughput to their causes, change one thing, and verify it on production traffic.
Read article →graphsignal-top: a live view of your inference GPUs
The open-source Graphsignal profiler serves everything it measures as JSON for agents. graphsignal-top is the same data as a live terminal screen: GPU telemetry, engine throughput and latency, and kernels ranked by time, locally or over the network.
Read article →Graphsignal vs. torch.profiler and nsys
torch.profiler and nsys already give you per-kernel GPU time, so what does Graphsignal add? Comparable JSON snapshots, telemetry in the same document, GPU probes, overhead low enough to run in production, and a runner that wraps any engine.
Read article →