--- title: "Benchmark and Profiling" metatags: description: "SGLang benchmarking and profiling: PyTorch Profiler, Nsight Systems, layerwise NVTX, PD disaggregation profiling." --- ## Benchmark SGLang provides four benchmark tools that operate at different levels of the stack. The table below summarizes their key differences:
| Tool | HTTP Server | Scheduler | Use Case |
|---|---|---|---|
bench_serving |
Yes (async HTTP client to a running server) | Yes (indirectly, via server) | Realistic online serving benchmarks with latency metrics (TTFT, TPOT, ITL) |
bench_one_batch_server |
Yes (sends HTTP requests to a running server) | Yes (indirectly, via server) | End-to-end single-batch latency including HTTP and scheduler overhead |
bench_offline_throughput |
No | Yes (directly uses Engine in-process) |
Maximum throughput measurement without HTTP overhead |
bench_one_batch |
No | No (directly calls ModelRunner) |
Kernel-level latency profiling of a single static batch |