Evaluation of Apache Edgent for Stream Analytics at the Edge

Piotr Grzesik

Silesian University of Technology



  1. IoT applications
  2. Processing at the edge
  3. Edge devices
  4. Goal of the research
  5. Related works
  6. Selected technologies, protocols and hardware
  7. Description and implementation of the system
  8. CPU and Memory consumption tests
  9. Conclusions and future work

IoT applications

  • Environmental monitoring
  • Air quality monitoring
  • Telemedicine & healthcare
  • Smart cities & smart homes
  • Agriculture, farming
  • Energy consumption monitoring
  • ...and many more

Processing at the edge

Edge computing is a computing paradigm that brings the data processing and storage closer to a place where it is needed. It allows to reduce the volume of data that needs to be send over the Internet, allows to improve reaction time to the changing state of the system and improves resilience and allows for data loss prevention where Internet connection is not reliable or not available at all most of the time.

Edge devices

Jetson Nano

Source: https://www.nvidia.com/

Raspberry Pi 4

Source: https://www.raspberrypi.org/

Beaglebone Black

Source: https://beagleboard.org/

Coral Dev Board

Source: https://coral.ai/

Goal of the research

The aim of this research is to evaluate one of the stream analytics engines, Apache Edgent, in the context of IoT-based stream processing application, running on low-cost, constrained edge device processing data from air quality sensors.

Related works

  • In the paper, Fatos Xhafa et al., describes challenges of processing IoT data streams using edge computing paradigm, highlighting use case for car data. The authors also describe real infrastructure used for the experiments, based on Raspberry Pi device and Node-Red server and come to conclusion that a single Raspberry Pi is not a suitable hardware for processing the experimental workload.

  • Eduard Renart et al. in his research proposed and evaluated an edge-based programming framework for stream processing in smart city environment. That framework detects and exploits data patterns to improve performance of stream processing performed on edge devices. For selected workflows, the proposed solution offered latency lower up to 78% and computational time required to process stream of elements was up to 56% lower.

Related works

  • Lin Yan et al. in his research describes intelligent hydrological architecture, based on edge computing paradigm. The authors propose a solution for a platform, that performs real-time data preprocessing, data analysis, data monitoring and handles data persistence. As edge devices, authors selected virtual machines with Intel (R) Core (TM) i5-7200U CPU. The authors conclude the paper with four experiments, highlighting that solution based on Apache Edgent can be used for real-time filtering of collected data and performing data analysis, which can reduce data transmission and improve efficiency of data analysis in hydrological applications.

Selected technologies, protocols and hardware

  • Apache Edgent - open-source framework, programming model and runtime aimed at implementing and supporting stream processing applications on edge devices. It supports multiple stream-based operations such as filtering, splitting stream of data into multiple separate streams, transforming streams by map functions, windowing over selected number of recent values or by time period as well as various aggregations.
  • MQTT - open-source, lightweight messaging protocol dedicated for use in machine-to-machine (M2M) communication in IoT-based systems It is designed for use in low-powered, constrained devices with unreliable, bandwidth-limited networks. This protocol uses publish-subscribe model with two actors in the system, broker and clients. Broker is responsible for receiving and transmitting messages from and to clients. Clients are connected to the broker and cannot communicate directly with each other.

Selected technologies, protocols and hardware

  • Mosquitto - open-source message broker supporting MQTT protocol. It is written in C programming language and is currently maintained by Eclipse Foundation. It is designed to be lightweight, performant and suitable to use even on low powered single board computers such as Raspberry Pi. Mosquitto project as a whole, in addition to message broker, also provides a library in C programming language for implementing MQTT clients, as well as command-line utilities, mosquitto_pub and mosquitto_sub.
  • Raspberry Pi - family of small, low-powered, low-cost, single-board computers developed by the Raspberry Pi Foundation. It was selected as an edge device for the implementation due to its popularity, community support and out of the box support for Apache Edgent. During the experiments, Raspberry Pi 4 with 4 GB of memory was used.

Testing environment

Testing environment

  • 6LoWPAN-based sensor network, collecting measurements such as air quality and weather condition metrics, sending them to a message broker

  • Edge device, that serves both as a message broker and analytical engine

  • Cloud-based service for further data processing

  • During tests, sensor readings generator was used to allow for running tests multiple times in a short span of time

Readings data model

Example reading used for the performance experiments

Data stream has a form of points sent from sensors, where each data point consists of air quality metrics in form of NO2 and dust particle size metrics – PM2.5 and PM10, in form of a JSON message. In addition, it also stores information about sensor and location.

Performance experiments

  • During tests, a separate data generator was used, running on a separate Raspberry Pi in local area network

  • Tests were conducted for the following frequencies of data generation: 5 Hz, 20 Hz, 50 Hz, 100 Hz and 500 Hz

  • For each frequency, the tests were ran for 60 seconds and average percentage load per CPU core as well as average memory consumption were recorded.

  • To measure the CPU load, the application called cpustat was used. It was configured to record CPU utilization every second while the simulation was running.

  • Memory usage readings were obtained using vmstat application, configured to record readings every second.

CPU results

Average CPU load results obtained during the performance experiments

Memory results

Average memory usage obtained during the performance experiments

Results summary

  • The average CPU load heavily depends on the volume of the incoming data. The application is able to process 500 readings per second in real-time, recording an average 54% of CPU load.

  • When trying to process more than 500 readings per second, application was no longer able to process all incoming readings in real-time. While there were observed examples where the application supported processing 550 readings per second in real-time, it was not repeatable in every run. Therefore, it was determined that tested setup is able to handle processing of up to 500 readings per second.

  • Memory usage results were vastly different, it was determined that there’s very little change in memory consumption between 5 Hz and 500 Hz scenario, with highest average memory consumption of 689 MB.

Next steps

  • Tests with multiple devices
  • Tests with Android OS devices
  • Tests using more complex stream processing operations/different use cases


  • D.-H. Kang et al., “Room Temperature Control and Fire Alarm/Suppression IoT
    Service Using MQTT on AWS,” Feb. 2017, pp. 1–5, doi: 10.1109/PlatCon.2017.7883724.

  • N. Jaya and Md. F. Hossain, “A Prototype Air Flow Control System for Home
    Automation Using MQTT Over Websocket in AWS IoT Core,” Oct. 2018, pp. 111–1116, doi: 10.1109/CyberC.2018.00032.

  • A. George, H. Dhanasekaran, J. P. Chittiappa, L. A. Challagundla, S. S. Nikkam, and
    O. Abuzaghleh, “Internet of Things in health care using fog computing,” in 2018 IEEE Long Island Systems, Applications and Technology Conference (LISAT), May 2018, pp. 1–6, doi: 10.1109/LISAT.2018.8378012.

  • J. M. Talavera et al., “Review of IoT applications in agro-industrial and environmental fields,” Computers and Electronics in Agriculture, vol. 142, pp. 283–297, Nov. 2017, doi: 10.1016/j.compag.2017.09.015.


  • W. Shi, G. Pallis, and Z. Xu, “Edge Computing” Proceedings of the IEEE, vol. 107, no. 8, pp. 1474–1481, Aug. 2019, doi: 10.1109/JPROC.2019.2928287.

  • S. Yi, Z. Hao, Z. Qin, and Q. Li, “Fog Computing: Platform and Applications,” in
    2015 Third IEEE Workshop on Hot Topics in Web Systems and Technologies
    (HotWeb), Nov. 2015, pp. 73–78, doi: 10.1109/HotWeb.2015.22.

  • “Edgent.” http://edgent.incubator.apache.org/ (accessed Apr. 22, 2020).

  • Fatos Xhafa, Burak Kilic, Paul Krause, “Evaluation of IoT stream processing at edge computing layer for semantic data enrichment” Future Generation Computer Systems, Volume 105, Pages 730-736, 2020

  • E. G. Renart, J. Diaz-Montes, and M. Parashar, “Data-Driven Stream Processing at the Edge,” in 2017 IEEE 1st International Conference on Fog and Edge Computing (ICFEC), May 2017

  • M. D. de Assuncao, A. da S. Veith, and R. Buyya, "Distributed Data Stream Processing and Edge Computing: A Survey on Resource Elasticity and Future Directions"


  • A. Bouslama, Y. Laaziz, A. Tali, and E. Mohamed, “AWS and IoT for Real-time
    Remote Medical Monitoring,” International Journal of Intelligent Enterprise, vol. 6, pp. 293–310, Apr. 2019, doi: 10.1504/IJIE.2019.10022704

  • L. Greco, P. Ritrovato, and F. Xhafa, “An edge-stream computing infrastructure for real-time analysis of wearable sensors data,” Future Generation Computer Systems, vol. 93, Nov. 2018, doi: 10.1016/j.future.2018.10.058

  • L. Yan, D. Wan, Q. Zhao, and Y. Yang, “Research on Implementation Methods of Edge Computing in Intelligent Hydrology,”

  • Brandon Swink, “Sensor Data Analytics Acceleration with Apache Edgent”,
    http://site.ieee.org/dallas sensors/files/2016/09/EdgeAnalyticsMeetup.Edgent.Swink_.pdf (accessed May 30, 2020).

  • “Welcome to The Apache Software Foundation!” https://www.apache.org/ (accessed Apr. 22, 2020).


  • M. B. Yassein, M. Q. Shatnawi, S. Aljwarneh, and R. Al-Hatmi, “Internet of Things: Survey and open issues of MQTT protocol,” in 2017 International Conference on Engineering MIS (ICEMIS)

  • R. Light, “Mosquitto: server and client implementation of the MQTT protocol,”
    Journal of Open Source Software, vol. 2, no. 13, p. 265, May 2017, doi:

  • “Raspberry Pi 4 Model B specifications – Raspberry Pi.” https://www.raspberrypi.org (accessed Apr. 22, 2020).

  • “cpustat”, http://manpages.ubuntu.com/manpages/bionic/man8/cpustat.8.html
    (accessed May 30, 2020)

  • “vmstat”, http://manpages.ubuntu.com/manpages/bionic/man8/vmstat.8.html (accessed May 30, 2020)

Copy of Comparative Analysis of Time Series Databases in the Context of Edge Computing for Low Power Sensor Networks

By progressive

Copy of Comparative Analysis of Time Series Databases in the Context of Edge Computing for Low Power Sensor Networks

  • 75
Loading comments...

More from progressive