What to measure
- Initial latency, or time to first frame or byte (TTFF/TTFB), measures the time from sending a request until the first frame arrives. Lower is better.
- Real-time factor (RTF) is processing time divided by stream duration. RTF must remain at or below 1 for real-time delivery. Lower is better.
- Concurrency is the number of simultaneous requests the service can handle while meeting the target. Higher is better.
rime.engine.initial_latency, and Metrics covers the other series.
Coda
For Coda,GENERATOR_MAX_BATCH and INFERENCE_CONCURRENCY_CAPACITY are the tuning controls, and their defaults work for most deployments. INFERENCE_CONCURRENCY_CAPACITY (default 128) sets the generator’s admission limit and sizes its KV cache, so raising it costs GPU memory.
On supported single-GPU EC2 hosts, the engine applies lower per-instance defaults unless overridden by environment variables:
16/16 on g5.2xlarge, g5.4xlarge, and g5.8xlarge, and 64/64 with a shared 30-second-per-request KV pool (which can return RESOURCE_EXHAUSTED under long concurrent streams) on g6e.xlarge, g6e.2xlarge, g6e.4xlarge, g6e.8xlarge, g6e.16xlarge, and g7.2xlarge, g7.4xlarge, g7.8xlarge.
Increase GENERATOR_MAX_BATCH to 128 when you serve higher traffic on GPUs whose INFERENCE_CONCURRENCY_CAPACITY supports it. A larger batch supports higher concurrency at the cost of longer container startup time. Leave the other controls at their defaults.
To get word timestamps from a Coda v2 container, set WORD_TIMESTAMPS_ENABLE=true (or 1) in the container environment. Without it, or if the forced aligner fails to load at startup, requests with timestamps.enable return audio normally with an UNAVAILABLE timestamps status.
