---

# Reference: https://www.kernel.org/doc/Documentation/sysctl/vm.txt

# When adding new settings, please also add them to the sanity check in
# vehicle/sanity_checker/checks/check_kernel.py in the CheckVirtualMemory class.

# Avoid swapping until absolutely necessary. (Default is 60, range is 0-100).
vm_swappiness: "0"

# Always keep at least 2 GB free on the PCU (1 GB on vision machines) for
# immediate allocations. This prevents sudden large heap growth from causing
# stalls due to ton of page cache eviction.
vm_min_free_kbytes_pcu: "2097152"
vm_min_free_kbytes_vision: "1048576"

# Don't reclaim when a zone is out of memory. Instead, satisfy the request from
# other zones. Reclaims can cause stalls.
vm_zone_reclaim_mode: "0"

# Don't kill a random task when OOM, instead kill the task that tried to
# allocate.
vm_oom_kill_allocating_task: "1"
