Performance Measurement of WebAssembly on IoT Constrained Devices
2024 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Internet of Things devices are becoming prevalent in daily life, and WebAssembly is an advanced technology in both web and non-web areas. Therefore, the integration of these two technologies is increasingly essential. However, the application of WebAssembly in the Internet of Things, particularly on resource-constrained devices, still needs to be explored. Furthermore, certain WebAssembly technologies encounter specific challenges, such as compatibility issues and limited support for certain hardware features, and suffer from irregular updates, which need to be tested and reported. This thesis tackles these challenges by conducting a series of experiments on three distinct Internet of Things devices: the Raspberry Pi Pico, ESP32-C6, and the nRF5340 board. Moreover, we evaluate the performance of two programming languages, C and Rust, alongside two WebAssembly runtimes, wasm3 and WAMR. The experiments focus on three key metrics: energy consumption, memory footprint, and execution time, providing a comparative analysis of the performance between WebAssembly code and native code. Additionally, we extend the research to include a machine learning experiment through Webassembly System Interface Neural Network on the Raspberry Pi 5, as machine learning workloads are becoming increasingly important in Internet of Things applications. This experiment utilizes the same performance metrics for both native and WebAssembly implementations and compares the performance. Our results show the significant differences in energy consumption, execution time, and resource utilization between the two implementations. The findings contribute to a better understanding of WebAssembly’s availability and efficiency in the area of the Internet of Things.
Abstract [sv]
Internet of Things-enheter blir allt vanligare i vardagen, och WebAssembly är en avancerad teknik inom både webbaserade och icke-webbaserade områden. Därför blir integrationen av dessa två teknologier alltmer viktig. Användningen av WebAssembly inom Internet of Things, särskilt på resursbegränsade enheter, behöver dock fortfarande utforskas. Dessutom möter vissa WebAssembly-teknologier specifika utmaningar, såsom kompatibilitetsproblem och begränsat stöd för vissa hårdvarufunktioner, samt lider av oregelbundna uppdateringar, vilket behöver testas och rapporteras. Denna avhandling tacklar dessa utmaningar genom att genomföra en serie experiment på tre olika Internet of Things-enheter: Raspberry Pi Pico, ESP32-C6- DevKitM-1-N4 och nRF5340-kortet. Vi utvärderar dessutom prestandan hos två programmeringsspråk, C och Rust, tillsammans med två WebAssemblyruntime- miljöer, wasm3 och WAMR. Experimenten fokuserar på tre nyckelmetriker: energiförbrukning, minnesfotavtryck och exekveringstid, och tillhandahåller en jämförande analys av prestandan mellan WebAssemblykod och inbyggd kod. Dessutom utökar vi forskningen till att inkludera ett maskininlärningsexperiment genom Webassembly System Interface Neural Network på Raspberry Pi 5, då maskininlärningsarbetsbelastningar blir allt viktigare inom Internet of Things-applikationer. Detta experiment använder samma prestandametriker för både inbyggda och WebAssemblyimplementationer och jämför prestandan. Våra resultat visar de betydande skillnaderna i energiförbrukning, exekveringstid och resursutnyttjande mellan de två implementationerna. Resultaten bidrar till en bättre förståelse av WebAssemblys tillgänglighet och effektivitet inom Internet of Thingsområdet.
Place, publisher, year, edition, pages
2024. , p. 90
Series
TRITA-EECS-EX ; 2024:841
Keywords [en]
Internet of Things, WebAssembly, Machine Learning, Resource-Constrained Devices, Performance Evaluation
Keywords [sv]
Internet of Things, WebAssembly, maskininlärning, resursbegränsade enheter, prestandautvärdering
National Category
Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
URN: urn:nbn:se:kth:diva-355286OAI: oai:DiVA.org:kth-355286DiVA, id: diva2:1908617
External cooperation
Rise Research Institutes of Sweden AB
Educational program
Master of Science - Embedded Systems
Supervisors
Examiners
2024-10-292024-10-282024-10-29Bibliographically approved