-
Notifications
You must be signed in to change notification settings - Fork 2k
Measure jailer startup performance #5282
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
Measure jailer startup performance #5282
Conversation
3b16c6e
to
2e99a59
Compare
0b5d3aa
to
65d8ee3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5282 +/- ##
==========================================
+ Coverage 82.86% 82.91% +0.05%
==========================================
Files 250 250
Lines 26902 26897 -5
==========================================
+ Hits 22292 22302 +10
+ Misses 4610 4595 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1d2e38c
to
a9464ba
Compare
do you have a link where I could see the metrics? |
a9464ba
to
9e5b112
Compare
Do we actually need the special binary? Doesn't firecracker already report this as |
@roypat I added it to make the test easier. Starting the whole FC and parsing it's output will be more complicated and slower. Considering this test is only for jailer, I think it is better to not touch FC. |
It'd just be def test_jailer_perf(microvm_factory):
microvm = microvm_factory.spawn()
metrics = microvm.flush_metrics()
emit_metrics (metrics['parent_cpu_time_us'], "microseconds") no? Looks a lot simpler to me than a whole new test binary and modifying the jailer tbh |
hmm, I didn't even remember these metrics exist. But there is still a ting of starting a lot of jails in a loop. With VMs, there is a whole setup process with jailing rootfs, kernel and so on which is totally unnecessary. So as I said, for jailer tests, it is better to use custom binaries (they are small and easy to understand anyway). |
No, if you just start a Firecracker process it won't copy the rootfs and kernel image, it'll literally just start up a firecracker process and have it listen on the API server socket. The rest only happens when you boot the microvm, which you wouldn't do in this test. But arguably, for a real usecase, wouldn't we want to account for the jailing of rootfs/kernel image/snapshot anyway though? |
9e5b112
to
104ef8b
Compare
Maybe in additional tests. Current one is only concerned with amount of bind mounts in a system. |
86ef0c4
to
50a71d1
Compare
e4ca6ae
to
52c3062
Compare
As it appeared, the |
e43f956
to
867621f
Compare
867621f
to
39ed26d
Compare
Now jailer will not complain if the executable does not contain `firecracker` in it's name. This restriction was unnecessary and it's removal is not a breaking change. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
a726b68
to
61f890c
Compare
Add note about new jailer executable requirements. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Remove explicit panic on error. Let the error be returned from the main. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
This binary just outputs the start and end time of the jailer startup. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
61f890c
to
fd0c5da
Compare
The test measures jailer startup time. It is parametrized by the number of parallel jailers starting up and the number of bind mount points present in the system. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Add new entry for the jailer tests in the performance bk pipeline. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
fd0c5da
to
8bf5e63
Compare
Changes
Update jailer requirements on the executable name and permissions. Now it does not need to contain
firecracker
in it's name, but must be marked as executable.Add jailer startup performance test. The test is parametrized on the number of jailers started and the number of bind mounts present in the system.
Reason
We want to know what is the overhead of a jailer in isolation. Since usually there are multiple jailed VMs on the system, the test is parametrized by the number of jailers started.
The reason for adding measurements with bind mounts is because it slows down the jailer startup time. The more bind mounts are present, the more contention there is in the kernel. At the same time, bind mounts are frequently created per VM in the production environment.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.