Skip to content

Commit

Permalink
Memory Size Plot (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz authored Oct 19, 2023
1 parent f42424d commit 1d0f3ac
Show file tree
Hide file tree
Showing 32 changed files with 414 additions and 0 deletions.
20 changes: 20 additions & 0 deletions eval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ inv cosign.sign-container-image "ghcr.io/csegarragonz/coco-knative-sidecar:unenc
Now you are ready to run one of the experiments:
* [Start-Up Costs](#start-up-costs) - time required to spin-up a Knative service.
* [Instantiation Throughput](#instantiation-throughput) - throughput-latency of service instantiation.
* [Memory Size](#memory-size) - impact on initial VM memory size on start-up time.

### Start-Up Costs

Expand Down Expand Up @@ -99,6 +100,25 @@ which generates a plot in [`./plots/xput/xput.png`](

![plot](./plots/xput/xput.png)

### Memory Size

This experiment explores the impact of the initial VM memory size on the
Knative service start-up time.

By initial VM memory size we mean the memory size passed to QEMU with the `-m`
flag. This size can be configured through the Kata configuration file.

To run the experiment you may run:

```bash
inv eval.mem-size.run
```

which generates a plot in [`./plots/mem-size/mem_size.png`](
./plots/mem-size/mem_size.png). You can also see the plot below:

![plot](./plots/mem-size/mem_size.png)

## Benchmarks

TODO
26 changes: 26 additions & 0 deletions eval/apps/mem-size/service.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: helloworld-knative
annotations:
"features.knative.dev/podspec-runtimeclassname": "enabled"
spec:
template:
metadata:
labels:
apps.coco-serverless/name: helloworld-py
io.katacontainers.config.pre_attestation.enabled: "false"
spec:
{% if runtime_class is defined %}
runtimeClassName: {{ runtime_class }}
# coco-knative: need to run user container as root
securityContext:
runAsUser: 1000
{% endif %}
containers:
- image: {{ image_repo }}/{{ image_name }}:{{ image_tag }}
ports:
- containerPort: 8080
env:
- name: TARGET
value: "World"
Binary file added eval/plots/mem-size/mem_size.pdf
Binary file not shown.
Binary file added eval/plots/mem-size/mem_size.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig-enc_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697734213.5928617,1697734232.0
1,1697734239.3558283,1697734257.0
2,1697734263.449783,1697734281.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig-enc_16.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697734486.314491,1697734506.0
1,1697734512.4012096,1697734553.0
2,1697734559.5635872,1697734579.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig-enc_2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697734287.5582354,1697734305.0
1,1697734311.632289,1697734330.0
2,1697734334.714039,1697734334.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig-enc_4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697734338.755289,1697734356.0
1,1697734362.8395243,1697734380.0
2,1697734386.9313612,1697734404.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig-enc_8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697734411.0398479,1697734430.0
1,1697734436.1101897,1697734455.0
2,1697734461.2020004,1697734480.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733827.1515234,1697733844.0
1,1697733851.907207,1697733868.0
2,1697733874.9889178,1697733892.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig_16.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697734133.9578545,1697734153.0
1,1697734160.037981,1697734180.0
2,1697734186.130995,1697734207.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig_2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733898.0983624,1697733936.0
1,1697733942.2282069,1697733960.0
2,1697733966.3211334,1697733984.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig_4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733990.425501,1697734007.0
1,1697734013.4979336,1697734031.0
2,1697734037.5878677,1697734055.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw-sig_8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697734061.7025578,1697734079.0
1,1697734085.770161,1697734103.0
2,1697734109.851056,1697734127.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697735272.948704,1697735288.0
1,1697735294.882638,1697735309.0
2,1697735315.9643517,1697735330.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw_16.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697735685.286312,1697735704.0
1,1697735710.3712687,1697735728.0
2,1697735734.4552002,1697735752.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw_2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697735337.0589366,1697735373.0
1,1697735379.1998348,1697735394.0
2,1697735400.2774098,1697735436.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw_4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697735442.4481442,1697735458.0
1,1697735464.5304694,1697735479.0
2,1697735485.607388,1697735501.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco-fw_8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697735507.7148113,1697735633.0
1,1697735639.1125834,1697735657.0
2,1697735663.1923606,1697735679.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733025.1773233,1697733039.0
1,1697733045.97489,1697733060.0
2,1697733067.0547917,1697733082.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco_16.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733283.8869636,1697733300.0
1,1697733306.9536378,1697733325.0
2,1697733332.04397,1697733349.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco_2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733088.1544392,1697733103.0
1,1697733109.20841,1697733124.0
2,1697733130.291018,1697733145.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco_4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733151.3872952,1697733166.0
1,1697733172.4563491,1697733188.0
2,1697733194.5358543,1697733210.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/coco_8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697733216.639434,1697733233.0
1,1697733239.7055316,1697733255.0
2,1697733261.7911825,1697733277.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/kata_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697732765.5844097,1697732776.0
1,1697732783.8956566,1697732794.0
2,1697732800.9628544,1697732811.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/kata_16.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697732972.6933293,1697732983.0
1,1697732989.7416396,1697733000.0
2,1697733006.8141966,1697733018.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/kata_2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697732818.050173,1697732829.0
1,1697732835.1180081,1697732846.0
2,1697732852.1826577,1697732864.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/kata_4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697732870.2754269,1697732881.0
1,1697732887.3352122,1697732898.0
2,1697732904.404381,1697732915.0
4 changes: 4 additions & 0 deletions eval/results/mem-size/kata_8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Run,StartTimeStampSec,EndTimeStampSec
0,1697732921.504405,1697732932.0
1,1697732938.5357118,1697732949.0
2,1697732955.6084037,1697732966.0
2 changes: 2 additions & 0 deletions tasks/eval/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from invoke import Collection

from . import mem_size
from . import startup
from . import xput

ns = Collection(
mem_size,
startup,
xput,
)
Loading

0 comments on commit 1d0f3ac

Please sign in to comment.