A comparison of compiler strategies for serverless functions written in Kotlin

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Author: Kim Björk; [2020]

Keywords: ;

Abstract: Hosting options for software have become more modifiable with time, from requiring on-premises hardware to now being able to tailor a flexible hosting solution in a public cloud. One of the latest hosting solution option is the serverless architecture, entailing running software only when invoked. Public cloud providers such as Amazon, Google and IBM provide serverless solutions, yet none of them provide an official support for the popular language Kotlin. This may be one of the reasons why the performance of Kotlin in a serverless environment is, to our knowledge, relatively undocumented. This thesis investigates the performance of serverless functions written in Kotlin when run with different compiler strategies, with the purpose of contributing knowledge within this subject. One Just-In-Time compiler, the Hotspot Java Virtual Machine (JVM), is set against an Ahead-Of-Time compiler, GraalVM. A benchmark suite was constructed and two serverless functions were created for each benchmark, one run with the JVM and one run as a native image, created by GraalVM. The benchmark tests are divided in two categories. One consisting of cold starts, an occurrence that arises the first time a serverless function is invoked or has not been invoked for a longer period of time, causing the need for certain start-up actions. The other category is warm starts, a run when the function has recently been invoked and the cold starts start-up actions are not needed. The result showed a faster total runtimes and less memory requirements for GraalVM-enabled functions during cold starts. During warm starts the GraalVM-enabled functions still required less memory but the JVM functions showed large improvements over time, making the total runtimes more similar to their GraalVM-enabled counterparts.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)