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.
HugePageshas to be set to true across the system:
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
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
SHM_HUGETLBmust run with a supplemental group that matches