Skip to content

Commit

Permalink
Move to vanilla firecracker snapshots
Browse files Browse the repository at this point in the history
Closes #794

Signed-off-by: Georgiy Lebedev <lebedev.gk@phystech.edu>
  • Loading branch information
CuriousGeorgiy committed Sep 26, 2023
1 parent 9bb67e2 commit 7fbeebd
Show file tree
Hide file tree
Showing 45 changed files with 964 additions and 1,246 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
module: [taps, misc, profile, networking, snapshotting]
module: [misc, profile, networking, snapshotting]
steps:

- name: Set up Go 1.19
Expand Down Expand Up @@ -88,6 +88,11 @@ jobs:
with:
lfs: true

- name: Add rsync
run: |
sudo apt update
sudo apt install rsync -y
- name: Build setup scripts
run: pushd scripts && go build -o setup_tool && popd

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@
### Added
- Added support for [NVIDIA GPU](https://docs.nvidia.com/datacenter/cloud-native/kubernetes/install-k8s.html) in stock-only setup, with [setup script](./scripts/gpu/setup_nvidia_gpu.sh) and [example](./configs/gpu/gpu-function.yaml) Knative deployment
- Bumped gVisor to 20230911.0.
- Upgraded the Firecracker version. [Vanilla Firecracker snapshots](./docs/snapshots.md) are
supported with local snapshot storage. Remote snapshot support is added but unstable (GH-823).
- Added a new `netPoolSize` option to configure the amount of network devices in the Firecracker VM network pool (`10`
by default), which can be used to keep the network initialization off the cold start path of Firecracker VMs.
### Changed
- Changed [system setup script](./scripts/setup_system.sh). NVIDIA helm is now one of the vHive dependencies.
- Disabled the UPF feature for Firecracker snapshots (GH-807), but it is still available in the
[legacy branch](https://github.com/vhive-serverless/vHive/tree/legacy-firecracker-v0.24.0-with-upf-support).
### Fixed
- Removed the limitation on the number of functions instances that can be restored from a single Firecracker snapshot
(previously it was limited to `1`).


## v1.5
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2020 Dmitrii Ustiugov, Plamen Petrov and EASE lab
# Copyright (c) 2023 Georgiy Lebedev, Dmitrii Ustiugov, Plamen Petrov and vHive team
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -46,8 +46,11 @@ test-all: test-subdirs test-orch
test-orch: test test-man

test:
./scripts/clean_fcctr.sh
sudo mkdir -m777 -p $(CTRDLOGDIR) && sudo env "PATH=$(PATH)" /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml 1>$(CTRDLOGDIR)/fccd_orch_noupf_log.out 2>$(CTRDLOGDIR)/fccd_orch_noupf_log.err &
sudo env "PATH=$(PATH)" go test $(EXTRATESTFILES) -short $(EXTRAGOARGS)
./scripts/clean_fcctr.sh
sudo mkdir -m777 -p $(CTRDLOGDIR) && sudo env "PATH=$(PATH)" /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml 1>$(CTRDLOGDIR)/fccd_orch_noupf_log.out 2>$(CTRDLOGDIR)/fccd_orch_noupf_log.err &
sudo env "PATH=$(PATH)" go test $(EXTRATESTFILES) -short $(EXTRAGOARGS) -args $(WITHSNAPSHOTS)
./scripts/clean_fcctr.sh
sudo mkdir -m777 -p $(CTRDLOGDIR) && sudo env "PATH=$(PATH)" /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml 1>$(CTRDLOGDIR)/fccd_orch_upf_log.out 2>$(CTRDLOGDIR)/fccd_orch_upf_log.err &
Expand All @@ -63,6 +66,7 @@ test:
./scripts/clean_fcctr.sh

test-man:
./scripts/clean_fcctr.sh
sudo mkdir -m777 -p $(CTRDLOGDIR) && sudo env "PATH=$(PATH)" /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml 1>$(CTRDLOGDIR)/fccd_orch_noupf_log_man_travis.out 2>$(CTRDLOGDIR)/fccd_orch_noupf_log_man_travis.err &
sudo env "PATH=$(PATH)" go test $(EXTRAGOARGS_NORACE) -run TestParallelServe
sudo env "PATH=$(PATH)" go test $(EXTRAGOARGS) -run TestServeThree
Expand All @@ -87,6 +91,7 @@ test-skip:
./scripts/clean_fcctr.sh

bench:
./scripts/clean_fcctr.sh
sudo mkdir -m777 -p $(CTRDLOGDIR) && sudo env "PATH=$(PATH)" /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml 1>$(CTRDLOGDIR)/fccd_orch_noupf_log_bench.out 2>$(CTRDLOGDIR)/fccd_orch_noupf_log_bench.err &
sudo env "PATH=$(PATH)" go test $(EXTRAGOARGS) -run TestBenchServe -args -iter 1 $(WITHSNAPSHOTS) -benchDirTest configBase -metricsTest -funcName helloworld && sudo rm -rf configBase
./scripts/clean_fcctr.sh
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,6 @@ The software is maintained at the [EASE lab](https://easelab.inf.ed.ac.uk/) in t

* High-level architecture, issues and discussions on GitHub, roadmap: Dmitrii Ustiugov ([GitHub](https://github.com/ustiugov),
[twitter](https://twitter.com/DmitriiUstiugov), [web page](https://ustiugov.github.io));
* Integration with firecracker-containerd [Plamen Petrov](https://github.com/plamenmpetrov);
* Integration with firecracker-containerd [Georgiy Lebedev](https://github.com/curiousgeorgiy) and
[Plamen Petrov](https://github.com/plamenmpetrov);
* Integration with Knative: [Shyam Jesalpura](https://github.com/shyamjesal)
16 changes: 8 additions & 8 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func TestBenchParallelServe(t *testing.T) {
var (
servedTh uint64
pinnedFuncNum int
isSyncOffload bool = true
serveMetrics = make([]*metrics.Metric, *parallelNum)
isSyncOffload = true
serveMetrics = make([]*metrics.Metric, *parallelNum)
upfMetrics = make([]*metrics.Metric, *parallelNum)
images = getAllImages()
parallel = *parallelNum
Expand Down Expand Up @@ -126,9 +126,9 @@ func TestBenchParallelServe(t *testing.T) {
func TestBenchWarmServe(t *testing.T) {
var (
servedTh uint64
pinnedFuncNum int
isSyncOffload bool = true
images = getAllImages()
pinnedFuncNum int
isSyncOffload = true
images = getAllImages()
vmID = 0
memManagerMetrics []*metrics.Metric
)
Expand Down Expand Up @@ -191,9 +191,9 @@ func TestBenchWarmServe(t *testing.T) {
func TestBenchServe(t *testing.T) {
var (
servedTh uint64
pinnedFuncNum int
isSyncOffload bool = true
images = getAllImages()
pinnedFuncNum int
isSyncOffload = true
images = getAllImages()
vmID = 0
memManagerMetrics []*metrics.Metric
)
Expand Down
4 changes: 2 additions & 2 deletions bin/containerd-shim-aws-firecracker
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/firecracker
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/firecracker-containerd
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/firecracker-ctr
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/jailer
Git LFS file not shown
16 changes: 16 additions & 0 deletions configs/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ conn
consumerAddr
consumerPort
containerd
containerd's
Containerd
containerPort
coolDownTime
Expand All @@ -109,6 +110,7 @@ DCNs
De
debian
deployer
deterministically
dev
devmapper
df
Expand Down Expand Up @@ -163,8 +165,10 @@ funcNames
FunctionBench
Fytraki
Gavrielatos
GDB
GECCO
GetGRPCServerWithUnaryInterceptor
Georgiy
GFM
GH
Ghoshal
Expand Down Expand Up @@ -257,6 +261,7 @@ latencies
latSamples
Lausanne
ldquo
Lebedev
Letraset
lfs
Lim
Expand Down Expand Up @@ -289,6 +294,7 @@ microarchitectural
Microarchitecture
microbenchmark
microbenchmarks
microvm
microVMs
minio
MinIO
Expand All @@ -313,6 +319,7 @@ Netrace
NEURALWALKER
neuroevolution
NewServer
nginx
Nicopoulos
Nvidia
nvidia
Expand Down Expand Up @@ -369,6 +376,7 @@ preconfigured
Prefetch
Prefetched
Prefetching
preloading
priyank
Priyank
proc
Expand Down Expand Up @@ -401,11 +409,14 @@ rebasing
repo
Repos
roadmap
rootfs
RPC
rperf
RPerf
RPERF
rsa
rsquo
rsync
runc
runtime
runtimes
Expand All @@ -417,6 +428,7 @@ Scalability
Scalable
schall
Schall
SDK
Seiculescu
Sep
serverfull
Expand All @@ -440,6 +452,7 @@ smi
SMI
sms
SMT
snapshotted
snapshotting
SoC
SOCACHE
Expand Down Expand Up @@ -469,6 +482,7 @@ TestProfileIncrementConfiguration
TestProfileSingleConfiguration
TextFormatter
th
thinpool
Timeseries
timeseriesdb
TimeseriesDB
Expand Down Expand Up @@ -528,13 +542,15 @@ vmIncrStep
VMs
Volos
vSwarm
vsock
warmUpTime
wc
WDDD
webpage
wget
WIDX
WIOSCA
WIP
WithBlock
WithFields
WithInsecure
Expand Down
Loading

0 comments on commit 7fbeebd

Please sign in to comment.