drones 2

Klepsydra  Performance Benchmark on VOXL Flight Pro

 

June 7, 2020

Klepsydra Performance Benchmark on VOXL Flight Pro responds to a growing need for edge devices, specially in the robotics / IoT / UAV sector that process large volumes of data on the edge, and not in the cloud. The reasons are mainly cost and the need to respond in real-time to data events.
Current software solution for edge data processing are less than able to cope with the requirements of the application and end up falling into data losses, long latency and overall unreliability of the software.
In this report, we present a high performance data processing solution that can speed up data processing substantially, while at the same time reduce CPU usage (i.e., energy consumption). All with out cloud or hardware updates.

Overview of Klepsydra Performance Benchmark on VOXL Flight Pro

This technical report contains the results of the benchmark performed for the computer Qualcomm Flight Pro. This benchmark consisted in testing increasing on-board data processing scenarios for different approaches to parallelism with and without ROS involved.
The results show that Klepsydra SDK outperform in more than 50% traditional parallel data processing techniques.

Benchmarking Framework

The benchmark application consists of serialising to JSON matrices of 500×100 double. This matrix is built out of 100 double vectors arriving via the producer-consumer pattern. Consumers are constantly listening to messages that are filling up the next matrix to be serialised. The matrix population and the serialisation process occur sequentially in the same single thread.
The software is written in C++11 and has the following configuration parameters:

  • Thread count. Number of producer threads.
  • Publishing frequency. How many messages are sent per second.

Parallel data processing approaches

Four different approaches were benchmarked for this report:

  • Synchronous producer-consumer. That means the the consumer is invoked directly by the publisher without any async queue intervening. Each consumer will race for access for the matrix and serialisation service.
  • Single thread-safe queue. In this case a single queue is filled by all publishers in a concurrent manner. One consumer is in the receiving end filling the matrix for serialisation.
  • Multiple thread-safe queues. As opposed to the previous approach, in this case each publisher fills it owns associated queue, and has an associated consumer. Each consumer will race for access for the matrix and serialisation service.
  • Event Loop. Klepsydra’s main data processing approach. In this case publishers fill concurrently the event loop memory, while a single consumer receives all the data and fill the matrix safely.

 

Figure 1. Thread safe queue and event loop diagrams

Some of these approaches need the access to the matrix to be thread-safe and some of other don’t, the following table summarises this:

Thread-safe required
Synchronous YES
Single safe queue NO
Multiple safe queue YES
Event Loop  NO

Table 1. Approaches to data processing needing thread safe code

Performance results

Left hand charts are for memory only benchmark, right hand, is for ROS.

Legend is:
Klepsydra, Sync, Multi-safe queue, Single safe queue

Request our professional trial

We offer a 90 days trial license including email support. Phone and onsite support and training can be requested.

Please fill the form below and our team will be in contact to provide access to download our products.