qos

package
v1.13.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

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

View Source
const (
	// PodInfraOOMAdj is very docker specific. For arbitrary runtime, it may not make
	// sense to set sandbox level oom score, e.g. a sandbox could only be a namespace
	// without a process.
	// TODO: Handle infra container oom score adj in a runtime agnostic way.
	PodInfraOOMAdj       int = -998
	KubeletOOMScoreAdj   int = -999
	DockerOOMScoreAdj    int = -999
	KubeProxyOOMScoreAdj int = -999
)

Variables

This section is empty.

Functions

func GetContainerOOMScoreAdjust added in v1.2.3

func GetContainerOOMScoreAdjust(pod *v1.Pod, container *v1.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 10 (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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL