Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fight cold startup times for Kotlin lambdas with GraalVM

Fight cold startup times for Kotlin lambdas with GraalVM

In a live-coding session we'll see how a Custom Runtime can be implemented in Kotlin and how we can run our application as a native image that we create with the help of GraalVM.

by Mathias Düsterhöft
presented on May 2, 2019 @car2go

More Decks by Kotlin User Group Hamburg

Other Decks in Programming


  1. COLD STARTUP AND THE JVM What is happening during JVM

    startup? JIT compilation garbage collection class loading static initialization ...
  2. COLD STARTUP AND THE JVM Yan Cui - aws lambda

    – compare coldstart time...
  3. GRAALVM  For existing Java applications, GraalVM can provide benefits

    by running them faster, ... creating ahead- of-time compiled native images. - https://www.graalvm.org/docs/why-graal/
  4. GRAALVM - NATIVE IMAGES 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)
  5. CUSTOM AWS LAMBDA RUNTIMES 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
  6. CONCLUSION 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