Skip to main content

Workload

A workload defines the tasks that are submitted to the data center, when they are submitted, and how much CPU, GPU and memory they use over time. Workloads can be defined directly in the experiment, or in a trace.

The type selects the kind of workload:

TypeDescription
traceReads the tasks from a workload trace.
efficient-traceLike trace, but reads the trace in a single pass, which uses less memory for large traces and is faster. To be considered efficient, the trace must be ordered by submission_time and each task needs to indicate its number of fragments using the num_fragments column.
inlineLists the tasks in the experiment file.

Trace workloads​

FieldTypeDefaultDescription
sourcetrace referencerequiredThe directory of the workload trace.
sampleFractionnumber1.0Runs a random sample of the tasks that together have this fraction of the total work of the trace.
submissionTimestringunchangedMoves the workload in time so that the first task is submitted at this time, such as "2024-01-01T00:00:00" (UTC).
deferAllbooleanfalseMakes every task deferrable, with a deadline of its submission time plus three times its duration. Alternatively, users can select which tasks can be deferred, and for how long, in the trace itself.
scalingPolicyscaling policyNoDelayWhat happens when a task gets less resources than it demands.
{
"type": "trace",
"source": { "type": "named", "name": "traces/bitbrains-small" },
"submissionTime": "2024-01-01T00:00:00"
}

Scaling policies​

PolicyBehaviour
NoDelayThe task keeps its duration. Demand that is not met is lost. This is the default.
PerfectThe task runs longer, so that all of its work is eventually done.

Inline workloads​

An inline workload lists its tasks in the experiment using a JSON object. This is primarily used for small tests because it is easy to write and change.

FieldTypeDefaultDescription
taskslist of tasksrequiredThe tasks of the workload.
scalingPolicyscaling policyNoDelayWhat happens when a task gets less than it demands.

Tasks​

FieldTypeDefaultDescription
idintegerrequiredIdentifier of the task, unique within the workload.
submissionTimeDurationrequiredWhen the task is submitted, from the start of the workload.
durationDurationrequiredHow long the task runs.
cpuCoreCountintegerrequiredThe number of CPU cores the task needs.
cpuCapacityFrequencyrequiredThe CPU capacity the task needs.
memoryData sizerequiredThe memory the task needs.
fragmentslist of fragmentsrequiredThe demand of the task over time. Each fragment has a duration, a cpuUsage, and optionally a gpuUsage and gpuMemory.
gpuCoreCountinteger0The number of GPU cores the task needs.
gpuCapacityFrequency0The GPU capacity the task needs.
gpuMemoryData size0The GPU memory the task needs.
deferrablebooleanfalseWhether a time-shifting scheduler may delay the task.
deadlineDurationno deadlineThe latest time the task may finish, from the start of the workload.
parentslist of integers[]The tasks that must finish before this task can start.
childrenlist of integers[]The tasks that depend on this task.
{
"type": "inline",
"tasks": [
{
"id": 0,
"submissionTime": "0 minutes",
"duration": "10 minutes",
"cpuCoreCount": 2,
"cpuCapacity": "3.0 GHz",
"memory": "2 GiB",
"fragments": [
{ "duration": "5 minutes", "cpuUsage": "3.0 GHz" },
{ "duration": "5 minutes", "cpuUsage": "1.5 GHz" }
]
}
]
}

Workload traces​

A workload trace is a directory with two Parquet files: tasks.parquet describes each task, and fragments.parquet describes the demand of each task over time.

tasks.parquet​

ColumnTypeRequiredDescription
idint32yesMain identifier of the task.
namestringnoName of the task.
submission_timetimestamp (milliseconds)yesWhen the task is submitted.
durationint64yesHow long the task runs, in milliseconds.
cpu_countint32yesThe number of CPU cores the task needs.
cpu_capacitydoubleyesThe CPU capacity the task needs, in MHz.
mem_capacityint64yesThe memory the task needs, in MiB.
gpu_countint32noThe number of GPU cores the task needs.
gpu_capacitydoublenoThe GPU capacity the task needs, in MHz.
parentslist of int32noThe tasks that must finish before this task can start.
childrenlist of int32noThe tasks that depend on this task.
deferrablebooleannoWhether a time-shifting scheduler may delay the task.
deadlineint64noThe latest time the task may finish, in milliseconds since the Unix epoch. This is used to determine for how long a task can be deferred by the time-shifting scheduler.
num_fragmentsint32noThe number of fragments of the task. Required for efficient-trace.

fragments.parquet​

Each row is one fragment, during which the demand of a task is constant. The fragments of a task are in order.

ColumnTypeRequiredDescription
idint32yesIdentifier of the task.
durationint64yesHow long the fragment lasts, in milliseconds.
cpu_usagedoubleyesThe CPU demand during the fragment, in MHz.
gpu_usagedoublenoThe GPU demand during the fragment, in MHz.