


Introduction
In the first article of our small series we explored how to develop and deploy Lambda function using Docker Container Image and Java runtime. We explored 2 use cases:
- AWS Lambda base Docker container image
- AWS OS-only base image
In this article we'll measure cold and warms starts of the Lambda function using this approach AWS Lambda base Docker container image.
Measuring cold and warm starts of Lambda function using AWS Lambda base Docker container image and Java (21) runtime
For our measurements we'll use our sample application from the first part and use Java 21 runtime for our Lambda functions. For all Lambda functions we give 1024 MB memory and use JAVA_TOOL_OPTIONS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" as this compilation option provides a very good-trade of between the cold and warm start times.
The results of the experiment below were based on reproducing more than 100 cold and approximately 100.000 warm starts for the duration of 1 hour with Lambda function GetProductByIdWithPureJava21GraalVMNativeImageLambda which is mapped to the Java Lambda handler class which is responsible for retrieving the product (stored in the DynamoDB) by id. For it I used the load test tool hey, but you can use whatever tool you want, like Serverless-artillery or Postman.
Cold (c) and warm (m) start time in ms:
c p50 | c p75 | c p90 | c p99 | c p99.9 | c max | w p50 | w p75 | w p90 | w p99 | w p99.9 | w max |
---|---|---|---|---|---|---|---|---|---|---|---|
3093.26 | 3219.44 | 3314.12 | 4632.16 | 6513.35 | 6517.71 | 5.47 | 6.20 | 7.39 | 17.14 | 43.03 | 1386.07 |
Conclusion
In this article, we measured cold and warms start times of the Lambda function using this approach AWS Lambda base Docker container image. We experienced quite significant cold start and quite competitive warm start times compared to Measuring cold and warm starts with Java 21 using different Lambda memory settings for Lambda with 1024 MB memory and Lambda Java 21 managed runtime.
AWS Lambda SnapStart which significantly reduces cold start times is currently only available for Java Corretto managed runtimes (11, 17 and 21) and not for Docker container images. You can explore jlink tool to assemble and optimize a set of modules and their dependencies into a smaller custom runtime image and Class data sharing (CDS) though which helps reduce the startup time for Java programming language applications, in particular smaller applications, as well as reduce footprint. The advantage of using the Docker Image as deployment artifact for Java is the ability to use recent Java runtime like Java 22 (Java 23 will be released in September 2024).
The above is the detailed content of Lambda function using Docker Container Image -Part easuring cold and warm starts of Lambda function with Java ( runtime. For more information, please follow other related articles on the PHP Chinese website!

This article analyzes the top four JavaScript frameworks (React, Angular, Vue, Svelte) in 2025, comparing their performance, scalability, and future prospects. While all remain dominant due to strong communities and ecosystems, their relative popul

The article discusses implementing multi-level caching in Java using Caffeine and Guava Cache to enhance application performance. It covers setup, integration, and performance benefits, along with configuration and eviction policy management best pra

Node.js 20 significantly enhances performance via V8 engine improvements, notably faster garbage collection and I/O. New features include better WebAssembly support and refined debugging tools, boosting developer productivity and application speed.

Java's classloading involves loading, linking, and initializing classes using a hierarchical system with Bootstrap, Extension, and Application classloaders. The parent delegation model ensures core classes are loaded first, affecting custom class loa

Iceberg, an open table format for large analytical datasets, improves data lake performance and scalability. It addresses limitations of Parquet/ORC through internal metadata management, enabling efficient schema evolution, time travel, concurrent w

This article addresses the CVE-2022-1471 vulnerability in SnakeYAML, a critical flaw allowing remote code execution. It details how upgrading Spring Boot applications to SnakeYAML 1.33 or later mitigates this risk, emphasizing that dependency updat

This article explores integrating functional programming into Java using lambda expressions, Streams API, method references, and Optional. It highlights benefits like improved code readability and maintainability through conciseness and immutability

The article discusses using Maven and Gradle for Java project management, build automation, and dependency resolution, comparing their approaches and optimization strategies.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6
Visual web development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
