Kubernetes learning 22 kubernetes container resource needs and resource constraints HeapSter

I. Overview

  1, the following describes how we monitor our system-level resources indicators and business indicators of the level of resources when running pod objects on k8s. How data acquisition and monitoring. Prior to first introduce resource requests and resource constraints Pod objects. That container resource requirements and resource constraints. Speaking through the vessel in the docker is possible resource limits, we can start to define a container vessel how much cpu and memory resources can be used. At that time said compressible resources cpu resources, a pod or a container resource acquisition should get less than the specified time to wait, but in terms of memory is not the case, if he used enough resources likely to be because memory resources are exhausted killd. But on top of that we have two dimensions k8s resource limitations, it is the definition of a start value, a value that defines its end.

    a, requests: requests resources can be used to define the pod at least how much CPU or memory resources will be used. That resource requirements, a minimum guarantee.

    b, limits: that is the limit, also called the restrictions, but also hard limit. In general, our requests are less than equal to the limits.

Two, Pod resource limits  

  1, although these restrictions are applied on top of the vessel, we'll call it a general resource constraints Pod Pod or resource requirements of. To describe the different indicators both before configuration.

    a, CPU: cpu is equivalent to a unit on our k8s a corresponding virtual CPU, a CPU refers to a logical CPU, also refers to a core. Or a hyper-threading. A two-core dual-threaded CPU will actually be virtualized into four logical cpu. A cpu can be divided into separate sub-units. A central core corresponds to 1000 ml. That is milicores. I.e. 500m = 0.5CPU

    b, Memory: Unit is E, P, T, G, M, K, we generally Ei, Pi ... as the unit of measurement.

  2, so we generally divide the amount of CPU resources occupancy index of. For example, there is a range of our CPU limit, assuming that only use 0.5 cpu core we are now in a pod of up to a container, then we define cpu.limits = 500m, 500m but this is the hard limit. That multi-use is not possible, it is not the case is possible.

 

Guess you like

Origin www.cnblogs.com/Presley-lpc/p/11387922.html