nr_overcommit_hugepages

Change the maximum size of the hugepage pool. The maximum is nr_hugepages + nr_overcommit_hugepages.

This tunable indicates how large the pool of hugepages can grow, if more hugepages than nr_hugepages are requested by applications. Echo'ing any non-zero value into this file indicates that the hugetlb subsystem is allowed to try to obtain hugepages from the buddy allocator, if the normal pool is exhausted. As these surplus hugepages go out of use, they are freed back to the buddy allocator.

Caveat: Shrinking the pool via nr_hugepages such that it becomes less than the number of hugepages in use will convert the balance to surplus hugepages even if it would exceed the overcommit value. As long as this condition holds, however, no more surplus huge pages will be allowed on the system until one of the two sysctls are increased sufficiently, or the surplus huge pages go out of use and are freed.