Wikifunctions:Status updates/2024-08-23 - Wikifunctions

· 2024-08-23

WasmEdge, Now 300ms Less Edgy

This quarter, the Abstract Wikipedia team committed to improve system performance. We performed a bottleneck analysis of function calls, tracking how much time the system spent making HTTP requests, performing calculations, and managing resources. We found that the single slowest operation–by far!–was starting up the WasmEdge CLI.

We’ve talked about WasmEdge before: briefly, it’s is a system interface for WebAssembly (WASM). It allows WASM code to interact with the operating system. We mostly use it so that our code executors can read/write standard streams and be guaranteed to touch nothing else – no files, no network access, and no other processes – which is a key part of our work to ensure the integrity and security of the services. Unfortunately, it turns out that WasmEdge takes around 300 ms to spin up in our production environment before it’s ready to handle any data.