Balluff - BVS CA-GT Technical Documentation
Use Cases
Note
The best effect with any of the use cases described in this section will be achieved when removing all work caused by the application from the CPU cores used for processing network data. This can be done using various platform specific functions. As a hint for further reading please refer to the function SetProcessAffinityMask for Windows or sched_setaffinity for Linux based systems. Unfortunately there is no platform agnostic way to achieve this. The driver specific setup for this use case would be Bind Network Data Processing Of A Single Camera To A Dedicated Core.

Distribute Network Data Processing Of A Single Camera To Multiple CPU Cores

This probably is the easiest way to make use of the Balluff Multi-Core Acquisition Optimizer: For example assume a device that transfers Bayer raw data at a high data rate. Without the Balluff Multi-Core Acquisition Optimizer the raw network data will be processed by a single, arbitrary CPU core on the host system. If a de-Bayer algorithm runs in parallel on every core in the same system to generate color images out of that data stream, then data might get lost as soon as the core doing de-Bayering AND network data processing gets overloaded, even if the other CPU cores still have resources available.

Setting up the Balluff Multi-Core Acquisition Optimizer in a way that distributes the load caused by the network traffic processing equally among multiple CPU cores can then improve the stability as well as the overall data throughput of the application.

To achieve this:

  1. Enable mvMultiCoreAcquisitionEnable
  2. Set mvMultiCoreAcquisitionCoreCount to the desired number of CPU cores
  3. Optional: Set mvMultiCoreAcquisitionFirstCoreIndex to the desired value
  4. Optional: Set mvMultiCoreAcquisitionCoreSwitchInterval to a different, more suitable value if necessary

If possible Bind Network Data Processing Of A Single Camera To A Dedicated Core should be used instead of this operation mode since it runs more reliable and with less overhead.

Bind Network Data Processing Of A Single Camera To A Dedicated Core

This is an optimized version of Distribute Network Data Processing Of A Single Camera To Multiple CPU Cores. It should be used in favor of using Distribute Network Data Processing Of A Single Camera To Multiple CPU Cores but requires that the process later doing the de-Bayering or any other number crunching can be configured accordingly by setting the processor affinity as described earlier.

This allows to fully decouple data reception and processing and in addition to that the CPU core switches while processing the incoming data are not needed thus the overhead otherwise introduced can be avoided while keeping the benefits of decoupling application and data reception and improved stability.

To achieve this:

  1. Enable mvMultiCoreAcquisitionEnable
  2. Set mvMultiCoreAcquisitionCoreCount to 1
  3. Set mvMultiCoreAcquisitionFirstCoreIndex to a value that results in the desired CPU core being utilized. Keep the potential effect of the RSS Base Processor in mind.

Bind Network Data Processing Of Multiple Cameras To Dedicated Cores

This is an advanced version of any of the 2 scenarios described above! In any case the CPU core assignment should be done in a way that each camera gets exclusive access to a certain core, so 2 cameras should never operate on the same core! If the applications processor affinity can not be modified then e.g. when working with 2 cameras the lower half of cores should be assigned to one camera and the upper half of cores to the other camera.

Better overall performance again can be achieved when exclusively reserving as many cores per camera as needed for reliable data capture and by assigning the remaining cores to the application. For 1 GBit/s devices it may even turn out to be beneficial to bind ALL cameras to a single CPU while running the application on the remaining CPUs (if all cameras are connected to the same NIC, probably a 10 GBit/s one).

The setup is the same as for this use case is obviously the same as for Bind Network Data Processing Of A Single Camera To A Dedicated Core (for the 2nd use case) but with the mvMultiCoreAcquisitionFirstCoreIndex value being different for each camera.