summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-flow/src
AgeCommit message (Collapse)Author
2025-07-22Updated workload schema (#360)Dante Niewenhuis
2025-07-15Implements Virtualization overhead modelling (#357)Niels Thiele
2025-07-15Add configurable resource distribution at host level (#355)Niels Thiele
2025-07-15multi gpu support (#351)Niels Thiele
2025-06-22Implemented Single GPU Support & outline of host-level allocation policies ↵Niels Thiele
(#342) * renamed performance counter to distinguish different resource types * added GPU, modelled similar to CPU * added GPUs to machine model * list of GPUs instead of single instance * renamed memory speed to bandwidth * enabled parsing of GPU resources * split powermodel into cpu and GPU powermodel * added gpu parsing tests * added idea of host level scheduling * added tests for multi gpu parsing * renamed powermodel to cpupowermodel * clarified naming of cpu and gpu components * added resource type to flow suplier and edge * added resourcetype * added GPU components and resource type to fragments * added GPU to workload and updated resource usage retrieval * implemented first version of multi resource * added name to workload * renamed perfomance counters * removed commented out code * removed deprecated comments * included demand and supply into calculations * resolving rebase mismatches * moved resource type from flowedge class to common package * added available resources to machinees * cleaner separation if workload is started of simmachine or vm * Replaced exception with dedicated enum * Only looping over resources that are actually used * using hashmaps to handle resourcetype instead of arrays for readability * fixed condition * tracking finished workloads per resource type * removed resource type from flowedge * made supply and demand distribution resource specific * added power model for GPU * removed unused test setup * removed depracated comments * removed unused parameter * added ID for GPU * added GPUs and GPU performance counters (naively) * implemented capturing of GPU statistics * added reminders for future implementations * renamed properties for better identification * added capturing GPU statistics * implemented first tests for GPUs * unified access to performance counters * added interface for general compute resource handling * implemented multi resource support in simmachine * added individual edge to VM per resource * extended compute resource interface * implemented multi-resource support in PSU * implemented generic retrieval of computeresources * implemented mult-resource suppport in vm * made method use more resource specific * implemented simple GPU tests * rolled back frquency and demand use * made naming independent of used resource * using workloads resources instead of VMs to determine available resource * implemented determination of used resources in workload * removed logging statements * implemented reading from workload * fixed naming for host-level allocation * fixed next deadline calculation * fixed forwarding supply * reduced memory footprint * made GPU powermodel nullable * maded Gpu powermodel configurable in topology * implemented tests for basic gpu scheduler * added gpu properties * implemented weights, filter and simple cpu-gpu scheduler * spotless apply * spotless apply pt. 2 * fixed capitalization * spotless kotlin run * implemented coloumn export * todo update * removed code comments * Merged PerformanceCounter classes into one & removed interface * removed GPU specific powermodel * Rebase master: kept both versions of TopologyFactories * renamed CpuPowermodel to resource independent Powermodel Moved it from Cpu package to power package * implementated default of getResourceType & removed overrides if possible * split getResourceType into Consumer and Supplier * added power as resource type * reduced supply demand from arrayList to single value * combining GPUs into one large GPU, until full multi-gpu support * merged distribution policy enum with corresponding factory * added comment * post-rebase fixes * aligned naming * Added GPU metrics to task output * Updates power resource type to uppercase. Standardizes the `ResourceType.Power` enum to `ResourceType.POWER` for consistency with other resource types and improved readability. * Removes deprecated test assertions Removes commented-out assertions in GPU tests. These assertions are no longer needed and clutter the test code. * Renames MaxMinFairnessStrategy to Policy Renames MaxMinFairnessStrategy to MaxMinFairnessPolicy for clarity and consistency with naming conventions. This change affects the factory and distributor to use the updated name. * applies spotless * nulls GPUs as it is not used
2025-03-18Performance updates (#314)Dante Niewenhuis
2025-03-14Added more battery policies (#312)Dante Niewenhuis
* some updates * Updates * Added comments and renamed variables * Ran Spotless
2025-02-17Fixed bugs (#304)Dante Niewenhuis
2025-02-03Added Batteries (#300)Dante Niewenhuis
* Batteries are implemented. Small problem with the deletion when running larger workloads. Added mock files for the Battery implementation. Updated the Carbon Model to allow for multiple receivers of CarbonIntensity * Implemented batteries in OpenDC. * Spotless applied
2025-01-31Updated the FlowEventQueue to be easier to understand (#299)Dante Niewenhuis
2025-01-24Added Fragment scaling (#296)Dante Niewenhuis
* Added maxCpuDemand to TraceWorkload, don't know if this will be needed so might remove later. Updated SimTraceWorkload to properly handle creating checkpoints Fixed a bug with the updatedConsumers in the FlowDistributor Implemented a first version of scaling the runtime of fragments. * small update * updated tests to reflect the changes in the checkpointing model * Updated the checkpointing tests to reflect the changes made * updated wrapper-validation-action * Applied spotless
2025-01-07Updated the FlowDistributor (#285)Dante Niewenhuis
* Updated the FlowDistributor to work in more cases and be more performant. * Removed old FlowDistributor
2024-12-17Updated the FlowEngine so nodes that have to be updated in the current cycle ↵Dante Niewenhuis
cannot be scheduled twice. (#284) Updated the FlowNodeQueue
2024-12-12Solved a small bug that let FlowNodes update while they are in a closed ↵Dante Niewenhuis
state. (#283)
2024-12-06Renamed Multiplexer to FlowDistributor (#282)Dante Niewenhuis
* Restructured opendc-simulator-flow. Renamed Multiplexer to FlowDistributor. * spotless applied * Added FlowDistributor topologies back
2024-12-06Added 9 new tests specifically testing the Multiplexer. This assumes the ↵Dante Niewenhuis
Multiplexer is using MaxMinFairness given that this is currently the default and only fairness available in OpenDC. (#280)
2024-11-29Multiplexer update (#278)Dante Niewenhuis
* Fixed the Multiplexer.java to properly divide the supply over the different consumers. Fixed a bug where fragments were being loaded in reversed order. * Optimized the Multiplexer.java, by only updating the supply of the consumer that updated its demand when possible.
2024-11-28Removed the IndexOf function from Multiplexer.java, by adding a ↵Dante Niewenhuis
consumerIndex variable to FlowEdge.java (#275)
2024-11-26Streamlined the FlowNetwork for better performance (#273)Dante Niewenhuis
2024-11-07Fixed power source bug (#265)Dante Niewenhuis
* Fixed a small bug making the power source not update energy usage properly * small update to the test
2024-10-29Updated all floats to Doubles (#257)Dante Niewenhuis
* Updated tests Changed all floats into doubles to have consistency over the whole framework Made a small update to the multiplexer to better push through supply and demand Fixed small typo Updated M3SA paths. fixed merge conflicts Removed unused components. Updated tests. Improved checkpointing model Improved model, started with SimPowerSource implemented FailureModels and Checkpointing First working version midway commit first update All simulation are now run with a single CPU and single MemoryUnit. multi CPUs are combined into one. This is for performance and explainability. * Updated test memory
2024-10-25Rewrote the FlowEngine (#256)Dante Niewenhuis
* Removed unused components. Updated tests. Improved checkpointing model Improved model, started with SimPowerSource implemented FailureModels and Checkpointing First working version midway commit first update All simulation are now run with a single CPU and single MemoryUnit. multi CPUs are combined into one. This is for performance and explainability. * fixed merge conflicts * Updated M3SA paths. * Fixed small typo
2024-03-05Updated package versions, updated web server tests. (#207)Dante Niewenhuis
* Updated all package versions including kotlin. Updated all web-server tests to run. * Changed the java version of the tests. OpenDC now only supports java 19. * small update * test update * new update * updated docker version to 19 * updated docker version to 19
2022-12-07bug(sim/flow): Record capacity changes on idle outletsFabian Mastenbroek
This change fixes an issue with the `ForwardingFlowMultiplexer` where the capacity of new outlets were not recorded correctly due to no handler being attached to idle outlets, causing the `pull` events to be disregarded. This bug manifested in an issue where the CPU counters where reporting negative values. This was caused by the CPU usage/demand being subtracted from a zero capacity.
2022-11-13refactor: Replace use of CoroutineContext by DispatcherFabian Mastenbroek
This change replaces the use of `CoroutineContext` for passing the `SimulationDispatcher` across the different modules of OpenDC by the lightweight `Dispatcher` interface of the OpenDC common module.
2022-11-13refactor(sim/core): Re-implement SimulationScheduler as DispatcherFabian Mastenbroek
This change updates the `SimulationScheduler` class to implement the `Dispatcher` interface from the OpenDC Common module, so that OpenDC modules only need to depend on the common module for dispatching future task (possibly in simulation).
2022-11-13refactor: Use InstantSource as time sourceFabian Mastenbroek
This change updates the modules of OpenDC to always accept the `InstantSource` interface as source of time. Previously we used `java.time.Clock`, but this class is bound to a time zone which does not make sense for our use-cases. Since `java.time.Clock` implements `java.time.InstantSource`, it can be used in places that require an `InstantSource` as parameter. Conversion from `InstantSource` to `Clock` is also possible by invoking `InstantSource#withZone`.
2022-10-31feat(sim/flow): Support synchronous update of FlowStageFabian Mastenbroek
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.
2022-10-21refactor(sim/flow): Remove old flow simulatorFabian Mastenbroek
This change removes the old version of the flow simulator from the OpenDC repository. The old version has been replaced by the new flow2 framework which is able to simulate flows more efficiently.
2022-10-21refactor(sim/compute): Re-implement using flow2Fabian Mastenbroek
This change re-implements the OpenDC compute simulator framework using the new flow2 framework for modelling multi-edge flow networks. The re-implementation is written in Java and focusses on performance and clean API surface.
2022-10-21feat(sim/flow): Expose metrics on FlowMultiplexerFabian Mastenbroek
2022-10-21feat(sim/flow): Add forwarding flow multiplexerFabian Mastenbroek
This change implements a new `FlowMultiplexer` that forwards the inputs directly to one of the pre-allocated outputs.
2022-10-21feat(sim/flow): Support flow transformationsFabian Mastenbroek
This change adds a new component, FlowTransform, which is able to transform the flow from one component to another, based on some inversible transformation. Such as component is useful when converting between different units of flow between different components.
2022-10-21perf(sim/flow): Add support for multi-flow stagesFabian Mastenbroek
This change adds support for creating nodes in a flow graph that support multiple inputs and outputs directly, instead of our current approach where we need to re-implement the `FlowConsumerContext` interface in order to support multiple inputs or outputs.
2022-10-06build: Switch to Spotless for formattingFabian Mastenbroek
This change updates the build configuration to use Spotless for code formating of both Kotlin and Java.
2022-10-06style: Eliminate use of wildcard importsFabian Mastenbroek
This change updates the repository to remove the use of wildcard imports everywhere. Wildcard imports are not allowed by default by Ktlint as well as Google's Java style guide.
2022-10-05refactor(sim/core): Rename runBlockingSimulation to runSimulationFabian Mastenbroek
This change renames the method `runBlockingSimulation` to `runSimulation` to put more emphasis on the simulation part of the method. The blocking part is not that important, but this behavior is still described in the method documentation.
2022-10-05refactor(sim/core): Use SimulationScheduler in coroutine dispatcherFabian Mastenbroek
This change updates the implementation of `SimulationDispatcher` to use a (possibly user-provided) `SimulationScheduler` for managing the execution of the simulation and future tasks.
2022-09-22refactor(sim/compute): Simplify SimHypervisor classFabian Mastenbroek
This change simplifies the SimHypervisor class into a single implementation. Previously, it was implemented as an abstract class with multiple implementations for each multiplexer type. We now pass the multiplexer type as parameter to the SimHypervisor constructor.
2022-09-21refactor(sim/compute): Move VM interference model into compute simulatorFabian Mastenbroek
This change moves the core of the VM interference model from the flow module into the compute simulator. This logic can be contained in the compute simulator and does not need to leak into the flow-level simulator.
2022-02-18refactor(simulator): Remove delta parameter from flow callbacksFabian Mastenbroek
This change removes the delta parameter from the callbacks of the flow framework. This parameter was used to indicate the duration in time between the last call and the current call. However, its usefulness was limited since the actual delta values needed by implementors of this method had to be bridged across different flow callbacks.
2022-02-18perf(simulator): Move logger field out of classFabian Mastenbroek
This change updates the FlowConsumerContextImpl by moving the logger outside of the class. This prevents each instance of this class from having to construct a logger instance.
2022-02-18fix(simulator): Flush results before accessing countersFabian Mastenbroek
This change updates the simulator implementation to flush the active progress when accessing the hypervisor counters. Previously, if the counters were accessed, while the mux or consumer was in progress, its counter values were not accurate.
2021-12-09fix(simulator): Support convergence of space shared hypervisorFabian Mastenbroek
This change addresses an issue with the SimSpaceSharedHypervisor implementation where it did not emit convergence events due to missing implementation. This caused issues with users of this class trying to obtain usage data, which depended on these events being emitted.
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-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-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.