pub(crate) fn disable_thp()Expand description
Turn transparent huge pages off for the process, as early as possible. On AArch64 glibc asks for them for its heap by default, so the first growth of the heap beyond a 2 MiB boundary costs 2 MiB resident, which a server per pod does not need. mallopt cannot turn that off, and the tunable which can takes effect only from the start of the process. Huge pages which were already allocated stay.
The setting gets inherited and kept across exec, so the runtimes get the
one the server started with, see
reset_inherited. A setting of whoever started the server stays.