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.

Distribution policy

A distribution policy determines how the capacity of a CPU or GPU is shared between the tasks on a host. Every host has one for its CPU (cpuDistributionPolicy) and one for its GPU (gpuDistributionPolicy). The default is MAX_MIN_FAIRNESS.

The type selects the policy:

TypeFieldsBehaviour
MAX_MIN_FAIRNESSSatisfies the smallest demands first, so that no task is starved. This is the default.
BEST_EFFORTupdateIntervalLength (milliseconds, default 1000)Round-robin over the tasks, rotating every updateIntervalLength, while using as much of the capacity as possible. Inspired by NVIDIA's vGPU scheduler.
EQUAL_SHAREGives every task the same share of the capacity, regardless of its demand. Inspired by NVIDIA's vGPU scheduler.
FIRST_FITGives each task its full demand, in order, until the capacity is used up.
FIXED_SHAREshareRatio (default 1.0)Gives each active task a fixed fraction of the capacity. Unused shares are not given to other tasks. Inspired by NVIDIA's vGPU scheduler.

Example​

"gpuDistributionPolicy": {
"type": "BEST_EFFORT",
"updateIntervalLength": 60000
}