# Memory Management Settings

+ `THP`
  + It is recommended to disable THP (Transparent Huge Pages)
+ `SWAP`
  + `vm.swappiness`: 0
  + `vm.overcommit_memory`: 0 or 1

------------------------------------------------------------

Check if the deployment machine is enabled for Transparent Huge Pages: it is recommended to disable Transparent Huge Pages

Swap usage checks
  - vm.swappiness: 0
  - vm.overcommit_memory: 0 or 1

The size of the swappiness value has a lot to do with how to use the swap partition. When swappiness=0, it means maximum use of physical memory, then swap space. Swappiness = 100 indicates active use of swap partition, and data from memory is moved into the swap space in a timely manner. The basic default for linux is 60

Memory Overcommit means that the operating system promises to give the process more memory than is actually available.

0 — Heuristic overcommit handling. This is the default value, which allows overcommit, but an overcommit that is too blatant will be rejected, such as a one-time request for malloc that exceeds the total system memory. Heuristic means “tentative”, and the kernel uses an algorithm (see the end of the article for a detailed explanation of the algorithm) to guess whether your memory request is reasonable, and rejects overcommit if it deems it unreasonable.

1 — Always overcommit. Overcommit is allowed, and memory requests cannot be rejected.

2 — Don't overcommit. Overcommit is prohibited.
