Skip to main content
OpenDC2 is no longer being developed

This page documents OpenDC2. OpenDC3 can still run OpenDC2 experiment files with opendc --legacy run, but new features are only added to OpenDC3. See the OpenDC3 documentation, or Migrating to OpenDC3.

Output

During a simulation, OpenDC regularly takes a sample of the state of the data center and writes it to Parquet files. The export model decides which files are written, which columns they have, and how often a sample is taken.

Where the results are written​

The results of an experiment are written to outputFolder/name/, where outputFolder and name are set in the experiment. Each run of a scenario gets its own folder:

output/
└── example/ the name of the experiment
├── trackr.json the settings of every scenario
├── simulation-analysis/
└── raw-output/
├── 0/ scenario 0
│ ├── seed=0/ the run with seed 0
│ │ ├── host.parquet
│ │ ├── task.parquet
│ │ ├── service.parquet
│ │ ├── powerSource.parquet
│ │ └── battery.parquet
│ └── seed=1/
└── 1/ scenario 1

simulation-analysis/ is filled by M3SA, when it is used.

Output files​

FileOne row per
host.parquethost, per sample
task.parquettask, per sample
service.parquetsample
powerSource.parquetpower source, per sample
battery.parquetbattery, per sample

Time​

Every file has two times: timestamp is in milliseconds since the start of the simulation, and timestamp_absolute is in milliseconds since the Unix epoch.

Energy use, carbon emissions, uptime, downtime and CPU and GPU times are measured over the time since the previous sample. To get the total, add up the values of all samples.

Example​

Reading the host file of a run with Python:

import pandas as pd

host = pd.read_parquet("output/example/raw-output/0/seed=0/host.parquet")
host["time"] = pd.to_datetime(host["timestamp_absolute"], unit="ms")
total_energy = host.groupby("host_name")["energy_usage"].sum()