Fork me on GitHub
#holy-lambda
<
2022-11-29
>
steveb8n08:11:59

Very interesting. Since JVM clojure performs better than graal once started, I wonder if this means we go back to JVM?

viesti08:11:10

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 -&gt; 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.

viesti08:11:52

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

viesti08:11:07

I think I'll stay with native-image for now since ended up building that into the project 🙂 But definitely interesting tech this is.

steveb8n08:11:27

Fascinating. I'm already using versions so that's encouraging

steveb8n08:11:46

Same here. Let it settle a bit

viesti08:11:57

it was pretty easy, just enable snapshotting and then publish version

viesti08:11:26

> 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 😄

viesti08:11:07

something like loading NLP model into memory would be interesting

steveb8n08:11:23

I'm about to build a new service. I might try it there

👍 2
Karol Wójcik09:11:06

Huh, good I still didnt touch the HL tasks. AWS will do the work for me 😀 and we go back to JVM Lambdas.

viesti09:11:56

maybe I still get to keep that nrepl in lamdba dream, should go and do some work on that dream 😄

Karol Wójcik09:11:01

@U06QSF3BK the Lambda always creates and pushes the new version on the deployment as a $LATEST tag. Meaning you can already benefit from SnapStart. @U0510KXTU @U06QSF3BK I would love to hear if it’s really a game changer and how it compares to HL.

viesti09:11:05

suspected that but didn't actually try, my bad :D

steveb8n11:11:42

Will report back when I try it

Chris Lowe10:11:30

@U06QSF3BK, 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.

viesti10:11:47

3008MB

👍 2