Skip to content

Latest commit

 

History

History
174 lines (106 loc) · 3.72 KB

File metadata and controls

174 lines (106 loc) · 3.72 KB

---?image=slides/title.jpg

Fighting cold startup issues for your Kotlin Lambda with GraalVM


---?color=#0047b3

Cold Startup


What is Cold Startup


Cold Startup and the JVM

What is happening during JVM startup?

  • JIT compilation
  • garbage collection
  • class loading
  • static initialization
  • ...

Cold Startup and the JVM

Yan Cui - aws lambda – compare coldstart time...


AWS re:Invent 2018: [REPEAT 1] Inside AWS: Technology Choices for Modern Applications (SRV305-R1)

---?color=#0099cc

GraalVM


GraalVM

@quoteFor existing Java applications, GraalVM can provide benefits by running them faster, ... creating ahead-of-time compiled native images.


GraalVM - Native Images

@ul

  • GraalVM can create native images for existing JVM-based applications
  • native image generation employs static analysis to find any code reachable from the main Java method
  • the reachable code is then compiled AOT into machine code
  • the resulting executable is self-contained (contains VM components)

@ulend


GraalVM

Codrut Stancu - Instant Netty Startup using GraalVM Native Image Generation

---?color=#b7410e

Custom AWS Lambda Runtimes



Custom AWS Lambda Runtimes

@ul

  • open up AWS Lambda for any programming language
  • a runtime is a program that runs the Lambda handler
  • can be included in the deployment package

@ulend


Custom AWS Lambda Runtimes

---?color=#092736

Demo


Show me the numbers

Observed cold startup times


Conclusion

@ul

  • GraalVM native images greatly reduce startup time
  • native image also seem to improve runtime performance
  • creating native images for an application is cumbersome
  • native image generation is slow

@ulend


@size2em


@fa[eye] https://gitpitch.com/mduesterhoeft/kotlin-graalvm-custom-aws-lambda-runtime-talk

@fa[github] mduesterhoeft/kotlin-graalvm-custom-aws-lambda-runtime-talk

@fa[medium] Blog: Fighting cold startup issues for your Kotlin Lambda with GraalVM


Thank you!