This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-29
Channels
- # adventofcode (9)
- # announcements (2)
- # aws (78)
- # babashka (55)
- # beginners (97)
- # biff (9)
- # calva (11)
- # cherry (2)
- # cider (8)
- # clerk (7)
- # clj-kondo (6)
- # clj-on-windows (4)
- # clojure (213)
- # clojure-austin (6)
- # clojure-europe (63)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-spec (10)
- # clojure-uk (1)
- # clojurescript (14)
- # clr (2)
- # community-development (3)
- # conjure (14)
- # datomic (2)
- # deps-new (5)
- # dev-tooling (10)
- # editors (3)
- # emacs (3)
- # etaoin (19)
- # events (4)
- # fulcro (71)
- # holy-lambda (20)
- # java (3)
- # jobs (2)
- # leiningen (4)
- # lsp (24)
- # malli (15)
- # membrane (107)
- # music (1)
- # off-topic (29)
- # pedestal (4)
- # polylith (1)
- # portal (2)
- # rdf (5)
- # releases (7)
- # scittle (5)
- # shadow-cljs (8)
- # tools-build (15)
- # tools-deps (6)
- # xtdb (13)
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.
> 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 😄
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 😄
@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.
@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.