Skip to content

dsdk / v1.47 / Resources

Type Alias: Resources ​

Resources: object

A container's resources (cgroups config, ulimits, etc)

Type declaration ​

NameTypeDescription
BlkioDeviceReadBps?ThrottleDevice[]Limit read rate (bytes per second) from a device, in the form: [{"Path": "device_path", "Rate": rate}]
BlkioDeviceReadIOps?ThrottleDevice[]Limit read rate (IO per second) from a device, in the form: [{"Path": "device_path", "Rate": rate}]
BlkioDeviceWriteBps?ThrottleDevice[]Limit write rate (bytes per second) to a device, in the form: [{"Path": "device_path", "Rate": rate}]
BlkioDeviceWriteIOps?ThrottleDevice[]Limit write rate (IO per second) to a device, in the form: [{"Path": "device_path", "Rate": rate}]
BlkioWeight?numberBlock IO weight (relative weight).
BlkioWeightDevice?object[]Block IO weight (relative device weight) in the form: [{"Path": "device_path", "Weight": weight}]
CgroupParent?stringPath to cgroups under which the container's cgroup is created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups are created if they do not already exist.
CpuCount?numberThe number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
CpuPercent?numberThe usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is CPUCount first, then CPUShares, and CPUPercent last.
CpuPeriod?numberThe length of a CPU period in microseconds.
CpuQuota?numberMicroseconds of CPU time that the container can get in a CPU period.
CpuRealtimePeriod?numberThe length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
CpuRealtimeRuntime?numberThe length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
CpusetCpus?stringCPUs in which to allow execution (e.g., 0-3, 0,1).
CpusetMems?stringMemory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
CpuShares?numberAn integer value representing this container's relative CPU weight versus other containers.
DeviceCgroupRules?string[]a list of cgroup rules to apply to the container
DeviceRequests?DeviceRequest[]A list of requests for devices to be sent to device drivers.
Devices?DeviceMapping[]A list of devices to add to the container.
Init?boolean | nullRun an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.
IOMaximumBandwidth?numberMaximum IO in bytes per second for the container system drive (Windows only).
IOMaximumIOps?numberMaximum IOps for the container system drive (Windows only)
KernelMemoryTCP?numberHard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty.
Memory?numberMemory limit in bytes.
MemoryReservation?numberMemory soft limit in bytes.
MemorySwap?numberTotal memory limit (memory + swap). Set as -1 to enable unlimited swap.
MemorySwappiness?numberTune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
NanoCpus?numberCPU quota in units of 10-9 CPUs.
OomKillDisable?booleanDisable OOM Killer for the container.
PidsLimit?number | nullTune a container's PIDs limit. Set 0 or -1 for unlimited, or null to not change.
Ulimits?object[]A list of resource limits to set in the container. For example: {"Name": "nofile", "Soft": 1024, "Hard": 2048}