Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This error cannot be resolved when I measure boot time: #4573

Closed
lebron8dong opened this issue Apr 22, 2024 · 4 comments
Closed

This error cannot be resolved when I measure boot time: #4573

lebron8dong opened this issue Apr 22, 2024 · 4 comments
Assignees
Labels
Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` Status: Parked Indicates that an issues or pull request will be revisited later

Comments

@lebron8dong
Copy link

https://github.com/firecracker-microvm/nsdi2020-data

This is the firecracker open source test script.

Excuting an order
cd ./prep
make
Report an error:

cd firecracker && tools/devtool -y build --release
[Firecracker devtool] Starting build (release, musl) ...
Updating crates.io index
warning: spurious network error (2 tries remaining): [7] Couldn't connect to server; class=Net (12)
warning: spurious network error (1 tries remaining): [7] Couldn't connect to server; class=Net (12)
error: failed to fetch https://github.com/rust-lang/crates.io-index

Caused by:
[7] Couldn't connect to server; class=Net (12)
make[1]: *** [Makefile:21: firecracker/build/cargo_target/x86_64-unknown-linux-musl/release/firecracker] Error 101
make[1]: Leaving directory '/home/aiot/nsdi2020-data/prep/firecracker'
make: *** [Makefile:4: all] Error 2

@lebron8dong
Copy link
Author

I changed the mirror source but got the same error.

@lebron8dong
Copy link
Author

lebron8dong commented Apr 24, 2024

How to measure the boot time of firecracker?

@JonathanWoollett-Light
Copy link
Contributor

How to measure the boot time of firecracker?

To measure boot time with recent versions of Firecracker it may be useful to look at https://github.com/firecracker-microvm/firecracker/blob/main/tests/integration_tests/performance/test_boottime.py. If you can use these tests it is highly preferred to https://github.com/firecracker-microvm/nsdi2020-data.

@ShadowCurse ShadowCurse assigned ShadowCurse and roypat and unassigned ShadowCurse Jul 8, 2024
@ShadowCurse ShadowCurse added Status: Parked Indicates that an issues or pull request will be revisited later Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` labels Jul 8, 2024
@roypat
Copy link
Contributor

roypat commented Jul 12, 2024

Hi @lebron8dong,
As Jonathan mentioned, to measure the boottime of an up-to-date Firecracker binary, we recommend using https://github.com/firecracker-microvm/firecracker/blob/main/tests/integration_tests/performance/test_boottime.py. This can be run through our test orchestration via

AWS_EMF_ENVIRONMENT=local AWS_EMF_NAMESPACE=local tools/devtool -y test -- integration_tests/performance/test_boottime.py::test_boottime

which will print 10 boottime samples per test case (and this number can be easily adjusted in test_boottime.py itself).

However, if you do want to run the (almost) exact setup used in the paper from 2020, you can try applying the following diff to the nsdata-2020 repository, and then following the instruction in the README.md. With the below changes, I was able to re-run the old benchmarks. Please do keep in mind that those will be using Firecracker 0.20.0, which is 4 years old and will not contain any of the improvement done since then.

diff --git a/README.md b/README.md
index 735f363..017b9cc 100644
--- a/README.md
+++ b/README.md
@@ -35,8 +35,8 @@ sudo apt update
 sudo apt install -y \
     iperf3 \
     jq \
-    hwloc-nox
-    numactl \
+    hwloc-nox \
+    numactl
\```
 
 ## Running the tests
diff --git a/prep/img/Makefile b/prep/img/Makefile
index 7e2b639..7ce36ef 100644
--- a/prep/img/Makefile
+++ b/prep/img/Makefile
@@ -17,7 +17,7 @@ TARGETS += ../../img/bench-ssh-vmlinuz
 TARGETS += ../../img/bench-ssh-disk.img
 
 LK := ../../bin/linuxkit
-LOOP ?= /dev/loop0
+LOOP ?= /dev/loop21
 
 build: $(TARGETS)
 
diff --git a/prep/linuxkit/Makefile b/prep/linuxkit/Makefile
index da18cf7..327ab90 100644
--- a/prep/linuxkit/Makefile
+++ b/prep/linuxkit/Makefile
@@ -1,6 +1,6 @@
 # Quick hacky makefile to build linuxkit with docker
 
-URL := https://github.com/linuxkit/linuxkit/releases/download/v0.7/linuxkit-linux-amd64
+URL := https://github.com/linuxkit/linuxkit/releases/download/v1.0.0/linuxkit-linux-amd64
 
 ../../bin/linuxkit:
        curl -fsSL -o $@ $(URL)
diff --git a/prep/qemu/Dockerfile b/prep/qemu/Dockerfile
index 9f7f6f4..51f2c4e 100644
--- a/prep/qemu/Dockerfile
+++ b/prep/qemu/Dockerfile
@@ -11,7 +11,7 @@ RUN apt update && \
         python \
         libc6-dev-i386
 
-RUN git clone git://git.qemu.org/qemu.git && \
+RUN git clone https://github.com/qemu/qemu && \
     cd qemu && \
     git checkout v4.2.0

I'll go ahead and close this issue, but please feel free to reopen it if you have further questions.
Thanks,
Patrick

@roypat roypat closed this as completed Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` Status: Parked Indicates that an issues or pull request will be revisited later
Projects
None yet
Development

No branches or pull requests

4 participants