package qos

import "k8s.io/kubernetes/pkg/kubelet/qos"

package qos contains helper functions for quality of service. For each resource (memory, CPU) Kubelet supports three classes of containers. Memory guaranteed containers will receive the highest priority and will get all the resources they need. Burstable containers will be guaranteed their request and can “burst” and use more resources when available. Best-Effort containers, which don’t specify a request, can use resources only if not being used by other pods.

Index

Constants

const (
	PodInfraOomAdj       int = -999
	KubeletOomScoreAdj   int = -999
	KubeProxyOomScoreAdj int = -999
)

Functions

func GetContainerOomScoreAdjust

func GetContainerOomScoreAdjust(container *api.Container, memoryCapacity int64) int

GetContainerOomAdjust returns the amount by which the OOM score of all processes in the container should be adjusted. The OOM score of a process is the percentage of memory it consumes multiplied by 100 (barring exceptional cases) + a configurable quantity which is between -1000 and 1000. Containers with higher OOM scores are killed if the system runs out of memory. See https://lwn.net/Articles/391222/ for more information.

Source Files

doc.go memory_policy.go

Directories

PathSynopsis
pkg/kubelet/qos/util
Version
v1.1.4
Published
Jan 8, 2016
Platform
windows/amd64
Imports
1 packages
Last checked
2 minutes ago

Tools for package owners.