This is interesting news https://aws.amazon.com/blogs/aws/new-accelerate-your-lambda-functions-with-lambda-snapstart/
Very interesting. Since JVM clojure performs better than graal once started, I wonder if this means we go back to JVM?
I tried this in my project, where I have holy-lambda in use
The plain jvm11 init duration is around 7s
Then with snapstart:
> Restore duration
> 543.33 ms
> Duration
> 1801.43 ms
so the init phase goes from 7s -> 500ms, which is significant (the "Duration" above is probably because we do some things like getting public signature verification keys from cognito and Hotspot defaults in use etc. next runs are faster)
But there are downsides too. You have to publish lambda versions, which I haven't yet used, but could probably use (if it is like docker image tagging). The publication creates a https://github.com/firecracker-microvm/firecracker/blob/main/docs/snapshotting/snapshot-support.md, and in my example took a minute or two (didn't time, gut estimate). Also, these snapshots are cached 14 days, so maybe there would need to be a publication every 14 days or so.
But I think this gives more reassurance for using the JVM ecosystem with Lambda, one could use snapshotting for added speed, giving more time to build native-image solution alongside or hop onto JVM immediately before looking into native-image, or if there's a problem with native-image then still use lambda
I think I'll stay with native-image for now since ended up building that into the project ๐ But definitely interesting tech this is.
Fascinating. I'm already using versions so that's encouraging
Same here. Let it settle a bit
it was pretty easy, just enable snapshotting and then publish version
> Pricing โ There is no extra charge for the use of Lambda SnapStart. I wonder what limits are in the snapshot creation phase, like to prevent bitcoin mining ๐
something like loading NLP model into memory would be interesting
I'm about to build a new service. I might try it there
Huh, good I still didnt touch the HL tasks. AWS will do the work for me ๐ and we go back to JVM Lambdas.
๐
maybe I still get to keep that nrepl in lamdba dream, should go and do some work on that dream ๐
aa
suspected that but didn't actually try, my bad :D
Will report back when I try it
@viesti, thanks for posting this. What memory size is your Lambda configured at? To a point, CPU is allocated proportionally to memory, so I was wondering how much horsepower your Lambda had? I believe you get a full CPU starting at 1792 MiB. Sadly SnapStart doesnโt work with ARM yet so Iโm not able to test SnapStart just now.
3008MB