2 ms·
The 128M case is really strange, why do Go and Rust take so much more time to start than higher-capacity machines, and even Python? Do they get run inside a was
by masklinn 5y ago
The 128M case is really strange, why do Go and Rust take so much more time to start than higher-capacity machines, and even Python? Do they get run inside a wasm runtime or something, and that runtime has to go back and forth requesting memory which a native python runtime gets “for free”?
- wongarsu 5y agoAs far as I'm aware AWS Lambda scale various other resources with the requested memory. I assume Rust scales mostly with the assigned CPU time that increases with memory?
- zokier 5y agoFrom the looks of it, Go/Rust cold starts are almost completely CPU bound, so you see the near perfect scaling there. Meanwhile Python I'd guess is mostly io bound, which doesn't scale. That kinda makes sense as Go/Rust compile down to single executable while Python loads lots of libraries from disk. For Rust, I suspect spinning up Tokio and the rest of async runtime might be making cold starts worse. But that's purely speculation. The python lambda is good old-fashioned sync io. Another difference is that Rust lambda initializes a logger, while Python one doesn't. That might add some milliseconds too to the startup.