FEATURE STATE: Kubernetes v1.8
alpha
This feature is currently in a alpha state, meaning:
Kubernetes supports the allocation and consumption of pre-allocated huge pages by applications in a Pod as an alpha feature. This page describes how users can consume huge pages and the current limitations.
HugePages
has to be set to true across the
system: --feature-gates=HugePages=true
.The nodes will automatically discover and report all huge page resources as a schedulable resource.
Huge pages can be consumed via container level resource requirements using the
resource name hugepages-<size>
, where size is the most compact binary notation
using integer values supported on a particular node. For example, if a node
supports 2048KiB page sizes, it will expose a schedulable resource
hugepages-2Mi
. Unlike CPU or memory, huge pages do not support overcommit.
apiVersion: v1
kind: Pod
metadata:
generateName: hugepages-volume-
spec:
containers:
- image: fedora:latest
command:
- sleep
- inf
name: example
volumeMounts:
- mountPath: /hugepages
name: hugepage
resources:
limits:
hugepages-2Mi: 100Mi
volumes:
- name: hugepage
emptyDir:
medium: HugePages
«««< HEAD
master specified, but requests are not.
shmget()
with SHM_HUGETLB
must
«««< HEAD
run with a supplemental group that matches proc/sys/vm/hugetlb_shm_group
=======
run with a supplemental group that matches proc/sys/vm/hugetlb_shm_group
.
master
master