upvote
If an agent fires up NPM, takes a boatload of memory, is that memory released back to the OS after NPM shuts down in the VM?
reply
In principle yes, in practice it's complicated, using something called "balloon drivers"

https://en.wikipedia.org/wiki/Memory_ballooning

reply
There’s also memory hotplugging via virtio-mem. But generally speaking downscaling live vm memory can’t be said to be a solved problem, it’s more of an active area of research.
reply