Skip to main content

Data Models

OpenDT uses Pydantic models to define the structure of all data flowing through the system.

Workload Data

Task

A Task represents a job submitted to the datacenter. Each task requests compute resources for a specific duration.

FieldTypeDescription
idintUnique identifier
submission_timedatetimeWhen the task was submitted
durationintTotal duration in milliseconds
cpu_countintNumber of CPU cores requested
cpu_capacityfloatCPU speed in MHz
mem_capacityintMemory capacity in MB
fragmentslistExecution profile segments

A task represents a request for compute cycles:

Total Cycles = cpu_count × cpu_capacity × duration

Fragment

A Fragment describes resource usage during a segment of task execution. Tasks can have varying resource usage over time.

FieldTypeDescription
idintFragment identifier
task_idintParent task ID
durationintSegment duration in milliseconds
cpu_countintCPUs used in this segment
cpu_usagefloatCPU utilization value

Power Data

Consumption

A Consumption record represents actual power telemetry from the datacenter.

FieldTypeDescription
timestampdatetimeMeasurement time
power_drawfloatInstantaneous power in Watts
energy_usagefloatAccumulated energy in Joules

Topology

The Topology defines the datacenter hardware that the simulator uses to calculate power. It is hierarchical: Clusters contain Hosts, which have CPUs, Memory, and a Power Model.

Topology
└── Cluster (e.g., "C01")
└── Host
├── count: 277 (number of identical hosts)
├── CPU
│ ├── coreCount: 16
│ └── coreSpeed: 2100 MHz
├── Memory
│ └── memorySize: 128 GB
└── CPUPowerModel
├── modelType: "mse"
├── idlePower: 25 W
├── maxPower: 174 W
└── calibrationFactor: 10.0

Model Definitions

All data models are defined using Pydantic v2 in libs/common/odt_common/models/:

ModelFileDescription
Tasktask.pyWorkload task
Fragmentfragment.pyTask execution segment
Consumptionconsumption.pyPower measurement
Topologytopology.pyDatacenter topology
WorkloadMessageworkload_message.pyKafka message wrapper

These models provide:

  • Runtime type validation
  • JSON serialization/deserialization
  • Automatic API documentation