I did a RIIR again and:

Two apps nearly-identical in functionality now. On startup, before processing anything:

#Rust + #Axum: 3.5MB RES
#Elixir + #Phoenix: 75MB RES

Literally 20x difference, and I haven't even benchmarked throughput/perf. For a use case where a big goal is extremely low resource use, this is huge.

(both of these are running in release/prod mode btw)

and a c10k cause why not

Text copied from image

~ took 1m0s > wrk -t10 -c10000 -d60 http://localhost :3000 Running 1m test @ http:// localhost: 3000 10 threads and 10000 connections Thread Stats Latency Req/Sec 6335808 requests in 1.00m, 8.60GB read Socket errors: connect 7967, read 0, write O, timeout o Requests/sec: 105487.78 Transfer/sec: ~ took 1m0s › wrk -t10 -10000 -d60 http:// localhost:4001 Running 1m test @ http:// localhost :4001 10 threads and 10000 connections Thread Stats Avg Latency Req/Sec 455241 requests in 1.00m, 3.26GB read Socket errors: connect 7967, read 151, write O, timeout o Requests/sec: Transfer/sec:

Max 28.03k +/- Stdev 75.78% 53.36% Max 3.11k +/- Stdev 70.42% 59.66%

Avg Stdev 18. 88ms 2.72ms 39.26ms 10.61k 5.78k 146. 58MB Stdev 255.25ms 65.54ms 926.71ms 762.10 364.04 7574.21 55.51MB
Text copied from image ~ took 1m0s > wrk -t10 -c10000 -d60 http://localhost :3000 Running 1m test @ http:// localhost: 3000 10 threads and 10000 connections Thread Stats Latency Req/Sec 6335808 requests in 1.00m, 8.60GB read Socket errors: connect 7967, read 0, write O, timeout o Requests/sec: 105487.78 Transfer/sec: ~ took 1m0s › wrk -t10 -10000 -d60 http:// localhost:4001 Running 1m test @ http:// localhost :4001 10 threads and 10000 connections Thread Stats Avg Latency Req/Sec 455241 requests in 1.00m, 3.26GB read Socket errors: connect 7967, read 151, write O, timeout o Requests/sec: Transfer/sec: Max 28.03k +/- Stdev 75.78% 53.36% Max 3.11k +/- Stdev 70.42% 59.66% Avg Stdev 18. 88ms 2.72ms 39.26ms 10.61k 5.78k 146. 58MB Stdev 255.25ms 65.54ms 926.71ms 762.10 364.04 7574.21 55.51MB
@zkat yeah, I adore working with Elixir but for really tight memory constraints it is not the right fit. AtomVM is kind of fun for that since they've shoved that in 400Kb of RAM iirc. But not super mature.

It depends so much on what you are up to, I reckon. I've done a decent bit of embedded linux devices with Elixir now and the entire system can run happy around 150MB.

How was your Elixir experience overall? My assumption is that Elixir would let you work mostly at a higher abstraction level but I haven't spent enough time with Rust to know :)

I know the runtime properties are very different. Tokio seems have a lot of BEAM-like features but not the same type of runtime operating system features.