Optimize Analysis Performance with Parallel Processing

Media Server can use multiple threads to perform some analysis tasks on video. (If your source media is a single image or document, Media Server always uses one thread for each analysis task).

Using multiple threads allows Media Server to process multiple video frames simultaneously. You might want to use multiple threads for the following reasons:

Media Server can use multiple threads for performing:

To specify the number of threads that an analysis task can use, set the NumParallel configuration parameter in the task section of your configuration. For example:



If you have installed Media Server with GPU support and are configuring a task that can use the GPU, set NumParallel=1 and use the configuration parameter GPUNumParallel to specify the number of video frames to process concurrently on the GPU. For more information, see Optimize Analysis Performance with a GPU.

It is important to consider the total number of threads that Media Server will use. For example, a configuration for monitoring a television broadcast might include the following tasks:

This demonstrates that a single process action can easily consume many threads (at least eight in the previous example). If you have configured Media Server to run multiple process actions simultaneously, then the total number of threads consumed is multiplied by the number of actions that you are running. It is important to install Media Server on a server with sufficient resources.

The optimum number of threads to use for processing depends on the number of CPU cores your server has available. Increasing the number of threads used by Media Server up to this limit will increase throughput. For example if your server has 20 CPU cores then allowing Media Server to consume 16 threads rather than 8 should almost double throughput. Using more threads than the server has CPU cores may increase throughput but the improvement will be smaller for each additional thread. Using significantly more threads than the server has CPU cores is not recommended and may decrease performance.