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

Support snapshotting simulated workloads #113

Merged
merged 3 commits into from
Oct 31, 2022
Merged

Conversation

fabianishere
Copy link
Member

Summary

This pull request adds support for snapshotting simulated workloads in OpenDC, which
serves as the basis for virtual machine migration/suspension support.

Part of #32

Implementation Notes ⚒️

  • Support synchronous update of FlowStage
  • Report exceptions in onStop as suppressed
  • Add support for snapshotting workloads

External Dependencies 🍀

  • N/A

Breaking API Changes ⚠️

  • N/A

This change adds a new method to `FlowStage` called `sync()` which
enables users to synchronously update the stage at the current
timestamp.

This functionality is neccessary to support snapshotting since we need
to synchronize the state of the `FlowStage` before creating a snapshot
of the workload.
This change updates the implementation of `SimMachineContext` to report
exceptions thrown in `onStop` as suppressed exceptions if an exception
caused the workload to stop.
@fabianishere fabianishere added kind/feature New feature or request area/simulator Changes related to simulation components labels Oct 31, 2022
@fabianishere fabianishere added this to the v3.0 milestone Oct 31, 2022
@fabianishere fabianishere self-assigned this Oct 31, 2022
This change updates the interface of `SimWorkload` to support
snapshotting workloads. We introduce a new method `snapshot()` to this
interface which returns a new `SimWorkload` that can be started at a
later point in time and on another `SimMachine`, which continues
progress from the moment the workload was snapshotted.
@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Merging #113 (c9750e5) into master (b96acc6) will increase coverage by 0.11%.
The diff coverage is 80.24%.

@@             Coverage Diff              @@
##             master     #113      +/-   ##
============================================
+ Coverage     71.10%   71.22%   +0.11%     
- Complexity     2225     2231       +6     
============================================
  Files           373      373              
  Lines          9833     9879      +46     
  Branches       1045     1052       +7     
============================================
+ Hits           6992     7036      +44     
- Misses         2533     2536       +3     
+ Partials        308      307       -1     
Impacted Files Coverage Δ
...opendc/simulator/compute/kernel/SimHypervisor.java 89.03% <0.00%> (-0.29%) ⬇️
...c/simulator/compute/workload/SimFlopsWorkload.java 87.50% <16.66%> (-6.62%) ⬇️
...rg/opendc/simulator/compute/workload/SimTrace.java 84.27% <56.25%> (-3.65%) ⬇️
...g/opendc/simulator/compute/SimAbstractMachine.java 89.00% <88.88%> (+7.00%) ⬆️
...c/simulator/compute/workload/SimChainWorkload.java 86.84% <94.87%> (+1.93%) ⬆️
...ain/kotlin/org/opendc/compute/simulator/SimHost.kt 83.33% <100.00%> (-0.21%) ⬇️
...simulator/compute/workload/SimRuntimeWorkload.java 88.23% <100.00%> (+1.27%) ⬆️
...ain/java/org/opendc/simulator/flow2/FlowStage.java 93.02% <100.00%> (+0.34%) ⬆️
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@fabianishere fabianishere merged commit 9d06fb0 into master Oct 31, 2022
@fabianishere fabianishere deleted the feat/snapshotting branch October 31, 2022 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/simulator Changes related to simulation components kind/feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant