What it is
Transparent huge pages let the kernel back memory with 2 MB pages instead of 4 KB ones, which cuts TLB misses but can cost latency (direct compaction), memory (sparse use of a huge page) and copy work (writes after fork). Whether that trade is good depends on the allocator of the software: Redis wants huge pages kept away from its heap, MongoDB 7.0 and earlier want them off, and MongoDB 8.0 on most platforms wants them on. This tool reads your settings and the counters your host reports, and applies the rule for the software and version you choose.
When to use it
Use it before and after changing /sys/kernel/mm/transparent_hugepage, when a Redis BGSAVE causes latency spikes, when you upgrade MongoDB across 8.0, or when you need to explain what AnonHugePages, thp_fault_fallback and compact_stall mean for a process.
Gotchas & limits
Every rule in the matrix comes from the product brief or a third-party guide and is marked to be verified until someone re-reads its official source and records the date; treat them as hints. Changing the policy does not split huge pages that already exist, so restart the process. The generated script records the old values and ends with the restore commands, but run it on a test host first.