The recommendations below apply to text de-identification (e.g., the
process/text route). Audio de-identification does not benefit from higher concurrency — see Audio.CPU
For Neural Network inference workloads, CPUs don’t require inputs to be batched together to achieve good hardware utilization. In practice, due to network overhead and pre/post-processing code it is best to use a low level of concurrency such as 1 per container instance.GPU
Unlike CPUs, GPUs require inputs to be batched together and processed as a single large input to achieve optimal hardware utilization. This means that there is a tradeoff between latency and throughput. A concurrency level of 32 per container instance is a good tradeoff between latency and throughput, however 16 is the recommended number of concurrent connections to optimize for latency.Audio
Audio requests are processed in a fixed sequence — speech-to-text transcription, de-identification of the transcript, and bleeping or distorting the result — and the transcription step is by far the dominant cost. Transcription is served by a single model instance per container, so audio requests are effectively processed one at a time, on both CPU and GPU. This means that raising client concurrency will not increase audio throughput.- For audio, start at a concurrency of 1 per container instance and measure.
- To increase audio throughput, scale horizontally by adding container instances rather than by raising concurrency.
- In a mixed text + audio deployment on a single GPU container, keep audio concurrency low (1–2) and reserve the 16–32 concurrency range for the text path. Since the transcription step is serialized per instance, an extra in-flight audio request simply waits in its queue — a concurrency of 2 can still let the de-identification and post-processing stages of one request overlap with the transcription of another, while anything higher only adds queuing without a throughput gain.