DEV Community

Discussion on: Writing Rust the Elixir way

Collapse
 
rajsite profile image
Milan Raj

Each Lunatic process gets their own heap, stack and syscalls.

It looks like the the erlang baseline per process memory usage (stack + heap) is pretty low. Do you know what the Lunatic process size is / what is the future goal?

Collapse
 
bkolobara profile image
Bernard Kolobara

Lunatic's process size is a bit higher than Erlang's when a process is spawned. It's around 4KiB for the stack, if you don't use any heap data. On modern 64bit CPUs Lunatic will relay mostly on cheap virtual memory. The actual memory consumption during runtime should be lower than Erlang's in most cases just from the fact that Rust's data structures are more compact and memory efficient. This is something that can be optimised further if it ever becomes a bottleneck. Right now the development is focused on stability and correctness before performance.

Collapse
 
thepeoplesbourgeois profile image
Josh • Edited

If I had money to invest in things, then you would've just made an angel investor out of me. As I'm quick to say, I have never told someone, "I don't want it done right, I want it done fast!"

Also, this post has made me realize I've been too liberal in rating things as unicorns, because you, sir, are building a flerfing unicorn. My hats โ€” all of my hats โ€” off to you. ๐ŸŽฉ๐Ÿงข๐Ÿ‘’๐ŸŽ“โ›‘๐Ÿช–๐Ÿ‘‘