Skip to content

Commit 6619fc4

Browse files
committed
[WIP]
1 parent 03c7ced commit 6619fc4

File tree

15 files changed

+24
-24
lines changed

15 files changed

+24
-24
lines changed

labs/lab-2-optimize/multithreading/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Resources:
1313
Handler: com.aws.samples.petclinic.CreatePetLambdaHandler::handleRequest
1414
Runtime: java8
1515
CodeUri: target/app.jar
16-
MemorySize: 1024
16+
MemorySize: 2048
1717
Environment:
1818
Variables:
1919
TABLE_NAME: !ImportValue PetsTable

workshop/content/optimize/_index.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,4 @@ pre = "Lab 2: "
66

77
## Overview
88

9-
## What are we doing here?
10-
11-
Take the no DI framework measurements as baseline and see what else we can improve in terms of latency, cold-start and memory consumption.
12-
13-
## AWS Lambda Power Tuning
14-
15-
Our goal is to run our AWS Lambda function with a performance optimized configuration, taking cost and scaling into account as well. We are using **[AWS Lambda Power Tuning](https://github.com/alexcasalboni/aws-lambda-power-tuning)** to find the optimal configuration.
16-
17-
The easiest way is to install it via the **[AWS Serverless Application Repository](https://aws.amazon.com/serverless/serverlessrepo/)** by clicking at this **[link](https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:451282441545:applications~aws-lambda-power-tuning)**.
18-
19-
A sample visualization with recommendations looks like this:
20-
21-
![AWS Lambda Power Tuning](optimize/aws-lambda-power-tuning.png)
9+
In this chapter, we will apply multiple different optimizations and check, whether we can measure a performance improvement with that change.

workshop/content/optimize/multithreading/_index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ java -cp lab-2-optimize/multithreading/target/app.jar -verbose:class com.aws.sam
3333
java -cp lab-2-optimize/multithreading/target/app.jar -verbose:class com.aws.samples.petclinic.Main | grep '\[class,load\]' | wc -l
3434
```
3535

36-
It will report **??? classes got loaded** to execute your AWS Lambda function.
36+
It will report **4938 classes got loaded** to execute your AWS Lambda function.
3737

3838
To get a breakdown by package name, run the following command:
3939

@@ -77,7 +77,9 @@ export FUNCTION_ARN=$(aws cloudformation describe-stacks \
7777

7878
## Memory Configuration
7979

80-
We choose to go with 1024 MB for the load and performance tests.
80+
We choose to go with 2048 MB for the load and performance tests.
81+
82+
{{< figure src="multithreading/power-tuning.png" >}}
8183

8284
## Run The Load Tests
8385

124 KB
Loading
98.2 KB
Loading
348 KB
Loading
148 KB
Loading

workshop/content/optimize/summary/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ pre = ""
66

77
| Measurement | MIN in ms | P99 in ms | FASTEST COLD-START in ms |
88
|-------------------------|-----------|-----------|--------------------------|
9-
| Python in Lambda | 46 | 156 | 581 |
9+
| Python in Lambda | 46 | 156 | 581 |
1010
| Springboot in Lambda | 41 | 11775 | 11500 |
1111
| **AWS Java SDK v2** | **40** | **4884** | **5000** |
1212
| | | | |
1313
| Reduce Dependencies | 37 | 4303 | 4400 |
1414
| Handler Interface | 41 | 2880 | 4200 |
1515
| Packaging Mechanism | 40 | 4942 | 5000 |
16-
| Multithreading | | | |
16+
| Multithreading | 32 | 120 | 3600 |
1717
| Java 11 | 42 | 5019 | 4900 |
1818
| JVM Options | 41 | 5051 | 4900 |
1919
| Prime Resources | | | |

workshop/content/replatform/python-lambda/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title = "Python Lambda"
3-
weight = 13
3+
weight = 12
44
pre = ""
55
+++
66

workshop/content/replatform/springboot2-lambda/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title = "Springboot2 Lambda"
3-
weight = 12
3+
weight = 13
44
pre = ""
55
+++
66

0 commit comments

Comments
 (0)