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

[tests] Network and cpu utilization improvements #4456

Merged
merged 13 commits into from
Feb 21, 2024

Conversation

ShadowCurse
Copy link
Contributor

Changes

Minor clean up of network and cpu utilization testing code.
Now cpu utilization is tracked for all threads.

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

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this
    PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

@ShadowCurse ShadowCurse self-assigned this Feb 16, 2024
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (21f0dea) 81.63% compared to head (a75a2ac) 81.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4456   +/-   ##
=======================================
  Coverage   81.63%   81.63%           
=======================================
  Files         243      243           
  Lines       29789    29789           
=======================================
  Hits        24319    24319           
  Misses       5470     5470           
Flag Coverage Δ
4.14-c5n.metal 78.95% <ø> (?)
4.14-c7g.metal ?
4.14-m5d.metal ?
4.14-m5n.metal 78.94% <ø> (?)
4.14-m6a.metal 78.08% <ø> (ø)
4.14-m6g.metal 77.03% <ø> (ø)
4.14-m6i.metal 78.94% <ø> (ø)
4.14-m7g.metal 77.03% <ø> (?)
5.10-c5n.metal 81.61% <ø> (?)
5.10-c7g.metal ?
5.10-m5d.metal ?
5.10-m5n.metal 81.60% <ø> (?)
5.10-m6a.metal 80.83% <ø> (ø)
5.10-m6g.metal 79.92% <ø> (ø)
5.10-m6i.metal 81.59% <ø> (ø)
5.10-m7g.metal 79.92% <ø> (?)
6.1-c5n.metal 81.61% <ø> (?)
6.1-m5n.metal 81.60% <ø> (?)
6.1-m6a.metal 80.83% <ø> (ø)
6.1-m6g.metal 79.92% <ø> (ø)
6.1-m6i.metal 81.59% <ø> (ø)
6.1-m7g.metal 79.92% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ShadowCurse ShadowCurse force-pushed the net_perf_upgrades branch 4 times, most recently from b57909e to 4fe11bf Compare February 19, 2024 09:55
@ShadowCurse ShadowCurse marked this pull request as ready for review February 19, 2024 09:55
@ShadowCurse ShadowCurse added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Feb 19, 2024
Copy link
Contributor

@roypat roypat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me, let's just double check that the additional metrics don't break A/B-tests

tests/framework/utils_iperf.py Outdated Show resolved Hide resolved
@ShadowCurse ShadowCurse force-pushed the net_perf_upgrades branch 3 times, most recently from 27e4a36 to 166a938 Compare February 19, 2024 22:31
roypat
roypat previously approved these changes Feb 20, 2024
@ShadowCurse ShadowCurse force-pushed the net_perf_upgrades branch 2 times, most recently from 13d9a6a to 38614b6 Compare February 20, 2024 10:40
roypat
roypat previously approved these changes Feb 20, 2024
Fix style in the test_dependencies.py

Signed-off-by: Egor Lazarchuk <[email protected]>
The additional iterations for the ping test were introduced
in order to decrease false positive rate of the A/B tests.
With automatic retries of A/B tests these additional
iterations are not needed anymore.

Signed-off-by: Egor Lazarchuk <[email protected]>
Move GUEST_MEM_MIB and GUEST_VCPUS into network_microvm fixture.
GUEST_VCPUS was not used anywere. GUEST_MEM_MIB was only used in the
fixture itself.

Signed-off-by: Egor Lazarchuk <[email protected]>
Move test specific global variables into the test they are used in.
This way all test related info is inside the test itself.

Signed-off-by: Egor Lazarchuk <[email protected]>
Remove TcpIPerf3Test class as it is only used in one test
and only contains some parameters for inner class.

Signed-off-by: Egor Lazarchuk <[email protected]>
These vars were not used anywhere.

Signed-off-by: Egor Lazarchuk <[email protected]>
Replace mappings of iperf3 modes with iperf3 flags with
separate methods. This simplifies the process of
getting correct mode/flag for specific client.

Signed-off-by: Egor Lazarchuk <[email protected]>
Remove SERVER_STARTUP_TIME_SEC as it is only used in one function.
Use the values directly instead.

Signed-off-by: Egor Lazarchuk <[email protected]>
Remove classes/methods not used anywhere in the codebase.

Signed-off-by: Egor Lazarchuk <[email protected]>
Cpu utilization was gathered per thread name per thread PID. But
thread PID or name never changes, so tracking per thread name is
enough.
Previous data format:
```
{
  "thread_name": {
    "thread_pid": util,
  }
}
```
New data format:
```
{
  "thread_name": util,
}
```

Also renamed get_cpu_percent in 2 places to get_cpu_utilization and
track_cpu_utilization to have a better separation.

Signed-off-by: Egor Lazarchuk <[email protected]>
Add metrics for all fc threads cpu utilization.

Signed-off-by: Egor Lazarchuk <[email protected]>
ProcessManager had only static methods. Removing
it simplifies the code a bit.

Signed-off-by: Egor Lazarchuk <[email protected]>
We don't want to test cpu utilization in a/b test.

Signed-off-by: Egor Lazarchuk <[email protected]>
@ShadowCurse ShadowCurse merged commit 4d7b7e0 into firecracker-microvm:main Feb 21, 2024
6 of 7 checks passed
@ShadowCurse ShadowCurse deleted the net_perf_upgrades branch February 21, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants