Open topic with navigation

# Optimize Analysis Performance with Parallel Processing

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

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

- Some analysis operations are resource-intensive and cannot process video frames as quickly as they are ingested. To process a video in real time, HPE Media Server might need to skip frames. Allowing HPE Media Server to use more than one thread means that it can process more frames and this can increase accuracy.
- If you have configured Media Server to process a video file without skipping frames, allowing HPE Media Server to use more threads means that the media is processed in less time.

HPE Media Server can use multiple threads for performing:

- face detection.
- face recognition.
- face demographics analysis.
- face expression analysis.
- clothing analysis.
- optical character recognition.
- object detection.
- object recognition.
- number plate recognition.
- image classification.

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:

    [FaceDetect]
    Type=FaceDetect
    Database=Faces
    NumParallel=2

    [NumberPlate]
    Type=NumberPlate
    Location=UK
    NumParallel=2

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

- Face detection, with `NumParallel=2` (so face detection will use two threads).
- Face recognition to recognize known faces (one thread).
- Object recognition to detect corporate logos, with `NumParallel=2` (two threads).
- Speech-to-text (one thread)
- Optical character recognition with `NumParallel=1` (one thread).
- An encoding task to write the video to disk or a rolling buffer (one thread).

This demonstrates that a single `process` action can easily consume many threads (at least eight in the previous example). If you have configured HPE 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 HPE 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 HPE Media Server up to this limit will increase throughput. For example if your server has 20 CPU cores then allowing HPE 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.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send Documentation Feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm