summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-02build: Update build dependenciesFabian Mastenbroek
2021-11-02ci: Add workflows for testing Java and Gradle EA releasesFabian Mastenbroek
This change adds two workflows that test weekly whether OpenDC builds against the latest Gradle release candidate (RC) and Java early access (EA) release.
2021-11-02ci: Update Java Github Actions workflowsFabian Mastenbroek
This change updates the Github Actions workflows for the Java/Kotlin part of the project. We now use the gradle-build-action from Gradle to build the project, which does caching for us. In addition, we update the Codecov action to version 2, since the old version is deprecated and will stop working next year.
2021-11-02build(ui): Bump ansi-regex to 5.0.1 (#38)dependabot[bot]
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02refactor(trace): Support gaps in trace dataFabian Mastenbroek
This change updates the implementation of the trace converter and SimTrace implementation to support cases where there is a gap between samples in the trace data. This change allows users to specify what to do in case samples are missing in the trace. The available options are specified in `SimTrace.FillMode`. Currently, we support either carrying the previous value forward or set the usage to zero.
2021-10-25merge: Improve the OpenDC compute model (#37)Fabian Mastenbroek
This pull request contains various improvements to the OpenDC compute simulation model. - Support filtering hosts based on CPU capacity - Do not allocate lambda in fast-path - Redesign VM interference algorithm - Report provisioning time of virtual machines - Prevent allocations during collection cycle - Use correct flow input capacity for counters - Support running workloads without coroutines **Breaking API Changes** - `VirtualMachine` now requires `cpuCapacity` parameter. - `VmInterferenceModel` needs to be constructed using `VmInterferenceModel.Builder` and can't be passed a list of groups anymore. - Scheduling latency is not collected anymore. Instead, use the boot time and provisioning time to derive the scheduling latency. - Telemetry data is recorded using `*TableReader` interfaces as opposed to the `*Data` classes. These classes are re-used per row and should not be shared with other threads, since the underlying data may change. - `SimMachine` does not implement `AutoCloseable` anymore. Machines can be removed from a `SimHypervisor` using the `removeMachine` method. - `SimMachine.run` is moved to an extension method called `runWorkload`. Users can now also choose to run a workload using the asynchronous `SimMachine.startWorkload`.
2021-10-25refactor(simulator): Support running workloads without coroutinesFabian Mastenbroek
This change updates the SimMachine interface to drop the coroutine requirement for running a workload on a machines. Users can now asynchronously start a workload and receive notifications via the workload callbacks. Users still have the possibility to suspend execution during workload execution by using the new `runWorkload` method, which is implemented on top of the new `startWorkload` primitive.
2021-10-25fix(simulator): Use correct flow input capacity for countersFabian Mastenbroek
This change fixes an issue with the FlowMultiplexer implementation where the capacity of each flow input was equal to the capacity of all flow outputs. Now, the user can specify the capacity of the input, which will be used to correctly compute the active and idle time.
2021-10-25perf(telemetry): Prevent allocations during collection cycleFabian Mastenbroek
This change redesigns the ComputeMonitor interface to reduce the number of memory allocations necessary during a collection cycle.
2021-10-25feat(telemetry): Report provisioning time of virtual machinesFabian Mastenbroek
This change adds support for collecting the provisioning time of virtual machines in addition to their boot time.
2021-10-25perf(compute): Redesign VM interference algorithmFabian Mastenbroek
This change redesigns the virtual machine interference algorithm to have a fixed memory usage per `VmInterferenceModel` instance. Previously, for every interference domain, a copy of the model would be created, leading to OutOfMemory errors when running multiple experiments at the same time.
2021-10-25perf(telemetry): Do not allocate lambda in fast-pathFabian Mastenbroek
This commit changes the lookup for host and server aggregators to use `getOrPut` instead of `computeIfAbsent`. The former will inline the lambda and not cause any memory allocation in the fast-path (e.g., the key exists), while the latter always allocates lambda for constructing the aggregator.
2021-10-25feat(compute): Support filtering hosts based on CPU capacityFabian Mastenbroek
This change allows users to create servers with a smaller CPU capacity than the host, by specifying the CPU capacity via metadata. This also allows filtering hosts based on their available CPU capacity.
2021-10-25merge: Support conversion from Azure traces to OpenDC traces (#36)Fabian Mastenbroek
This pull request adds support for converting Azure traces to the OpenDC trace format. * Support GZIP files in Azure trace * Fix timestamp retrieval for Azure trace * Add column for CPU capacity in OpenDC format * Support conversion from Azure trace format
2021-10-25feat(trace): Support conversion from Azure trace formatFabian Mastenbroek
This change adds support for converting the Azure VM traces into the OpenDC trace format.
2021-10-25feat(trace): Add column for CPU capacity in OpenDC formatFabian Mastenbroek
This change adds a new column to resource table of the OpenDC trace format for the CPU capacity provisioned for a virtual machine, so that this capacity can be assigned to the virtual machine during simulation.
2021-10-25fix(trace): Fix timestamp retrieval for Azure traceFabian Mastenbroek
This change addresses an issue where the timestamps in the Azure trace where not retrieved correctly from the files.
2021-10-25refactor(trace): Support GZIP files in Azure traceFabian Mastenbroek
This change updates the Azure VM trace format implementation to directly support loading a trace in GZIP format in order to prevent users having to decompress the trace files so they can be opened by OpenDC.
2021-10-25merge: Address several regressions in simulatorFabian Mastenbroek
This pull request addresses several regressions that have been introduced in the past few pull requests. - Fix queue resizing logic - Change clock resolution from milliseconds to nanoseconds in `OtelClockAdapter` - Compute energy usage in absence of convergence - Fix duplicate classpath entries - Fix release workflow **Breaking API Changes** - `OtelClockAdapter` now exports time in nanoseconds as the method contract describes.
2021-10-25ci: Fix release workflowFabian Mastenbroek
This change fixes an issue with a missing whitespace in the release workflow, causing the workflow to not be parsed correctly.
2021-10-25build(jmh): Fix duplicate classpath entriesFabian Mastenbroek
This change fixes an issue with the JMH plugin where entries would be included twice on the classpath or entries that did not belong on the classpath were also included.
2021-10-25fix(simulator): Compute energy usage in absence of convergenceFabian Mastenbroek
This change addresses an issue where energy usage was not computed correctly if the machine performed no work in between collection cycles.
2021-10-25fix(telemetry): Fix clock resolutionFabian Mastenbroek
This change updates the Clock adapter for OpenTelemetry to return the current time in nanoseconds as specified by the method contract (as opposed to milliseconds).
2021-10-25fix(simulator): Fix queue resizing logicFabian Mastenbroek
This change fixes two issues with the resizing logic of the specialized queue implementations used by the FlowEngine implementation.
2021-10-25merge: Integrate v2.1 progress into public repositoryFabian Mastenbroek
This pull request integrates the changes planned for the v2.1 release of OpenDC into the public Github repository in order to sync the progress of both repositories.
2021-10-21feat(ui): Add tooltip to graphs in portfolio resultsKoen Teuwen
This change adds a tooltip to the graphs in the portfolio results, in order to make it easier to read exact values from the graphs.
2021-10-21fix(ui): Fix version number in package.jsonFabian Mastenbroek
This change fixes the version number in package.json which contained the suffix "-rc1", which is apparently not supported by npm.
2021-10-08merge: Performance improvements for flow engineFabian Mastenbroek
This pull request applies multiple performance improvements for the flow engine and compute simulator. * Optimize SimTraceWorkload (by storing fragments using several arrays) * Skip fair-share algorithm if capacity remaining * Count interference for multiplexer inputs * Simplify FlowSink implementation * Do not update outputs if rate is unchanged * Eliminate ArrayList iteration overhead * Optimize clock storage * Specialize FlowEngine queues * Eliminate clock access in hot path **Breaking API Changes** * `SimTraceWorkload` now accepts a `SimTrace` as parameter. This trace can be constructed using fragments or directly using builder class. Internally, the trace is now stored using several arrays.
2021-10-08perf(simulator): Eliminate clock access in hot pathFabian Mastenbroek
This change eliminates the clock calls in the hot path, by passing the current timestamp directly as method parameter.
2021-10-08perf(simulator): Specialize FlowEngine queuesFabian Mastenbroek
This change specializes the queues used by the FlowEngine implementation in order to reduce the overhead caused by type-erasure of generics.
2021-10-08perf(simulator): Optimize clock storageFabian Mastenbroek
2021-10-08perf(simulator): Eliminate ArrayList iteration overheadFabian Mastenbroek
This change eliminates the overhead caused by ArrayList iteration in the MaxMinFlowMultiplexer class.
2021-10-08perf(simulator): Do not update outputs if rate is unchangedFabian Mastenbroek
2021-10-08refactor(simulator): Simplify FlowSink implementationFabian Mastenbroek
This change simplifies the FlowSink implementation by not relying on the AbstractFlowConsumer, but instead implementing the FlowConsumer interface itself.
2021-10-08fix(simulator): Count interference for multiplexer inputsFabian Mastenbroek
This change updates the SimAbstractHypervisor and MaxMinFlowMultiplexer to count interference of multiplexer inputs, instead of only counting them for the scheduler as a whole.
2021-10-08perf(simulator): Skip fair-share algorithm if capacity remainingFabian Mastenbroek
This change updates the MaxMinFlowMultiplexer implementation to skip the fair-share algorithm in case the total demand is lower than the available capacity. In this case, no re-division of capacity is necessary.
2021-10-08perf(simulator): Optimize SimTraceWorkloadFabian Mastenbroek
This change improves the performance of the SimTraceWorkload class by changing the way trace fragments are read and processed by the CPU consumers.
2021-10-05merge: Add benchmarks for Capelin experimentsFabian Mastenbroek
This pull request adds a JMH benchmark for the Capelin experiments, in order to concretely measure the bottlenecks in these experiments. * Do not prune invocations on sync engine invocation * Add benchmark for Capelin experiment * Extract scheduler for max min multiplexer * Only sort outputs on capacity change
2021-10-05perf(simulator): Only sort outputs on capacity changeFabian Mastenbroek
This change removes the sorting step for the outputs in the scheduling procedure for the max min multiplexer. This step is only necessary when the capacity of one of the outputs changes, which does not happen often.
2021-10-05perf(simulator): Ignore sync pulls without changesFabian Mastenbroek
2021-10-05refactor(simulator): Extract scheduler for max min multiplexerFabian Mastenbroek
2021-10-05perf(simulator): Manage deadlines centrally in max min muxFabian Mastenbroek
This change updates the MaxMinFlowMultiplexer implementation to centrally manage the deadlines of the `FlowSource`s as opposed to each source using its own timers. For large amounts of inputs, this is much faster as the multiplexer already needs to traverse each input on a timer expiration of an input.
2021-10-05perf(experiments): Add benchmark for Capelin experimentFabian Mastenbroek
2021-10-05perf(simulator): Do not prune invocations on sync engine invocationFabian Mastenbroek
2021-10-03merge: Migrate to flow-based simulation for low-level modelsFabian Mastenbroek
This pull request converts the `opendc-simulator-resources` module into a flow simulator and adapts the existing low-level models (e.g., CPU, network, disk) to this new flow simulator. The flow simulator works differently from the uniform resource consumption model, in that it models flow through a system of connections, as opposed to resource consumptions. Concretely, this means that while in the uniform resource consumption model, consumptions with the same usage are propagated to the resources, in the flow simulator, only changes to the flow in the system are propagated. Overall, this leads to less updates in the system and therefore higher performance. The benchmarks shows that the new implementation obtains more than double the performance of the old implementation. We have focused in the new implementation on reducing the amount of work and memory allocations/loads/stores per updates. * Migrate from kotlinx-benchmark to jmh-gradle (for better profiling support) * Use longer traces for benchmarks (to prevent measuring the benchmark overhead) * Use direct field access for perf-sensitive code * Combine work and deadline to duration * Add support for pushing flow from context (to eliminate the allocation for every `SimResourceCommand`) * Reduce memory allocations in SimResourceInterpreter, by revamping the way timers are allocated. * Simplify max-min aggregator implementation (by utilizing the new push mechanism) * Invoke consumer callback on every invalidation (in order to propagate changes downstream) * Lazily push changes to resource context (by not updating the flow rate immediately after a push, but only after an update) * Remove onUpdate callback * Merge distributor and aggregator into switch * Separate push and pull flags * Remove failure callback from FlowSource * Create separate callbacks for remaining events * Make convergence callback optional * Reduce field accesses in FlowConsumerContextImpl * Optimize hot path in SimTraceWorkload * Expose CPU time counters directly on hypervisor * Optimize telemetry collection **Breaking API Changes** * The entire `opendc-simulator-resources` module has been replaced by the `opendc-simulator-flow` module. * `SimHypervisor.Listener` has been removed in favour of a new interface that exposes the performance counters of the hypervisor directly. To listen for convergence, use `FlowConvergenceListener`.
2021-10-03perf(compute): Optimize telemetry collectionFabian Mastenbroek
This change optimizes the telemetry collection in the SimHost class. Previously, there was significant overhead in collecting the metrics of this and associated classes due large `Attributes` object that did not cache accesses to `hashCode()`. We now wrap this object and manually cache the hash code.
2021-10-03feat(simulator): Expose CPU time counters directly on hypervisorFabian Mastenbroek
This change adds a new interface to the SimHypervisor interface that exposes the CPU time counters directly. These are derived from the flow counters and will be used by SimHost to expose them via telemetry.
2021-10-03perf(simulator): Optimize hot path in SimTraceWorkloadFabian Mastenbroek
This change optimizes the hot path of the SimTraceWorkload class. This class is used by multiple experiments to replay workload traces and consumes a considerable amount of time of the total time of the experiments. By inlining the isExpired method, marking the properties on the Fragment class as field, and caching several properties locally in the class, we reduce the amount of virtual method calls in the hot path.
2021-10-03perf(simulator): Reduce field accesses in FlowConsumerContextImplFabian Mastenbroek
This change updates the implementation of FlowConsumerContextImpl to reduce the number of field accesses by storing the flags of the connection inside a single integer.
2021-10-03perf(simulator): Make convergence callback optionalFabian Mastenbroek
This change adds two new properties for controlling whether the convergence callbacks of the source and consumer respectively should be invoked. This saves a lot of unnecessary calls for stages that do not have any implementation of the `onConvergence` method.