Reference documentation and code samples for the Google Cloud Container V1 Client class TransparentHugepageDefrag.
Possible values for transparent hugepage defrag support.
Protobuf type google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag
Namespace
Google \ Cloud \ Container \ V1 \ LinuxNodeConfig
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED
Value: 0
Default value. GKE will not modify the kernel configuration.
Generated from protobuf enum TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED = 0;
TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS
Value: 1
It means that an application requesting THP will stall on allocation
failure and directly reclaim pages and compact memory in an effort to
allocate a THP immediately.
Generated from protobuf enum TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS = 1;
TRANSPARENT_HUGEPAGE_DEFRAG_DEFER
Value: 2
It means that an application will wake kswapd in the background to
reclaim pages and wake kcompactd to compact memory so that THP is
available in the near future. It’s the responsibility of khugepaged to
then install the THP pages later.
Generated from protobuf enum TRANSPARENT_HUGEPAGE_DEFRAG_DEFER = 2;
TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE
Value: 3
It means that an application will enter direct reclaim and compaction
like always, but only for regions that have used madvise(MADV_HUGEPAGE);
all other regions will wake kswapd in the background to reclaim pages and
wake kcompactd to compact memory so that THP is available in the near
future.
Generated from protobuf enum TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE = 3;
TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE
Value: 4
It means that an application will enter direct reclaim like always but
only for regions that are have used madvise(MADV_HUGEPAGE). This is the
default kernel configuration.
Generated from protobuf enum TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE = 4;
TRANSPARENT_HUGEPAGE_DEFRAG_NEVER
Value: 5
It means that an application will never enter direct reclaim or
compaction.
Generated from protobuf enum TRANSPARENT_HUGEPAGE_DEFRAG_NEVER = 5;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Cloud Container V1 Client - Class TransparentHugepageDefrag (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [2.4.0](/php/docs/reference/cloud-container/2.4.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [2.3.4](/php/docs/reference/cloud-container/2.3.4/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [2.2.1](/php/docs/reference/cloud-container/2.2.1/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [2.1.0](/php/docs/reference/cloud-container/2.1.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [2.0.0](/php/docs/reference/cloud-container/2.0.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.33.0](/php/docs/reference/cloud-container/1.33.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.32.0](/php/docs/reference/cloud-container/1.32.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.31.0](/php/docs/reference/cloud-container/1.31.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.30.3](/php/docs/reference/cloud-container/1.30.3/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.24.0](/php/docs/reference/cloud-container/1.24.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.23.0](/php/docs/reference/cloud-container/1.23.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.22.0](/php/docs/reference/cloud-container/1.22.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.21.1](/php/docs/reference/cloud-container/1.21.1/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.20.0](/php/docs/reference/cloud-container/1.20.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.19.0](/php/docs/reference/cloud-container/1.19.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.18.0](/php/docs/reference/cloud-container/1.18.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.17.1](/php/docs/reference/cloud-container/1.17.1/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.16.0](/php/docs/reference/cloud-container/1.16.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.15.0](/php/docs/reference/cloud-container/1.15.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.14.0](/php/docs/reference/cloud-container/1.14.0/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.13.1](/php/docs/reference/cloud-container/1.13.1/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.12.1](/php/docs/reference/cloud-container/1.12.1/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.10.3](/php/docs/reference/cloud-container/1.10.3/V1.LinuxNodeConfig.TransparentHugepageDefrag)\n- [1.9.1](/php/docs/reference/cloud-container/1.9.1/V1.LinuxNodeConfig.TransparentHugepageDefrag) \nReference documentation and code samples for the Google Cloud Container V1 Client class TransparentHugepageDefrag.\n\nPossible values for transparent hugepage defrag support.\n\nProtobuf type `google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Container \\\\ V1 \\\\ LinuxNodeConfig\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED\n\n Value: 0\n\nDefault value. GKE will not modify the kernel configuration.\n\nGenerated from protobuf enum `TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED = 0;`\n\n### TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS\n\n Value: 1\n\nIt means that an application requesting THP will stall on allocation\nfailure and directly reclaim pages and compact memory in an effort to\nallocate a THP immediately.\n\nGenerated from protobuf enum `TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS = 1;`\n\n### TRANSPARENT_HUGEPAGE_DEFRAG_DEFER\n\n Value: 2\n\nIt means that an application will wake kswapd in the background to\nreclaim pages and wake kcompactd to compact memory so that THP is\navailable in the near future. It's the responsibility of khugepaged to\nthen install the THP pages later.\n\nGenerated from protobuf enum `TRANSPARENT_HUGEPAGE_DEFRAG_DEFER = 2;`\n\n### TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE\n\n Value: 3\n\nIt means that an application will enter direct reclaim and compaction\nlike always, but only for regions that have used madvise(MADV_HUGEPAGE);\nall other regions will wake kswapd in the background to reclaim pages and\nwake kcompactd to compact memory so that THP is available in the near\nfuture.\n\nGenerated from protobuf enum `TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE = 3;`\n\n### TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE\n\n Value: 4\n\nIt means that an application will enter direct reclaim like always but\nonly for regions that are have used madvise(MADV_HUGEPAGE). This is the\ndefault kernel configuration.\n\nGenerated from protobuf enum `TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE = 4;`\n\n### TRANSPARENT_HUGEPAGE_DEFRAG_NEVER\n\n Value: 5\n\nIt means that an application will never enter direct reclaim or\ncompaction.\n\nGenerated from protobuf enum `TRANSPARENT_HUGEPAGE_DEFRAG_NEVER = 5;`"]]