3 ms·
Why not just run a vm?
by pistoriusp 4mo ago
Why not just run a vm?
- AndrewDucker 4mo agoFar more overhead.
- ptx 4mo agoIn particular (as I just learned when looking it up), WASM can dynamically allocate host memory with the memory.grow instruction, so you don't have to waste a huge chunk of statically allocated memory per VM: https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/Memory/grow https://developer.mozilla.org/en-US/docs/WebAssembly/Referen... Although... it doesn't say anything about releasing memory back to the host (I don't see a memory.shrink instruction) so maybe it's not all that helpful? Will WASM applications continue hogging the maximum amount of memory they've ever used until they're restarted? A VM could release memory back to the host using memory ballooning, but this has to be managed manually somehow, at least with QEMU.